Hi all

I dont know why some Z1 appears on the screen and the code does not converge.

please help me

thanks alooooot

restart;

n:=3;

nn:=3;

m:=1;

BB:=1;

BINF:=5:

pr:=7;

digits:=10;

>

eq1:=diff(f(tau),tau$3)+((3/5)*f(tau)*diff(f(tau),tau$2))-(1/5)*(diff(f(tau),tau$1))^2+((2/5)*tau*diff(h(tau),tau$1))-((2/5)*h(tau))-BB*diff(f(tau),tau$1)=0;

eq11:=(1/pr)*diff(h(tau),tau$3)+(3/5)*f(tau)*diff(h(tau),tau$2)=0;

h(tau):=sum(p^i*h[i](tau),i=0..nn);

f(tau):=sum(p^i*f[i](tau),i=0..n);

H1:= p*(diff(f(tau),tau$3)+((3/5)*f(tau)*diff(f(tau),tau$2))-(1/5)*(diff(f(tau),tau$1))^2+((2/5)*tau*diff(h(tau),tau$1))-((2/5)*h(tau))-BB*diff(f(tau),tau$1))+(1-p)*(diff(f(tau),tau$3)):

H11:= p*((1/pr)*diff(h(tau),tau$3)+(3/5)*f(tau)*diff(h(tau),tau$2))+(1-p)*(diff(h(tau),tau$3)):

>

eq2:=simplify(H1):

eq22:=simplify(H11):

eq3:=collect(expand(eq2),p):

eq33:=collect(expand(eq22),p):

eq4:=

convert(series(collect(expand(eq2), p), p, n+1), 'polynom');

eq44:=

convert(series(collect(expand(eq22), p), p, n+1), 'polynom');

for i to n do

s[i] := coeff(eq4, p^i) ;

print (i);

end do:

for i to nn do

ss[i] := coeff(eq44, p^i) ;

print (i);

end do:

s[0]:=diff(f[0](tau), tau$3);

ss[0]:=diff(h[0](tau), tau$3);

ics[0]:=f[0](0)=0, D(f[0])(0)=0, D(f[0])(BINF)=0;

icss[0]:=h[0](BINF)=0, D(h[0])(0)=1, D(h[0])(BINF)=0;

dsolve({s[0], ics[0]});

f[0](tau):= rhs(%);

#dsolve({ss[0], icss[0]});

h[0](tau):= -exp(-tau); #;rhs(%);

>

>

for i to n do

f[ii-1](tau):=convert(series(f[ii-1](tau), tau, nn+1), 'polynom');

h[ii-1](tau):=convert(series(h[ii-1](tau), tau, nn+1), 'polynom');

s[i]:=simplify((s[i]));

ics[i]:=f[i](0)=0, D(f[i])(0)=0, D(f[i])(BINF)=0;

dsolve({s[i], ics[i]});

f[i](tau):=rhs(%);

ss[i]:=(ss[i]);

icss[i]:=h[i](BINF)=0, D(h[i])(0)=0, D(h[i])(BINF)=0;

dsolve({ss[i], icss[i]});

h[i](tau):=rhs(%);

end do;

f(tau):=sum((f[j])(tau),j=0..n);

with(numapprox):

plot(diff(f(tau),tau),tau=0..5,color=blue,style=point,symbol=circle,symbolsize=7,labels=["tau","velocity"]);

plot(pade(diff(f(tau),tau), tau, [7, 7]),tau=0..5,color=blue,style=point,symbol=circle,symbolsize=7,labels=["tau","velocity"]);