Question: integration help

hi

 

i write following code that solve ordinary differential equation. but its not good enough. because when in loop it want to integrate equation it takes too long for many problems. i wants you to help me to solve this problem. i think maybe its better to solve with numerical but i cant. its really important for me and thancks for your help. I bold that section.

restart:
equ:=diff(u[i](x),x$3)+(1/2)*diff(u[i](x),x$2)*u[i](x)+(2*m1/(m1+1))*(1-diff(u[i](x),x$1)^2):
aa:=1:
m1:=0:
#lambda1:=.1:
b:=5:
linear_part:=diff(v(x),x$3)+diff(v(x),x$2):
ics:=v(0)=0,(D@@2)(v)(0)=alpha,D(v)(0)=-lambda1:
dsolve({linear_part, ics}):
> evalf[4](%);

u[0](x):=rhs(%);
     -1. alpha + (-1. lambda1 + alpha) x + alpha exp(-1. x)

m:=0;
                               0
f[i](s):=subs(x=s,equ):
for i from 0 by 1 to 2 do
u[i](s):=subs(x=s,u[i](x));
u[i+1](x):=aa*(u[i](x)+int(lambda*f[i](s), s=0..x));
u[i+1](x):=subs(lambda=(exp(x)-x*exp(x)+s*exp(x)-exp(s))*exp(-x),u[i+1](x));
u[i+1](x):=subs(f[i](s)=diff(u[i](s),s$3)+(1/2)*diff(u[i](s),s$2)*u[i](s)+(2*m1/(m1+1))*(1-diff(u[i](s),s$1)^2),u[i+1](x));
u[i+1](x):=simplify(%);
expand(%);
u[i+1](x):=evalf[5](%):

od:

> velocity := unapply(evalf[5](u[i](x)), x);
>
diff(velocity(x), x$1):
> eval(%, [x = b+.1*lambda1]);
plots[:-implicitplot](%, alpha = -2 .. 2, lambda1 = -1 .. 1);

 

 

 

 

thancks

 

Please Wait...