666 jvbasha

javid basha jv

120 Reputation

8 Badges

4 years, 299 days

MaplePrimes Activity


These are replies submitted by 666 jvbasha

Hi maple users 

Is there any possibility of executing this code at sa=4?.
Kindly do the needful.
Thank for your help

Hi @tomleslie

I have found the results for sa=1 case, But it is not executing at sa=2 or 3 cases. 


Is there any way to get the solutions


Kindly do the needful.

badODEsys_(1).mw
 

  restart:
  with(plots):
  PDEtools[declare](f1(x),f2(x),f3(x), t1(x),t2(x),t3(x)):

f1(x)*`will now be displayed as`*f1

 

f2(x)*`will now be displayed as`*f2

 

f3(x)*`will now be displayed as`*f3

 

t1(x)*`will now be displayed as`*t1

 

t2(x)*`will now be displayed as`*t2

 

t3(x)*`will now be displayed as`*t3

(1)

  N :=1:
  F1:= add(p^jj*f1[jj](x), jj=0..N):
  F2:= add(p^jj*f2[jj](x), jj=0..N):
  F3:= add(p^jj*f3[jj](x), jj=0..N):
  T1:= add(p^jj*t1[jj](x), jj=0..N):
  T2:= add(p^jj*t2[jj](x), jj=0..N):
  T3:= add(p^jj*t3[jj](x), jj=0..N):

  gr:=5: pa:=5: sa:=1: br:=0.1: A1:=1: A2:=2: A3:=1:
  Eq11:= (1-p)*((diff(F1, x$2)+gr*T1)+pa)+p*((diff(F1, x$2)+gr*T1)+pa):
  Eq12:= (1-p)*(diff(T1, x$2))+p*((diff(T1, x$2)+br*(diff(F1, x))*(diff(F1, x)))):
  Eq21:= (1-p)*((diff(F2, x$2)+gr*A1*A2*T2)-sa*sa*F2+pa*A1)+p*((diff(F2, x$2)+gr*A1*A2*T2)-sa*sa*F2+pa*A1):
  Eq22:= (1-p)*(diff(T2, x$2))+p*((diff(T2, x$2)+A1*A3*br*((diff(F1, x))*(diff(F1, x))+sa*sa*F2*F2))):
  Eq31:= (1-p)*br*((diff(F3, x$2)+gr*T3)+pa)+p*((diff(F3, x$2)+gr*T3)+pa):
  Eq32:= (1-p)*br*(diff(T3, x$2))+p*((diff(T3, x$2)+br*(diff(F3, x))*(diff(F3, x)))):

  for i from 0 to N+1 do
      equ1[i] := coeff(Eq11, p, i) = 0:
      equ2[i] := coeff(Eq12, p, i) = 0:
      equ3[i] := coeff(Eq21, p, i) = 0:
      equ4[i] := coeff(Eq22, p, i) = 0:
      equ5[i] := coeff(Eq31, p, i) = 0:
      equ6[i] := coeff(Eq32, p, i) = 0:
  end do:

  con1[0]:= f1[0](-1) = 0, f1[0](0) = f2[0](0), D(f1[0])(0) = D(f2[0])(0),
            f2[0](1) = f3[0](1), D(f2[0])(1) = D(f3[0])(1),f3[0](2)=0:
  con2[0]:= t1[0](-1) = 0, t1[0](0) = t2[0](0), D(t1[0])(0) = D(t2[0])(0),
            t2[0](1) = t3[0](1), D(t2[0])(1) = D(t3[0])(1), t3[0](2)=1:
  for h to N do
      con1[h]:= f1[h](-1) = 0,  f1[h](0) = f2[h](0), D(f1[h])(0) = D(f2[h])(0),
                f2[h](1) = f3[h](1), D(f2[h])(1) = D(f3[h])(1), f3[h](2)=0:
      con2[h]:= t1[h](-1) = 0, t1[h](0) = t2[h](0), D(t1[h])(0) = D(t2[h])(0),
                t2[h](1) = t3[h](1), D(t2[h])(1) = D(t3[h])(1), t3[h](2)=0:
  end do:

  for i from 0 to N do
      P:= dsolve( {con1[i], con2[i], equ1[i], equ2[i], equ3[i], equ4[i], equ5[i], equ6[i]},
                  {f1[i](x), t1[i](x), f2[i](x), t2[i](x), f3[i](x), t3[i](x)}
                ):
      f1[i](x):=rhs(P[1]):
      f2[i](x):=rhs(P[2]):
      f3[i](x):=rhs(P[3]):
      t1[i](x):=rhs(P[4]):
      t2[i](x):=rhs(P[5]):
      t3[i](x):=rhs(P[6]):
  end do;

{f1[0](x) = -(5/18)*x^3-(10/3)*x^2+(5/36)*(31*exp(1)-38)*x/exp(1)+(5/36)*(-38+53*exp(1))/exp(1), f2[0](x) = -(95/18)*exp(x)/exp(1)-(35/36)*exp(-x)+(10/3)*x+25/3, f3[0](x) = -(5/18)*x^3-(10/3)*x^2+(50/9+(35/36)*exp(-1))*x+40/9-(35/18)*exp(-1), t1[0](x) = (1/3)*x+1/3, t2[0](x) = (1/3)*x+1/3, t3[0](x) = (1/3)*x+1/3}

 

-(5/18)*x^3-(10/3)*x^2+(5/36)*(31*exp(1)-38)*x/exp(1)+(5/36)*(-38+53*exp(1))/exp(1)

 

-(95/18)*exp(x)/exp(1)-(35/36)*exp(-x)+(10/3)*x+25/3

 

-(5/18)*x^3-(10/3)*x^2+(50/9+(35/36)*exp(-1))*x+40/9-(35/18)*exp(-1)

 

(1/3)*x+1/3

 

(1/3)*x+1/3

 

(1/3)*x+1/3

 

{f1[1](x) = (5/24192)*x^8+(5/756)*x^7+(805/15552)*x^6+(95/7776)*x^6*exp(-1)-(155/648)*x^5+(95/324)*x^5*exp(-1)+(24025/62208)*x^4-(14725/15552)*x^4*exp(-1)+(9025/15552)*exp(-2)*x^4-(5/6)*x^3*(47797/10368+(545/162)*exp(-1)-(95/1152)*exp(-2))-(5/2)*(69995/10368-(5/648)*exp(-1)+(13585/10368)*exp(-2))*x^2-(5/870912)*(7663012*exp(-1)*exp(1)-828590*exp(-2)*exp(1)-15854440*exp(-1)-2334780*exp(-2)+13548771*exp(1)-50721298)*x/exp(1)-(5/870912)*(7940828*exp(-1)*exp(1)-1310050*exp(-2)*exp(1)-15854440*exp(-1)-2334780*exp(-2)+11394973*exp(1)-50721298)/exp(1), f2[1](x) = -(1750/27)*x-(6125/1296)*x^4-211025/1296+10*(23609/3456-(155/81)*exp(-1)+(13585/10368)*exp(-2))*x+exp(-x)*(77709335/870912+(3325/256)*exp(-2)-(1415605/31104)*exp(-1))+(5/435456)*exp(x)*(7927220*exp(-1)+1167390*exp(-2)+25360649)/exp(1)-(475/54)*x^2*exp(x-1)+(175/108)*exp(-x)*x^2-(475/648)*x^4*exp(-1)-(950/81)*x^3*exp(-1)+(875/54)*x*exp(-x)-(9025/648)*exp(-2)*x^2-(40375/5184)*exp(-2)-(25/324)*exp(-1)-(5/216)*x^6-(5/9)*x^5+(9025/3888)*exp(2*x-2)+(1225/15552)*exp(-2*x)+(475/54)*x^2*exp(-1)-(1900/27)*x*exp(-1)-(875/81)*x^3+(875/108)*exp(-x)-(261025/2592)*x^2, f3[1](x) = (25/12096)*x^8+(25/378)*x^7-(175/7776)*x^6*exp(-1)+(475/972)*x^6-(175/324)*x^5*exp(-1)-(250/81)*x^5+(4375/1944)*x^4*exp(-1)+(6125/31104)*exp(-2)*x^4+(3125/486)*x^4-(5/6)*x^3*(125423/10368-(145/108)*exp(-1)-(5005/10368)*exp(-2))-(5/2)*(8539/1728+(785/162)*exp(-1)+(1645/576)*exp(-2))*x^2+(6375365/108864-(87101935/870912)*exp(-1)+(223525/20736)*exp(-2)-(3325/256)*exp(-1)*exp(-2)+(1415605/31104)*(exp(-1))^2)*x+(96778735/435456)*exp(-1)+(19625/31104)*exp(-2)-1711775/54432+(3325/128)*exp(-1)*exp(-2)-(1415605/15552)*(exp(-1))^2, t1[1](x) = -(1/432)*x^6-(1/18)*x^5-(805/2592)*x^4-(95/1296)*x^4*exp(-1)+(155/162)*x^3-(95/81)*x^3*exp(-1)-(4805/5184)*x^2+(2945/1296)*x^2*exp(-1)-(1805/1296)*exp(-2)*x^2+(47797/10368+(545/162)*exp(-1)-(95/1152)*exp(-2))*x+69995/10368-(5/648)*exp(-1)+(13585/10368)*exp(-2), t2[1](x) = -(1/432)*x^6-(1/18)*x^5-(1045/2592)*x^4-(95/1296)*x^4*exp(-1)+(5/162)*x^3+(95/27)*x*exp(x-1)+(95/54)*exp(x-1)-(95/81)*x^3*exp(-1)+(35/54)*x*exp(-x)+(35/12)*exp(-x)-(22805/5184)*x^2+(95/54)*x^2*exp(-1)-(1805/2592)*exp(2*x-2)-(245/10368)*exp(-2*x)-(1805/1296)*exp(-2)*x^2+(23609/3456-(155/81)*exp(-1)+(13585/10368)*exp(-2))*x+625/162-(1145/648)*exp(-1)+(6935/3456)*exp(-2), t3[1](x) = -(5/216)*x^6-(5/9)*x^5+(175/1296)*x^4*exp(-1)-(475/162)*x^4+(175/81)*x^3*exp(-1)+(1000/81)*x^3-(875/162)*x^2*exp(-1)-(1225/2592)*exp(-2)*x^2-(1250/81)*x^2+(125423/10368-(145/108)*exp(-1)-(5005/10368)*exp(-2))*x+8539/1728+(785/162)*exp(-1)+(1645/576)*exp(-2)}

 

(5/24192)*x^8+(5/756)*x^7+(805/15552)*x^6+(95/7776)*x^6*exp(-1)-(155/648)*x^5+(95/324)*x^5*exp(-1)+(24025/62208)*x^4-(14725/15552)*x^4*exp(-1)+(9025/15552)*exp(-2)*x^4-(5/6)*x^3*(47797/10368+(545/162)*exp(-1)-(95/1152)*exp(-2))-(5/2)*(69995/10368-(5/648)*exp(-1)+(13585/10368)*exp(-2))*x^2-(5/870912)*(7663012*exp(-1)*exp(1)-828590*exp(-2)*exp(1)-15854440*exp(-1)-2334780*exp(-2)+13548771*exp(1)-50721298)*x/exp(1)-(5/870912)*(7940828*exp(-1)*exp(1)-1310050*exp(-2)*exp(1)-15854440*exp(-1)-2334780*exp(-2)+11394973*exp(1)-50721298)/exp(1)

 

-(1750/27)*x-(6125/1296)*x^4-211025/1296+10*(23609/3456-(155/81)*exp(-1)+(13585/10368)*exp(-2))*x+exp(-x)*(77709335/870912+(3325/256)*exp(-2)-(1415605/31104)*exp(-1))+(5/435456)*exp(x)*(7927220*exp(-1)+1167390*exp(-2)+25360649)/exp(1)-(475/54)*x^2*exp(x-1)+(175/108)*exp(-x)*x^2-(475/648)*x^4*exp(-1)-(950/81)*x^3*exp(-1)+(875/54)*x*exp(-x)-(9025/648)*exp(-2)*x^2-(40375/5184)*exp(-2)-(25/324)*exp(-1)-(5/216)*x^6-(5/9)*x^5+(9025/3888)*exp(2*x-2)+(1225/15552)*exp(-2*x)+(475/54)*x^2*exp(-1)-(1900/27)*x*exp(-1)-(875/81)*x^3+(875/108)*exp(-x)-(261025/2592)*x^2

 

(25/12096)*x^8+(25/378)*x^7-(175/7776)*x^6*exp(-1)+(475/972)*x^6-(175/324)*x^5*exp(-1)-(250/81)*x^5+(4375/1944)*x^4*exp(-1)+(6125/31104)*exp(-2)*x^4+(3125/486)*x^4-(5/6)*x^3*(125423/10368-(145/108)*exp(-1)-(5005/10368)*exp(-2))-(5/2)*(8539/1728+(785/162)*exp(-1)+(1645/576)*exp(-2))*x^2+(6375365/108864-(87101935/870912)*exp(-1)+(223525/20736)*exp(-2)-(3325/256)*exp(-1)*exp(-2)+(1415605/31104)*(exp(-1))^2)*x+(96778735/435456)*exp(-1)+(19625/31104)*exp(-2)-1711775/54432+(3325/128)*exp(-1)*exp(-2)-(1415605/15552)*(exp(-1))^2

 

-(1/432)*x^6-(1/18)*x^5-(805/2592)*x^4-(95/1296)*x^4*exp(-1)+(155/162)*x^3-(95/81)*x^3*exp(-1)-(4805/5184)*x^2+(2945/1296)*x^2*exp(-1)-(1805/1296)*exp(-2)*x^2+(47797/10368+(545/162)*exp(-1)-(95/1152)*exp(-2))*x+69995/10368-(5/648)*exp(-1)+(13585/10368)*exp(-2)

 

-(1/432)*x^6-(1/18)*x^5-(1045/2592)*x^4-(95/1296)*x^4*exp(-1)+(5/162)*x^3+(95/27)*x*exp(x-1)+(95/54)*exp(x-1)-(95/81)*x^3*exp(-1)+(35/54)*x*exp(-x)+(35/12)*exp(-x)-(22805/5184)*x^2+(95/54)*x^2*exp(-1)-(1805/2592)*exp(2*x-2)-(245/10368)*exp(-2*x)-(1805/1296)*exp(-2)*x^2+(23609/3456-(155/81)*exp(-1)+(13585/10368)*exp(-2))*x+625/162-(1145/648)*exp(-1)+(6935/3456)*exp(-2)

 

-(5/216)*x^6-(5/9)*x^5+(175/1296)*x^4*exp(-1)-(475/162)*x^4+(175/81)*x^3*exp(-1)+(1000/81)*x^3-(875/162)*x^2*exp(-1)-(1225/2592)*exp(-2)*x^2-(1250/81)*x^2+(125423/10368-(145/108)*exp(-1)-(5005/10368)*exp(-2))*x+8539/1728+(785/162)*exp(-1)+(1645/576)*exp(-2)

(2)

 


 

Download badODEsys_(1).mw

 

Hi maple users,


Is there any way to get the solutions?
Kindly do the needful.

Hi @tomleslie 

I hope everything goes well

Is there any alter way to tackle the error

I have noticed one of your replaies, I have tried that one also.   I found the error.


Kindly look at one of your replaies

https://www.mapleprimes.com/questions/224981-Invalid-Subscript-Selector

Kindly do the needful to find a solution.
Thank you.

Dear @vv 

Many thanks for your reply.


Here we need to calculate the stream function. So should be calculated the integral constant values that time we can found the stream function.

Is this possible to found an integral constant(C1) value.

Dear @vv 

Thanks for your help.

Have a good day.

Dear @tomleslie 

Thanks for your explanation. Now I got clarity. I will cross-check the equation.

Have a good day.

Dear @tomleslie 

I have to calculate the values like 

L(0.71)=0 than f(x,t)=?

L(0.71)=0.1 than f(x,t)=?

..

L(0.71)=1 than f(x,t)=?.

and the x and t are 0.71 and 1.12.

But here various values of Z only the answer is coming.

The actual values are,

L(0.71)=0 than f(x,t)=0.5859

L(0.71)=0.1 than f(x,t)=0.5829

...

L(0.71)=1 than f(x,t)=0.

How to get the actual values.

Dear@Carl Love 

Thanks for the help

Have a good day.

Dear @Kitonum 

Thanks for the help

Have a good day.

Dear @tomleslie 

Thank you so much. 
I am would glad of your response.

Have a good day.

Dear @tomleslie 

Thanks for your help.

I am glad for your reply.

I am using the maple 18 version. In this, the first and second derivatives are not executing. Kindly help me to rectify the issue.pdeTut_(2).mw
 

  restart:

  ra:=2: b1:=1.41: na:=0.7: we:=0.5: eta[1]:=4*0.1: d:=0.5/1:
  xi:=0.1: m:=na: ea:=0.5: pr:=21: gr:=0.1: R:=0.9323556933:

  PDE1:=ra*(diff(f(x,t),t))=+b1*(1+ea*cos(t))+(1/(R^2))*((diff(f(x,t),x,x))+(1/x)*diff(f(x,t),x));
  IBC:= {D[1](f)(0,t)=0,f(1,t)=0,f(x,0)=0};

2*(diff(f(x, t), t)) = 1.41+.705*cos(t)+1.150367877*(diff(diff(f(x, t), x), x))+1.150367877*(diff(f(x, t), x))/x

 

{f(1, t) = 0, f(x, 0) = 0, (D[1](f))(0, t) = 0}

(1)

#
# Solve the PDE then use the returned methods 'plot', 'plot3d',
# and 'animate' to produce various plots
#
  sol :=  pdsolve({PDE1}, IBC, numeric) :
  sol:-plot(f(x, t), t = 1.2, linestyle = "solid", title = "Velocity Profile", labels = ["r", "f"]);
  sol:-plot3d(f(x, t), x=0..1, t=0..2, style=surface, color=cyan );
  sol:-animate( f(x,t), x=0..1, t=0..2);

 

 

 

#
# Use the 'value' method to facilitate computation of
# assorted numerical values
#
# Check which quantities are "immediately available"
#
  sol:-value(f(x,t), output=listprocedure);
#
# Aow get some numerical values from this basic method
#
  sol:-value(f(x,t))(0.5,0.5);
#
# For ease of use, one can assign the 'f(x,t)' procedure to,
# the name 'fN' and then compute the values, as in
#
  fN:=eval( f(x,t), sol:-value(f(x,t), output=listprocedure)):
  fN(0.5,0.5);

[x = proc () option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; evalf(args[1]) end proc, t = proc () option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; evalf(args[2]) end proc, f(x, t) = proc () local tv, xv, solnproc, stype, ndsol, vals; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; Digits := trunc(evalhf(Digits)); solnproc := proc (tv, xv) local INFO, errest, nd, dvars, dary, daryt, daryx, vals, msg, i, j; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; table( [( "soln_procedures" ) = array( 1 .. 1, [( 1 ) = (4538328098)  ] ) ] ) INFO := table( [( "minspcpoints" ) = 4, ( "allocspace" ) = 21, ( "fdepvars" ) = [f(x, t)], ( "PDEs" ) = [2*(diff(f(x, t), t))-141/100-(141/200)*cos(t)-(1150367877/1000000000)*(diff(diff(f(x, t), x), x))-(1150367877/1000000000)*(diff(f(x, t), x))/x], ( "spaceadaptive" ) = false, ( "solmat_ne" ) = 0, ( "soltimes" ) = Vector(3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8]), ( "indepvars" ) = [x, t], ( "vectorproc" ) = proc (v, vp, vpp, t, x, k, h, n, vec) local _s1, _s2, _s3, _s4, _s5, _s6, _s7, _s8, xi; _s1 := cos(t+(1/2)*k); _s4 := 2300735754*k; _s5 := 8000000000*h^2; _s6 := 1150367877*h*k; _s7 := 4000000000*k*h^2; _s8 := 2820000000*k*h^2*(_s1+2); vec[1] := 0; vec[n] := 0; for xi from 2 to n-1 do _s2 := -vp[xi-1]+vp[xi+1]; _s3 := vp[xi-1]-2*vp[xi]+vp[xi+1]; vec[xi] := (_s3*_s4*x[xi]+_s5*vp[xi]*x[xi]+_s2*_s6+_s8*x[xi])/(_s7*x[xi]) end do end proc, ( "banded" ) = true, ( "linear" ) = true, ( "bandwidth" ) = [1, 3], ( "intspace" ) = Matrix(21, 1, {(1, 1) = .0, (2, 1) = .0, (3, 1) = .0, (4, 1) = .0, (5, 1) = .0, (6, 1) = .0, (7, 1) = .0, (8, 1) = .0, (9, 1) = .0, (10, 1) = .0, (11, 1) = .0, (12, 1) = .0, (13, 1) = .0, (14, 1) = .0, (15, 1) = .0, (16, 1) = .0, (17, 1) = .0, (18, 1) = .0, (19, 1) = .0, (20, 1) = .0, (21, 1) = .0}, datatype = float[8], order = C_order), ( "solmat_i1" ) = 0, ( "method" ) = theta, ( "solvec4" ) = 0, ( "leftwidth" ) = 1, ( "totalwidth" ) = 7, ( "timeadaptive" ) = false, ( "timei" ) = 3, ( "initialized" ) = false, ( "t0" ) = 0, ( "rightwidth" ) = 0, ( "solvec3" ) = Vector(21, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0, (18) = .0, (19) = .0, (20) = .0, (21) = .0}, datatype = float[8]), ( "solmatrix" ) = Matrix(21, 7, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (1, 7) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (2, 7) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (3, 7) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (4, 7) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (5, 7) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0, (6, 7) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (7, 5) = .0, (7, 6) = .0, (7, 7) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0, (8, 5) = .0, (8, 6) = .0, (8, 7) = .0, (9, 1) = .0, (9, 2) = .0, (9, 3) = .0, (9, 4) = .0, (9, 5) = .0, (9, 6) = .0, (9, 7) = .0, (10, 1) = .0, (10, 2) = .0, (10, 3) = .0, (10, 4) = .0, (10, 5) = .0, (10, 6) = .0, (10, 7) = .0, (11, 1) = .0, (11, 2) = .0, (11, 3) = .0, (11, 4) = .0, (11, 5) = .0, (11, 6) = .0, (11, 7) = .0, (12, 1) = .0, (12, 2) = .0, (12, 3) = .0, (12, 4) = .0, (12, 5) = .0, (12, 6) = .0, (12, 7) = .0, (13, 1) = .0, (13, 2) = .0, (13, 3) = .0, (13, 4) = .0, (13, 5) = .0, (13, 6) = .0, (13, 7) = .0, (14, 1) = .0, (14, 2) = .0, (14, 3) = .0, (14, 4) = .0, (14, 5) = .0, (14, 6) = .0, (14, 7) = .0, (15, 1) = .0, (15, 2) = .0, (15, 3) = .0, (15, 4) = .0, (15, 5) = .0, (15, 6) = .0, (15, 7) = .0, (16, 1) = .0, (16, 2) = .0, (16, 3) = .0, (16, 4) = .0, (16, 5) = .0, (16, 6) = .0, (16, 7) = .0, (17, 1) = .0, (17, 2) = .0, (17, 3) = .0, (17, 4) = .0, (17, 5) = .0, (17, 6) = .0, (17, 7) = .0, (18, 1) = .0, (18, 2) = .0, (18, 3) = .0, (18, 4) = .0, (18, 5) = .0, (18, 6) = .0, (18, 7) = .0, (19, 1) = .0, (19, 2) = .0, (19, 3) = .0, (19, 4) = .0, (19, 5) = .0, (19, 6) = .0, (19, 7) = .0, (20, 1) = .0, (20, 2) = .0, (20, 3) = .0, (20, 4) = .0, (20, 5) = .0, (20, 6) = .0, (20, 7) = .0, (21, 1) = .0, (21, 2) = .0, (21, 3) = .0, (21, 4) = .0, (21, 5) = .0, (21, 6) = .0, (21, 7) = .0}, datatype = float[8], order = C_order), ( "depvars" ) = [f], ( "solmat_v" ) = Vector(147, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0, (18) = .0, (19) = .0, (20) = .0, (21) = .0, (22) = .0, (23) = .0, (24) = .0, (25) = .0, (26) = .0, (27) = .0, (28) = .0, (29) = .0, (30) = .0, (31) = .0, (32) = .0, (33) = .0, (34) = .0, (35) = .0, (36) = .0, (37) = .0, (38) = .0, (39) = .0, (40) = .0, (41) = .0, (42) = .0, (43) = .0, (44) = .0, (45) = .0, (46) = .0, (47) = .0, (48) = .0, (49) = .0, (50) = .0, (51) = .0, (52) = .0, (53) = .0, (54) = .0, (55) = .0, (56) = .0, (57) = .0, (58) = .0, (59) = .0, (60) = .0, (61) = .0, (62) = .0, (63) = .0, (64) = .0, (65) = .0, (66) = .0, (67) = .0, (68) = .0, (69) = .0, (70) = .0, (71) = .0, (72) = .0, (73) = .0, (74) = .0, (75) = .0, (76) = .0, (77) = .0, (78) = .0, (79) = .0, (80) = .0, (81) = .0, (82) = .0, (83) = .0, (84) = .0, (85) = .0, (86) = .0, (87) = .0, (88) = .0, (89) = .0, (90) = .0, (91) = .0, (92) = .0, (93) = .0, (94) = .0, (95) = .0, (96) = .0, (97) = .0, (98) = .0, (99) = .0, (100) = .0, (101) = .0, (102) = .0, (103) = .0, (104) = .0, (105) = .0, (106) = .0, (107) = .0, (108) = .0, (109) = .0, (110) = .0, (111) = .0, (112) = .0, (113) = .0, (114) = .0, (115) = .0, (116) = .0, (117) = .0, (118) = .0, (119) = .0, (120) = .0, (121) = .0, (122) = .0, (123) = .0, (124) = .0, (125) = .0, (126) = .0, (127) = .0, (128) = .0, (129) = .0, (130) = .0, (131) = .0, (132) = .0, (133) = .0, (134) = .0, (135) = .0, (136) = .0, (137) = .0, (138) = .0, (139) = .0, (140) = .0, (141) = .0, (142) = .0, (143) = .0, (144) = .0, (145) = .0, (146) = .0, (147) = .0}, datatype = float[8], order = C_order, attributes = [source_rtable = (Matrix(21, 7, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (1, 7) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (2, 7) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (3, 7) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (4, 7) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (5, 7) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0, (6, 7) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (7, 5) = .0, (7, 6) = .0, (7, 7) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0, (8, 5) = .0, (8, 6) = .0, (8, 7) = .0, (9, 1) = .0, (9, 2) = .0, (9, 3) = .0, (9, 4) = .0, (9, 5) = .0, (9, 6) = .0, (9, 7) = .0, (10, 1) = .0, (10, 2) = .0, (10, 3) = .0, (10, 4) = .0, (10, 5) = .0, (10, 6) = .0, (10, 7) = .0, (11, 1) = .0, (11, 2) = .0, (11, 3) = .0, (11, 4) = .0, (11, 5) = .0, (11, 6) = .0, (11, 7) = .0, (12, 1) = .0, (12, 2) = .0, (12, 3) = .0, (12, 4) = .0, (12, 5) = .0, (12, 6) = .0, (12, 7) = .0, (13, 1) = .0, (13, 2) = .0, (13, 3) = .0, (13, 4) = .0, (13, 5) = .0, (13, 6) = .0, (13, 7) = .0, (14, 1) = .0, (14, 2) = .0, (14, 3) = .0, (14, 4) = .0, (14, 5) = .0, (14, 6) = .0, (14, 7) = .0, (15, 1) = .0, (15, 2) = .0, (15, 3) = .0, (15, 4) = .0, (15, 5) = .0, (15, 6) = .0, (15, 7) = .0, (16, 1) = .0, (16, 2) = .0, (16, 3) = .0, (16, 4) = .0, (16, 5) = .0, (16, 6) = .0, (16, 7) = .0, (17, 1) = .0, (17, 2) = .0, (17, 3) = .0, (17, 4) = .0, (17, 5) = .0, (17, 6) = .0, (17, 7) = .0, (18, 1) = .0, (18, 2) = .0, (18, 3) = .0, (18, 4) = .0, (18, 5) = .0, (18, 6) = .0, (18, 7) = .0, (19, 1) = .0, (19, 2) = .0, (19, 3) = .0, (19, 4) = .0, (19, 5) = .0, (19, 6) = .0, (19, 7) = .0, (20, 1) = .0, (20, 2) = .0, (20, 3) = .0, (20, 4) = .0, (20, 5) = .0, (20, 6) = .0, (20, 7) = .0, (21, 1) = .0, (21, 2) = .0, (21, 3) = .0, (21, 4) = .0, (21, 5) = .0, (21, 6) = .0, (21, 7) = .0}, datatype = float[8], order = C_order))]), ( "spacepts" ) = 21, ( "ICS" ) = [0], ( "dependson" ) = [{1}], ( "spaceidx" ) = 1, ( "solspace" ) = Vector(21, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0, (18) = .0, (19) = .0, (20) = .0, (21) = 1.0}, datatype = float[8]), ( "adjusted" ) = false, ( "explicit" ) = false, ( "extrabcs" ) = [0], ( "startup_only" ) = false, ( "depdords" ) = [[[2, 1]]], ( "theta" ) = 1/2, ( "inputargs" ) = [{2*(diff(f(x, t), t)) = 1.41+.705*cos(t)+1.150367877*(diff(diff(f(x, t), x), x))+1.150367877*(diff(f(x, t), x))/x}, {f(1, t) = 0, f(x, 0) = 0, (D[1](f))(0, t) = 0}], ( "timestep" ) = 0.500000000000000e-1, ( "spacevar" ) = x, ( "solution" ) = Array(1..3, 1..21, 1..1, {(1, 1, 1) = .0, (1, 2, 1) = .0, (1, 3, 1) = .0, (1, 4, 1) = .0, (1, 5, 1) = .0, (1, 6, 1) = .0, (1, 7, 1) = .0, (1, 8, 1) = .0, (1, 9, 1) = .0, (1, 10, 1) = .0, (1, 11, 1) = .0, (1, 12, 1) = .0, (1, 13, 1) = .0, (1, 14, 1) = .0, (1, 15, 1) = .0, (1, 16, 1) = .0, (1, 17, 1) = .0, (1, 18, 1) = .0, (1, 19, 1) = .0, (1, 20, 1) = .0, (1, 21, 1) = .0, (2, 1, 1) = .0, (2, 2, 1) = .0, (2, 3, 1) = .0, (2, 4, 1) = .0, (2, 5, 1) = .0, (2, 6, 1) = .0, (2, 7, 1) = .0, (2, 8, 1) = .0, (2, 9, 1) = .0, (2, 10, 1) = .0, (2, 11, 1) = .0, (2, 12, 1) = .0, (2, 13, 1) = .0, (2, 14, 1) = .0, (2, 15, 1) = .0, (2, 16, 1) = .0, (2, 17, 1) = .0, (2, 18, 1) = .0, (2, 19, 1) = .0, (2, 20, 1) = .0, (2, 21, 1) = .0, (3, 1, 1) = .0, (3, 2, 1) = .0, (3, 3, 1) = .0, (3, 4, 1) = .0, (3, 5, 1) = .0, (3, 6, 1) = .0, (3, 7, 1) = .0, (3, 8, 1) = .0, (3, 9, 1) = .0, (3, 10, 1) = .0, (3, 11, 1) = .0, (3, 12, 1) = .0, (3, 13, 1) = .0, (3, 14, 1) = .0, (3, 15, 1) = .0, (3, 16, 1) = .0, (3, 17, 1) = .0, (3, 18, 1) = .0, (3, 19, 1) = .0, (3, 20, 1) = .0, (3, 21, 1) = .0}, datatype = float[8], order = C_order), ( "depeqn" ) = [1], ( "vectorhf" ) = true, ( "maxords" ) = [2, 1], ( "timeidx" ) = 2, ( "eqndep" ) = [1], ( "erroraccum" ) = true, ( "solvec2" ) = Vector(21, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0, (18) = .0, (19) = .0, (20) = .0, (21) = .0}, datatype = float[8]), ( "spacestep" ) = 0.500000000000000e-1, ( "norigdepvars" ) = 1, ( "autonomous" ) = true, ( "stages" ) = 1, ( "solvec5" ) = 0, ( "depshift" ) = [1], ( "periodic" ) = false, ( "mixed" ) = false, ( "solmat_is" ) = 0, ( "matrixproc" ) = proc (v, vp, vpp, t, x, k, h, n, mat) local _s1, _s2, _s3, xi; _s1 := -1150367877*h; _s2 := 4000000000*h^2; _s3 := (1/1000000000)*(2000000000*h^2+1150367877*k)/(k*h^2); mat[3] := -(3/2)/h; mat[4] := 2/h; mat[5] := -(1/2)/h; mat[7*n-4] := 1; for xi from 2 to n-1 do mat[7*xi-4] := _s3; mat[7*xi-5] := -(_s1+2300735754*x[xi])/(_s2*x[xi]); mat[7*xi-3] := (_s1-2300735754*x[xi])/(_s2*x[xi]) end do end proc, ( "solvec1" ) = Vector(21, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0, (18) = .0, (19) = .0, (20) = .0, (21) = .0}, datatype = float[8]), ( "IBC" ) = b, ( "eqnords" ) = [[2, 1]], ( "timevar" ) = t, ( "solmat_i2" ) = 0, ( "BCS", 1 ) = {[[1, 0, 1], b[1, 0, 1]], [[1, 1, 0], b[1, 1, 0]]}, ( "pts", x ) = [0, 1], ( "errorest" ) = false, ( "matrixhf" ) = true, ( "multidep" ) = [false, false], ( "depords" ) = [[2, 1]] ] ); if xv = "left" then return INFO["solspace"][1] elif xv = "right" then return INFO["solspace"][INFO["spacepts"]] elif tv = "start" then return INFO["t0"] elif not (type(tv, 'numeric') and type(xv, 'numeric')) then error "non-numeric input" end if; if xv < INFO["solspace"][1] or INFO["solspace"][INFO["spacepts"]] < xv then error "requested %1 value must be in the range %2..%3", INFO["spacevar"], INFO["solspace"][1], INFO["solspace"][INFO["spacepts"]] end if; dary := Vector(3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8]); daryt := 0; daryx := 0; dvars := [proc (t, x, u) u[1] end proc]; errest := false; nd := nops(INFO["depvars"]); if dary[nd+1] <> tv then try `pdsolve/numeric/evolve_solution`(INFO, tv) catch: msg := StringTools:-FormatMessage(lastexception[2 .. -1]); if tv < INFO["t0"] then error cat("unable to compute solution for %1<%2:
", msg), INFO["timevar"], INFO["failtime"] else error cat("unable to compute solution for %1>%2:
", msg), INFO["timevar"], INFO["failtime"] end if end try end if; if dary[nd+1] <> tv or dary[nd+2] <> xv then `pdsolve/interp2dto0d`(3, INFO["soltimes"], INFO["spacepts"], INFO["solspace"], nops(INFO["depvars"]), INFO["solution"], true, tv, xv, dary); if errest then `pdsolve/interp2dto0d`(3, INFO["soltimes"], INFO["spacepts"], INFO["err_t"], nops(INFO["depvars"]), INFO["solution"], true, tv, xv, daryt); `pdsolve/interp2dto0d`(3, INFO["soltimes"], INFO["spacepts"], INFO["err_x"], nops(INFO["depvars"]), INFO["solution"], true, tv, xv, daryx) end if end if; dary[nd+1] := tv; dary[nd+2] := xv; if dvars = [] then [seq(dary[i], i = 1 .. INFO["norigdepvars"])] else vals := NULL; for i to nops(dvars) do j := eval(dvars[i]); try if errest then vals := vals, evalhf(j(tv, xv, dary, daryt, daryx)) else vals := vals, evalhf(j(tv, xv, dary)) end if catch: userinfo(5, `pdsolve/numeric`, `evalhf failure`); try if errest then vals := vals, j(tv, xv, dary, daryt, daryx) else vals := vals, j(tv, xv, dary) end if catch: vals := vals, undefined end try end try end do; [vals] end if end proc; stype := "2nd"; if nargs = 1 then if args[1] = "left" then return solnproc(0, "left") elif args[1] = "right" then return solnproc(0, "right") elif args[1] = "start" then return solnproc("start", 0) else error "too few arguments to solution procedure" end if elif nargs = 2 then if stype = "1st" then tv := evalf(args[1]); xv := evalf(args[2]) else tv := evalf(args[2]); xv := evalf(args[1]) end if; if not (type(tv, 'numeric') and type(xv, 'numeric')) then if procname <> unknown then return ('procname')(args[1 .. nargs]) else ndsol := pointto(solnproc("soln_procedures")[1]); return ('ndsol')(args[1 .. nargs]) end if end if else error "incorrect arguments to solution procedure" end if; vals := solnproc(tv, xv); vals[1] end proc]

 

[x = .5, t = .5, f(x, t) = .274730832428660144]

 

.274730832428660144

(2)

#
# The solution module returned by pdsolve() does not
# contain any derivatives, so these have to be computed
# explicitly. The simplest method is to use the 'D'
# operator.
#
# Differentiation wrt 'x' evaluated at x=0.2, t=1.2
#
  D[1](fN)(0.2, 1.2);
#
# Differentiation twice wrt 'x' and evaluate at x=0.2,
# t=1.2
#
  D[1,1](fN)(0.2, 1.2);
#
# Differentiation wrt 't' evaluated at x=0.2, t=1.2
#
  D[2](fN)(0.2, 1.2);
#
# Plot the first and second derivatives of f(x,t) wrt 'x' for t=1.2
# Note the "glitch" in the second derivative
#
  plot( [ D[1](fN)(x, 1.2),
          D[1, 1](fN)(x, 1.2)
        ],
        x=0..1,
        color=[red, blue]
      );
#
# Plot the first and second derivatives of f(x,t) wrt 't' for x=0.5
#
  plot( [ D[2](fN)(0.5, t),
          D[2, 2](fN)(0.5, t)
        ],
        t=0..2,
        color=[red, blue],
        axes=boxed
      );
  

(D[1](fN))(.2, 1.2)

 

(D[1, 1](fN))(.2, 1.2)

 

(D[2](fN))(.2, 1.2)

 

 

 

  M:= Matrix([ [ "x", "f(x,t)", "diff(f(x,t),x)", "diff(f(x,t),x,x)"],
                  seq( [j, fN(j, 1.2), D[1](fN)(j,1.2), D[1,1](fN)(j,1.2)], j=0.1..0.9, 0.1)
               ]
            );
 # ExcelTools:-Export( M, "C:/Users/TomLeslie/Desktop/pdeDat.xlsx")

M := Matrix(10, 4, {(1, 1) = "x", (1, 2) = "f(x,t)", (1, 3) = "diff(f(x,t),x)", (1, 4) = "diff(f(x,t),x,x)", (2, 1) = .1, (2, 2) = .386450395099301292, (2, 3) = (D[1](fN))(.1, 1.2), (2, 4) = (D[1, 1](fN))(.1, 1.2), (3, 1) = .2, (3, 2) = .374519447545877126, (3, 3) = (D[1](fN))(.2, 1.2), (3, 4) = (D[1, 1](fN))(.2, 1.2), (4, 1) = .3, (4, 2) = .354660645957600662, (4, 3) = (D[1](fN))(.3, 1.2), (4, 4) = (D[1, 1](fN))(.3, 1.2), (5, 1) = .4, (5, 2) = .326914868358544664, (5, 3) = (D[1](fN))(.4, 1.2), (5, 4) = (D[1, 1](fN))(.4, 1.2), (6, 1) = .5, (6, 2) = .291342358954074454, (6, 3) = (D[1](fN))(.5, 1.2), (6, 4) = (D[1, 1](fN))(.5, 1.2), (7, 1) = .6, (7, 2) = .248026334799754834, (7, 3) = (D[1](fN))(.6, 1.2), (7, 4) = (D[1, 1](fN))(.6, 1.2), (8, 1) = .7, (8, 2) = .197076684864131464, (8, 3) = (D[1](fN))(.7, 1.2), (8, 4) = (D[1, 1](fN))(.7, 1.2), (9, 1) = .8, (9, 2) = .138628396303586866, (9, 3) = (D[1](fN))(.8, 1.2), (9, 4) = (D[1, 1](fN))(.8, 1.2), (10, 1) = .9, (10, 2) = 0.728807948292487240e-1, (10, 3) = (D[1](fN))(.9, 1.2), (10, 4) = (D[1, 1](fN))(.9, 1.2)})

(3)

 


 

Download pdeTut_(2).mw
 

  restart:

  ra:=2: b1:=1.41: na:=0.7: we:=0.5: eta[1]:=4*0.1: d:=0.5/1:
  xi:=0.1: m:=na: ea:=0.5: pr:=21: gr:=0.1: R:=0.9323556933:

  PDE1:=ra*(diff(f(x,t),t))=+b1*(1+ea*cos(t))+(1/(R^2))*((diff(f(x,t),x,x))+(1/x)*diff(f(x,t),x));
  IBC:= {D[1](f)(0,t)=0,f(1,t)=0,f(x,0)=0};

2*(diff(f(x, t), t)) = 1.41+.705*cos(t)+1.150367877*(diff(diff(f(x, t), x), x))+1.150367877*(diff(f(x, t), x))/x

 

{f(1, t) = 0, f(x, 0) = 0, (D[1](f))(0, t) = 0}

(1)

#
# Solve the PDE then use the returned methods 'plot', 'plot3d',
# and 'animate' to produce various plots
#
  sol :=  pdsolve({PDE1}, IBC, numeric) :
  sol:-plot(f(x, t), t = 1.2, linestyle = "solid", title = "Velocity Profile", labels = ["r", "f"]);
  sol:-plot3d(f(x, t), x=0..1, t=0..2, style=surface, color=cyan );
  sol:-animate( f(x,t), x=0..1, t=0..2);

 

 

 

#
# Use the 'value' method to facilitate computation of
# assorted numerical values
#
# Check which quantities are "immediately available"
#
  sol:-value(f(x,t), output=listprocedure);
#
# Aow get some numerical values from this basic method
#
  sol:-value(f(x,t))(0.5,0.5);
#
# For ease of use, one can assign the 'f(x,t)' procedure to,
# the name 'fN' and then compute the values, as in
#
  fN:=eval( f(x,t), sol:-value(f(x,t), output=listprocedure)):
  fN(0.5,0.5);

[x = proc () option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; evalf(args[1]) end proc, t = proc () option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; evalf(args[2]) end proc, f(x, t) = proc () local tv, xv, solnproc, stype, ndsol, vals; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; Digits := trunc(evalhf(Digits)); solnproc := proc (tv, xv) local INFO, errest, nd, dvars, dary, daryt, daryx, vals, msg, i, j; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; table( [( "soln_procedures" ) = array( 1 .. 1, [( 1 ) = (4538328098)  ] ) ] ) INFO := table( [( "minspcpoints" ) = 4, ( "allocspace" ) = 21, ( "fdepvars" ) = [f(x, t)], ( "PDEs" ) = [2*(diff(f(x, t), t))-141/100-(141/200)*cos(t)-(1150367877/1000000000)*(diff(diff(f(x, t), x), x))-(1150367877/1000000000)*(diff(f(x, t), x))/x], ( "spaceadaptive" ) = false, ( "solmat_ne" ) = 0, ( "soltimes" ) = Vector(3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8]), ( "indepvars" ) = [x, t], ( "vectorproc" ) = proc (v, vp, vpp, t, x, k, h, n, vec) local _s1, _s2, _s3, _s4, _s5, _s6, _s7, _s8, xi; _s1 := cos(t+(1/2)*k); _s4 := 2300735754*k; _s5 := 8000000000*h^2; _s6 := 1150367877*h*k; _s7 := 4000000000*k*h^2; _s8 := 2820000000*k*h^2*(_s1+2); vec[1] := 0; vec[n] := 0; for xi from 2 to n-1 do _s2 := -vp[xi-1]+vp[xi+1]; _s3 := vp[xi-1]-2*vp[xi]+vp[xi+1]; vec[xi] := (_s3*_s4*x[xi]+_s5*vp[xi]*x[xi]+_s2*_s6+_s8*x[xi])/(_s7*x[xi]) end do end proc, ( "banded" ) = true, ( "linear" ) = true, ( "bandwidth" ) = [1, 3], ( "intspace" ) = Matrix(21, 1, {(1, 1) = .0, (2, 1) = .0, (3, 1) = .0, (4, 1) = .0, (5, 1) = .0, (6, 1) = .0, (7, 1) = .0, (8, 1) = .0, (9, 1) = .0, (10, 1) = .0, (11, 1) = .0, (12, 1) = .0, (13, 1) = .0, (14, 1) = .0, (15, 1) = .0, (16, 1) = .0, (17, 1) = .0, (18, 1) = .0, (19, 1) = .0, (20, 1) = .0, (21, 1) = .0}, datatype = float[8], order = C_order), ( "solmat_i1" ) = 0, ( "method" ) = theta, ( "solvec4" ) = 0, ( "leftwidth" ) = 1, ( "totalwidth" ) = 7, ( "timeadaptive" ) = false, ( "timei" ) = 3, ( "initialized" ) = false, ( "t0" ) = 0, ( "rightwidth" ) = 0, ( "solvec3" ) = Vector(21, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0, (18) = .0, (19) = .0, (20) = .0, (21) = .0}, datatype = float[8]), ( "solmatrix" ) = Matrix(21, 7, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (1, 7) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (2, 7) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (3, 7) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (4, 7) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (5, 7) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0, (6, 7) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (7, 5) = .0, (7, 6) = .0, (7, 7) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0, (8, 5) = .0, (8, 6) = .0, (8, 7) = .0, (9, 1) = .0, (9, 2) = .0, (9, 3) = .0, (9, 4) = .0, (9, 5) = .0, (9, 6) = .0, (9, 7) = .0, (10, 1) = .0, (10, 2) = .0, (10, 3) = .0, (10, 4) = .0, (10, 5) = .0, (10, 6) = .0, (10, 7) = .0, (11, 1) = .0, (11, 2) = .0, (11, 3) = .0, (11, 4) = .0, (11, 5) = .0, (11, 6) = .0, (11, 7) = .0, (12, 1) = .0, (12, 2) = .0, (12, 3) = .0, (12, 4) = .0, (12, 5) = .0, (12, 6) = .0, (12, 7) = .0, (13, 1) = .0, (13, 2) = .0, (13, 3) = .0, (13, 4) = .0, (13, 5) = .0, (13, 6) = .0, (13, 7) = .0, (14, 1) = .0, (14, 2) = .0, (14, 3) = .0, (14, 4) = .0, (14, 5) = .0, (14, 6) = .0, (14, 7) = .0, (15, 1) = .0, (15, 2) = .0, (15, 3) = .0, (15, 4) = .0, (15, 5) = .0, (15, 6) = .0, (15, 7) = .0, (16, 1) = .0, (16, 2) = .0, (16, 3) = .0, (16, 4) = .0, (16, 5) = .0, (16, 6) = .0, (16, 7) = .0, (17, 1) = .0, (17, 2) = .0, (17, 3) = .0, (17, 4) = .0, (17, 5) = .0, (17, 6) = .0, (17, 7) = .0, (18, 1) = .0, (18, 2) = .0, (18, 3) = .0, (18, 4) = .0, (18, 5) = .0, (18, 6) = .0, (18, 7) = .0, (19, 1) = .0, (19, 2) = .0, (19, 3) = .0, (19, 4) = .0, (19, 5) = .0, (19, 6) = .0, (19, 7) = .0, (20, 1) = .0, (20, 2) = .0, (20, 3) = .0, (20, 4) = .0, (20, 5) = .0, (20, 6) = .0, (20, 7) = .0, (21, 1) = .0, (21, 2) = .0, (21, 3) = .0, (21, 4) = .0, (21, 5) = .0, (21, 6) = .0, (21, 7) = .0}, datatype = float[8], order = C_order), ( "depvars" ) = [f], ( "solmat_v" ) = Vector(147, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0, (18) = .0, (19) = .0, (20) = .0, (21) = .0, (22) = .0, (23) = .0, (24) = .0, (25) = .0, (26) = .0, (27) = .0, (28) = .0, (29) = .0, (30) = .0, (31) = .0, (32) = .0, (33) = .0, (34) = .0, (35) = .0, (36) = .0, (37) = .0, (38) = .0, (39) = .0, (40) = .0, (41) = .0, (42) = .0, (43) = .0, (44) = .0, (45) = .0, (46) = .0, (47) = .0, (48) = .0, (49) = .0, (50) = .0, (51) = .0, (52) = .0, (53) = .0, (54) = .0, (55) = .0, (56) = .0, (57) = .0, (58) = .0, (59) = .0, (60) = .0, (61) = .0, (62) = .0, (63) = .0, (64) = .0, (65) = .0, (66) = .0, (67) = .0, (68) = .0, (69) = .0, (70) = .0, (71) = .0, (72) = .0, (73) = .0, (74) = .0, (75) = .0, (76) = .0, (77) = .0, (78) = .0, (79) = .0, (80) = .0, (81) = .0, (82) = .0, (83) = .0, (84) = .0, (85) = .0, (86) = .0, (87) = .0, (88) = .0, (89) = .0, (90) = .0, (91) = .0, (92) = .0, (93) = .0, (94) = .0, (95) = .0, (96) = .0, (97) = .0, (98) = .0, (99) = .0, (100) = .0, (101) = .0, (102) = .0, (103) = .0, (104) = .0, (105) = .0, (106) = .0, (107) = .0, (108) = .0, (109) = .0, (110) = .0, (111) = .0, (112) = .0, (113) = .0, (114) = .0, (115) = .0, (116) = .0, (117) = .0, (118) = .0, (119) = .0, (120) = .0, (121) = .0, (122) = .0, (123) = .0, (124) = .0, (125) = .0, (126) = .0, (127) = .0, (128) = .0, (129) = .0, (130) = .0, (131) = .0, (132) = .0, (133) = .0, (134) = .0, (135) = .0, (136) = .0, (137) = .0, (138) = .0, (139) = .0, (140) = .0, (141) = .0, (142) = .0, (143) = .0, (144) = .0, (145) = .0, (146) = .0, (147) = .0}, datatype = float[8], order = C_order, attributes = [source_rtable = (Matrix(21, 7, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (1, 7) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (2, 7) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (3, 7) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (4, 7) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (5, 7) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0, (6, 7) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (7, 5) = .0, (7, 6) = .0, (7, 7) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0, (8, 5) = .0, (8, 6) = .0, (8, 7) = .0, (9, 1) = .0, (9, 2) = .0, (9, 3) = .0, (9, 4) = .0, (9, 5) = .0, (9, 6) = .0, (9, 7) = .0, (10, 1) = .0, (10, 2) = .0, (10, 3) = .0, (10, 4) = .0, (10, 5) = .0, (10, 6) = .0, (10, 7) = .0, (11, 1) = .0, (11, 2) = .0, (11, 3) = .0, (11, 4) = .0, (11, 5) = .0, (11, 6) = .0, (11, 7) = .0, (12, 1) = .0, (12, 2) = .0, (12, 3) = .0, (12, 4) = .0, (12, 5) = .0, (12, 6) = .0, (12, 7) = .0, (13, 1) = .0, (13, 2) = .0, (13, 3) = .0, (13, 4) = .0, (13, 5) = .0, (13, 6) = .0, (13, 7) = .0, (14, 1) = .0, (14, 2) = .0, (14, 3) = .0, (14, 4) = .0, (14, 5) = .0, (14, 6) = .0, (14, 7) = .0, (15, 1) = .0, (15, 2) = .0, (15, 3) = .0, (15, 4) = .0, (15, 5) = .0, (15, 6) = .0, (15, 7) = .0, (16, 1) = .0, (16, 2) = .0, (16, 3) = .0, (16, 4) = .0, (16, 5) = .0, (16, 6) = .0, (16, 7) = .0, (17, 1) = .0, (17, 2) = .0, (17, 3) = .0, (17, 4) = .0, (17, 5) = .0, (17, 6) = .0, (17, 7) = .0, (18, 1) = .0, (18, 2) = .0, (18, 3) = .0, (18, 4) = .0, (18, 5) = .0, (18, 6) = .0, (18, 7) = .0, (19, 1) = .0, (19, 2) = .0, (19, 3) = .0, (19, 4) = .0, (19, 5) = .0, (19, 6) = .0, (19, 7) = .0, (20, 1) = .0, (20, 2) = .0, (20, 3) = .0, (20, 4) = .0, (20, 5) = .0, (20, 6) = .0, (20, 7) = .0, (21, 1) = .0, (21, 2) = .0, (21, 3) = .0, (21, 4) = .0, (21, 5) = .0, (21, 6) = .0, (21, 7) = .0}, datatype = float[8], order = C_order))]), ( "spacepts" ) = 21, ( "ICS" ) = [0], ( "dependson" ) = [{1}], ( "spaceidx" ) = 1, ( "solspace" ) = Vector(21, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0, (18) = .0, (19) = .0, (20) = .0, (21) = 1.0}, datatype = float[8]), ( "adjusted" ) = false, ( "explicit" ) = false, ( "extrabcs" ) = [0], ( "startup_only" ) = false, ( "depdords" ) = [[[2, 1]]], ( "theta" ) = 1/2, ( "inputargs" ) = [{2*(diff(f(x, t), t)) = 1.41+.705*cos(t)+1.150367877*(diff(diff(f(x, t), x), x))+1.150367877*(diff(f(x, t), x))/x}, {f(1, t) = 0, f(x, 0) = 0, (D[1](f))(0, t) = 0}], ( "timestep" ) = 0.500000000000000e-1, ( "spacevar" ) = x, ( "solution" ) = Array(1..3, 1..21, 1..1, {(1, 1, 1) = .0, (1, 2, 1) = .0, (1, 3, 1) = .0, (1, 4, 1) = .0, (1, 5, 1) = .0, (1, 6, 1) = .0, (1, 7, 1) = .0, (1, 8, 1) = .0, (1, 9, 1) = .0, (1, 10, 1) = .0, (1, 11, 1) = .0, (1, 12, 1) = .0, (1, 13, 1) = .0, (1, 14, 1) = .0, (1, 15, 1) = .0, (1, 16, 1) = .0, (1, 17, 1) = .0, (1, 18, 1) = .0, (1, 19, 1) = .0, (1, 20, 1) = .0, (1, 21, 1) = .0, (2, 1, 1) = .0, (2, 2, 1) = .0, (2, 3, 1) = .0, (2, 4, 1) = .0, (2, 5, 1) = .0, (2, 6, 1) = .0, (2, 7, 1) = .0, (2, 8, 1) = .0, (2, 9, 1) = .0, (2, 10, 1) = .0, (2, 11, 1) = .0, (2, 12, 1) = .0, (2, 13, 1) = .0, (2, 14, 1) = .0, (2, 15, 1) = .0, (2, 16, 1) = .0, (2, 17, 1) = .0, (2, 18, 1) = .0, (2, 19, 1) = .0, (2, 20, 1) = .0, (2, 21, 1) = .0, (3, 1, 1) = .0, (3, 2, 1) = .0, (3, 3, 1) = .0, (3, 4, 1) = .0, (3, 5, 1) = .0, (3, 6, 1) = .0, (3, 7, 1) = .0, (3, 8, 1) = .0, (3, 9, 1) = .0, (3, 10, 1) = .0, (3, 11, 1) = .0, (3, 12, 1) = .0, (3, 13, 1) = .0, (3, 14, 1) = .0, (3, 15, 1) = .0, (3, 16, 1) = .0, (3, 17, 1) = .0, (3, 18, 1) = .0, (3, 19, 1) = .0, (3, 20, 1) = .0, (3, 21, 1) = .0}, datatype = float[8], order = C_order), ( "depeqn" ) = [1], ( "vectorhf" ) = true, ( "maxords" ) = [2, 1], ( "timeidx" ) = 2, ( "eqndep" ) = [1], ( "erroraccum" ) = true, ( "solvec2" ) = Vector(21, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0, (18) = .0, (19) = .0, (20) = .0, (21) = .0}, datatype = float[8]), ( "spacestep" ) = 0.500000000000000e-1, ( "norigdepvars" ) = 1, ( "autonomous" ) = true, ( "stages" ) = 1, ( "solvec5" ) = 0, ( "depshift" ) = [1], ( "periodic" ) = false, ( "mixed" ) = false, ( "solmat_is" ) = 0, ( "matrixproc" ) = proc (v, vp, vpp, t, x, k, h, n, mat) local _s1, _s2, _s3, xi; _s1 := -1150367877*h; _s2 := 4000000000*h^2; _s3 := (1/1000000000)*(2000000000*h^2+1150367877*k)/(k*h^2); mat[3] := -(3/2)/h; mat[4] := 2/h; mat[5] := -(1/2)/h; mat[7*n-4] := 1; for xi from 2 to n-1 do mat[7*xi-4] := _s3; mat[7*xi-5] := -(_s1+2300735754*x[xi])/(_s2*x[xi]); mat[7*xi-3] := (_s1-2300735754*x[xi])/(_s2*x[xi]) end do end proc, ( "solvec1" ) = Vector(21, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0, (18) = .0, (19) = .0, (20) = .0, (21) = .0}, datatype = float[8]), ( "IBC" ) = b, ( "eqnords" ) = [[2, 1]], ( "timevar" ) = t, ( "solmat_i2" ) = 0, ( "BCS", 1 ) = {[[1, 0, 1], b[1, 0, 1]], [[1, 1, 0], b[1, 1, 0]]}, ( "pts", x ) = [0, 1], ( "errorest" ) = false, ( "matrixhf" ) = true, ( "multidep" ) = [false, false], ( "depords" ) = [[2, 1]] ] ); if xv = "left" then return INFO["solspace"][1] elif xv = "right" then return INFO["solspace"][INFO["spacepts"]] elif tv = "start" then return INFO["t0"] elif not (type(tv, 'numeric') and type(xv, 'numeric')) then error "non-numeric input" end if; if xv < INFO["solspace"][1] or INFO["solspace"][INFO["spacepts"]] < xv then error "requested %1 value must be in the range %2..%3", INFO["spacevar"], INFO["solspace"][1], INFO["solspace"][INFO["spacepts"]] end if; dary := Vector(3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8]); daryt := 0; daryx := 0; dvars := [proc (t, x, u) u[1] end proc]; errest := false; nd := nops(INFO["depvars"]); if dary[nd+1] <> tv then try `pdsolve/numeric/evolve_solution`(INFO, tv) catch: msg := StringTools:-FormatMessage(lastexception[2 .. -1]); if tv < INFO["t0"] then error cat("unable to compute solution for %1<%2:
", msg), INFO["timevar"], INFO["failtime"] else error cat("unable to compute solution for %1>%2:
", msg), INFO["timevar"], INFO["failtime"] end if end try end if; if dary[nd+1] <> tv or dary[nd+2] <> xv then `pdsolve/interp2dto0d`(3, INFO["soltimes"], INFO["spacepts"], INFO["solspace"], nops(INFO["depvars"]), INFO["solution"], true, tv, xv, dary); if errest then `pdsolve/interp2dto0d`(3, INFO["soltimes"], INFO["spacepts"], INFO["err_t"], nops(INFO["depvars"]), INFO["solution"], true, tv, xv, daryt); `pdsolve/interp2dto0d`(3, INFO["soltimes"], INFO["spacepts"], INFO["err_x"], nops(INFO["depvars"]), INFO["solution"], true, tv, xv, daryx) end if end if; dary[nd+1] := tv; dary[nd+2] := xv; if dvars = [] then [seq(dary[i], i = 1 .. INFO["norigdepvars"])] else vals := NULL; for i to nops(dvars) do j := eval(dvars[i]); try if errest then vals := vals, evalhf(j(tv, xv, dary, daryt, daryx)) else vals := vals, evalhf(j(tv, xv, dary)) end if catch: userinfo(5, `pdsolve/numeric`, `evalhf failure`); try if errest then vals := vals, j(tv, xv, dary, daryt, daryx) else vals := vals, j(tv, xv, dary) end if catch: vals := vals, undefined end try end try end do; [vals] end if end proc; stype := "2nd"; if nargs = 1 then if args[1] = "left" then return solnproc(0, "left") elif args[1] = "right" then return solnproc(0, "right") elif args[1] = "start" then return solnproc("start", 0) else error "too few arguments to solution procedure" end if elif nargs = 2 then if stype = "1st" then tv := evalf(args[1]); xv := evalf(args[2]) else tv := evalf(args[2]); xv := evalf(args[1]) end if; if not (type(tv, 'numeric') and type(xv, 'numeric')) then if procname <> unknown then return ('procname')(args[1 .. nargs]) else ndsol := pointto(solnproc("soln_procedures")[1]); return ('ndsol')(args[1 .. nargs]) end if end if else error "incorrect arguments to solution procedure" end if; vals := solnproc(tv, xv); vals[1] end proc]

 

[x = .5, t = .5, f(x, t) = .274730832428660144]

 

.274730832428660144

(2)

#
# The solution module returned by pdsolve() does not
# contain any derivatives, so these have to be computed
# explicitly. The simplest method is to use the 'D'
# operator.
#
# Differentiation wrt 'x' evaluated at x=0.2, t=1.2
#
  D[1](fN)(0.2, 1.2);
#
# Differentiation twice wrt 'x' and evaluate at x=0.2,
# t=1.2
#
  D[1,1](fN)(0.2, 1.2);
#
# Differentiation wrt 't' evaluated at x=0.2, t=1.2
#
  D[2](fN)(0.2, 1.2);
#
# Plot the first and second derivatives of f(x,t) wrt 'x' for t=1.2
# Note the "glitch" in the second derivative
#
  plot( [ D[1](fN)(x, 1.2),
          D[1, 1](fN)(x, 1.2)
        ],
        x=0..1,
        color=[red, blue]
      );
#
# Plot the first and second derivatives of f(x,t) wrt 't' for x=0.5
#
  plot( [ D[2](fN)(0.5, t),
          D[2, 2](fN)(0.5, t)
        ],
        t=0..2,
        color=[red, blue],
        axes=boxed
      );
  

(D[1](fN))(.2, 1.2)

 

(D[1, 1](fN))(.2, 1.2)

 

(D[2](fN))(.2, 1.2)

 

 

 

  M:= Matrix([ [ "x", "f(x,t)", "diff(f(x,t),x)", "diff(f(x,t),x,x)"],
                  seq( [j, fN(j, 1.2), D[1](fN)(j,1.2), D[1,1](fN)(j,1.2)], j=0.1..0.9, 0.1)
               ]
            );
 # ExcelTools:-Export( M, "C:/Users/TomLeslie/Desktop/pdeDat.xlsx")

M := Matrix(10, 4, {(1, 1) = "x", (1, 2) = "f(x,t)", (1, 3) = "diff(f(x,t),x)", (1, 4) = "diff(f(x,t),x,x)", (2, 1) = .1, (2, 2) = .386450395099301292, (2, 3) = (D[1](fN))(.1, 1.2), (2, 4) = (D[1, 1](fN))(.1, 1.2), (3, 1) = .2, (3, 2) = .374519447545877126, (3, 3) = (D[1](fN))(.2, 1.2), (3, 4) = (D[1, 1](fN))(.2, 1.2), (4, 1) = .3, (4, 2) = .354660645957600662, (4, 3) = (D[1](fN))(.3, 1.2), (4, 4) = (D[1, 1](fN))(.3, 1.2), (5, 1) = .4, (5, 2) = .326914868358544664, (5, 3) = (D[1](fN))(.4, 1.2), (5, 4) = (D[1, 1](fN))(.4, 1.2), (6, 1) = .5, (6, 2) = .291342358954074454, (6, 3) = (D[1](fN))(.5, 1.2), (6, 4) = (D[1, 1](fN))(.5, 1.2), (7, 1) = .6, (7, 2) = .248026334799754834, (7, 3) = (D[1](fN))(.6, 1.2), (7, 4) = (D[1, 1](fN))(.6, 1.2), (8, 1) = .7, (8, 2) = .197076684864131464, (8, 3) = (D[1](fN))(.7, 1.2), (8, 4) = (D[1, 1](fN))(.7, 1.2), (9, 1) = .8, (9, 2) = .138628396303586866, (9, 3) = (D[1](fN))(.8, 1.2), (9, 4) = (D[1, 1](fN))(.8, 1.2), (10, 1) = .9, (10, 2) = 0.728807948292487240e-1, (10, 3) = (D[1](fN))(.9, 1.2), (10, 4) = (D[1, 1](fN))(.9, 1.2)})

(3)

 


 

Download pdeTut_(2).mw

 

 

Dear maple users,

Greetings.

I think the computation generates real and complex values.
How to plot only real numbers.

p1:= sol:-plot(R(z),t = 0, numpoints = 50);
NULL;
Error, (in pdsolve/numeric/plot) unable to compute solution for t<HFloat(0.0):
unable to store -.800000000000000e-4*2^(3/10)*((HFloat(undefined)+HFloat(undefined)*I)*2^(7/10)+437788563.900000*2^(3/10)+HFloat(undefined)+HFloat(undefined)*I)/(2*2^(3/10)+HFloat(undefined)+HFloat(undefined)*I)^2 when datatype=float[8]

 

 

I was waiting for at least anyone reply.

Have a good day 

Javid Basha.

Dear @mmcdara 

Thanks for your help, The results are looking very nice.

Dear  @mmcdara 

Thank you very much for your effort.

I hope it helps me to update the graph.

Once again thanks a lot for your effort.

1 2 3 4 5 6 7 Page 1 of 8