666 jvbasha

javid basha jv

60 Reputation

8 Badges

3 years, 206 days

MaplePrimes Activity


These are replies submitted by 666 jvbasha

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.

Dear @mmcdara @tomleslie

Is this possible to add contour labels to the graph?

Tim Leslie 7597  suggested the above-mentioned link,  there it is explained for algebraic functions only.

In this case, we have the data in the matrix form.

Kindly help me to shoot out this problem.

Dear @tomleslie 

Thanks for your reply.

Is this possible to add the contour sequence and how to incorporate the labels in the graph?

Dear @tomleslie

Is there any possibility to get a solution to this problem? 
Waiting for your reply.

Dear @tomleslie 

Please find this attachment.
This paper problem only I am trying to get a solution.

Paper: perturbation.pdf

In this paper, equations 14-16 are solved using the perturbation function 20a-20e with the help of 17a, 17b and 18.

After applying the boundary condition and perturbation function in equations 14-16, they displayed the final form in equations 21-23.

Dear @tomleslie  @Carl Love

I have tried the below-mentioned problem. But the outcomes are not matching. I don't know where the mistakes happen.

Equation: 

Condition: 

perturbation expansion: 

Outcome: 

Result: 

 

Is there any possibility to get a solution to this problem? 
Waiting for your reply.

Dear @tomleslie 

The outcome looking good.
Thanks for your wonderful support.

Dear @tomleslie 

Thanks for your notable support.

The outcome looking nice.

How to find values for R(0..1)

Only one point the value is coming.

X1[L[k]]:=rhs(R[L[k]](0..1)[4]);
 

Dear @tomleslie 

I have applied sequences for "ax "
But solution is not coming.

How to get a result for the sequence of values.

 

Dear maple users,
I hope anyone of the users answers this question.

1 2 3 4 5 6 7 Page 1 of 7