mjason

249 Reputation

2 Badges

15 years, 335 days

MaplePrimes Activity


These are replies submitted by mjason

thanks for the help. much appreciated

mj

thanks for the help. much appreciated

mj

thank you for your help. worked perfectly. exactly what i wanted. I have now got maple redefining F(eta) in a loop. If i now try to do a contourplot i just get the outcome:

contourplot(x*(-1/2*eta^3+3/2*eta),x = -10 .. 10,eta = -1 .. 1)

instead of a plot.

Here is the code i have used:

> restart;
> nmax:=14:
> Order:=nmax+1:
Start with the differential equation
> de:=diff(F(eta,R),eta$4)-R*(diff(F(eta,R),eta)*diff(F(eta,R),eta$2)-F(eta,R)*diff(F(eta,R),eta$3)):
Write in a series of powers of R
> series(eval(de,F(eta,R)=add(F[k](eta)*R^k,k=0..nmax)),R):
Extract the individual equations for each power upto R^5
> des:=[seq(coeff(%,R,k),k=0..nmax)]:
Define the boundary conditions
> bcs:=k->(F[k](-1)=`if`(k=0,-1,0),F[k](1)=`if`(k=0,1,0),D(F[k])(-1)=0,D(F[k])(1)=0):
Solve the boundary value problem for each power
> for k from 1 to nmax+1 do
>     F[k-1]:=unapply(rhs(dsolve({des[k],bcs(k-1)})),eta)
> end do:
> v[w]:=1:
> a:=1:
> contourplot(v[w]*x*F[0](eta),x=-10..10,eta=-a..a);

What is the reason it will plot in the first instance but not the second?

Thanks
 

thank you for your help. worked perfectly. exactly what i wanted. I have now got maple redefining F(eta) in a loop. If i now try to do a contourplot i just get the outcome:

contourplot(x*(-1/2*eta^3+3/2*eta),x = -10 .. 10,eta = -1 .. 1)

instead of a plot.

Here is the code i have used:

> restart;
> nmax:=14:
> Order:=nmax+1:
Start with the differential equation
> de:=diff(F(eta,R),eta$4)-R*(diff(F(eta,R),eta)*diff(F(eta,R),eta$2)-F(eta,R)*diff(F(eta,R),eta$3)):
Write in a series of powers of R
> series(eval(de,F(eta,R)=add(F[k](eta)*R^k,k=0..nmax)),R):
Extract the individual equations for each power upto R^5
> des:=[seq(coeff(%,R,k),k=0..nmax)]:
Define the boundary conditions
> bcs:=k->(F[k](-1)=`if`(k=0,-1,0),F[k](1)=`if`(k=0,1,0),D(F[k])(-1)=0,D(F[k])(1)=0):
Solve the boundary value problem for each power
> for k from 1 to nmax+1 do
>     F[k-1]:=unapply(rhs(dsolve({des[k],bcs(k-1)})),eta)
> end do:
> v[w]:=1:
> a:=1:
> contourplot(v[w]*x*F[0](eta),x=-10..10,eta=-a..a);

What is the reason it will plot in the first instance but not the second?

Thanks
 

Page 1 of 1