Maple 2019 Questions and Posts

These are Posts and Questions associated with the product, Maple 2019

My problem is as following:
Our school has a requirement that we have to show the numeric values, when we calculate. And i was wondering if there's an easy way to do it?

Example of how i would normally do it:
A:=5
B:=5

C:=A+B = 10. 

What they want:
A:=5
B:=5

C:=A+B = 5+5=10

Does anyone have an easy way of doing this? Because in an exam I wont have the time to plug in the values myself.

Hey, I have been using maple for a whole 30 minutes, and have no idea what I am doing! I have some code set up to run the Eulers approximation to solve an ODE.

The code seems to run fine, but in the final output where it should give a number value, I am getting 6+0.10f (where f is a variable define beforehand). My friend who has run the same code does not run into this problem.

The Maple software is a on a public school computer, so maybe the specific one I am using has some setting set up that are not default?

Does anyone know what is going on? In the end I would like the output to be a decimal number. 

 

Reference image: https://imgur.com/a/A4DZuik

Hi, I have the following simple differential equation. 

2x dx -9y^2 dy = 0

How can I enter the command to solve it? I know I'm supposed to use dsolve command, but I keep getting an input error saying that it expected an ODE. Google says that said message is because for whatever reason Maple cannot understand dx or dy, and that instead I need to use diff command. But when I enter: 

2x diff(x) - 9 y^2 diff(y) = 0

I get another error. I have tried other combinations, but at times I get errors like y(x) and y cannot both appear in the given ODE, which I don't understand why they can't as they are like basic run of the mill ODEs, so I'm a bit confused. 

I have also checked Maple's docs but they don't help either, I tried the first example given here: 
https://www.maplesoft.com/support/help/Maple/view.aspx?path=dsolve
 and I got the same "expecting an ODE or a set or list of ODEs" as in my own examples, so I'm guessing the docs are assuming steps or some configuration. 

 

How am I supposed to enter the command? Thanks in advance!

Hello,

I want to evaluate the change of temperature and energy loss during the flow through an expansion valve.

But the command fsolve this does not work with CoolProp.

The following command is just repeated, but gives no result.

fsolve({ThermophysicalData:-Property("D", "H2", "temperature" = TTT, "pressure" = ppp) = 31.13, ThermophysicalData:-Property("H", "H2", "temperature" = TTT, "pressure" = ppp) = 4.098640000*10^6}, {TTT, ppp})

Regards,

Andreas

Some years ago it was promised that expansion of capabilities of Heun functions was imminent, but nothing has appeared.  Other functions long overdue for inclusion as special functions in Maple are the Lame functions, which arise as special cases of Heun's differential equation and therefore of Heun functions.  Lame's differential equation appears in Abramowitz and Stegun, but has long been neglected in Maple.  These spectial functions are much more generally useful to users of Maple than, for instance, esoteric parts of the physics package. 

Is this documented somewhere?  Why Maple do not return 0 from odetest after expanding the solution?

update: added additional tries to simplify it to zero as suggested but they do not give zero.

ode:=2*x^(1/2)*diff(y(x),x) = (1-y(x)^2)^(1/2);
sol:=dsolve(ode);

2*x^(1/2)*(diff(y(x), x)) = (1-y(x)^2)^(1/2)

y(x) = sin(x^(1/2)+(1/2)*_C1)

odetest(sol,ode);

0

res:=odetest(expand(sol),ode);

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

simplify(res)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

simplify(res,symbolic)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

simplify(res,trig)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

combine(res)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

combine(res,trig)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

expand(res)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res))

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res),symbolic)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res),trig)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res),size)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

 

 

Download odetest_q.mw

Hi, I ran the following command: 

int(x^2 * sqrt(1-x^2), x)

and I got a solution. Then I try IntTutor: 

IntTutor(x^2 * sqrt(1-x^2), x)

And a UI window popus, does nothing. When I click "All Steps" it says "Unable to solve this problem". How so, if int() just gave me an answer? Or am I using the commands wrong?

I'm trying to see the steps by step solution of the integral, so I can compare it with my attempts. Kinda like what http://integral-calculator.com/ does. Thanks in advance. 

Hello

 

As title says, when I enter equation in math mode and switch to text mode and hit "enter" to go to the next line then it gets executed, usually in former versions it didnt execute and was much faster for me to use the program this way.

How do I fix this? I don't want to use shift-F5 all the time to make the text unexecutable, I would like it to be like in the old version prior to 2019.

Now it does this which is really annoying, I dont want it to execute when changing line!

Best regards

Jonas

i literally cant figure out how to pay money for this

I'm using dsolve command to solve a differential equation. Using infolevel to 3 will tell me the classification of said DE. However, how can I see the step by step solution? I'm using Maple as a study tool so I do solve manually a DE then I'd like to compare my answer with Maple's. How can I acomplish this? Thanks in advance. 

Please may I know if you can offer ma student's discount ob the seleted version.

Thank you.

Fred.

I'm a Maple novice.  I have two questions.  (1) I'm trying to use Maple to confirm some Fourier transforms of selected probability density functions.  In general I've succeeded, but Maple fails to find the Fourier transform of the pdf of a logistic random variable with mean 0.  Please explain how I can get Maple to carry out this request.  I've attached a Maple file with my work to this question.  (2) At several points in my computations, I wish to substitute 2*Pi*xi for omega.  I have an expression containing two omegas.  If I use algsubs(), only one of the two omegas is replaced.  I have to use subs() to replace both omegas.  Why is this?
 

Use Maple to confirm selected Fourier transform of logistic random variable

with(inttrans)

[addtable, fourier, fouriercos, fouriersin, hankel, hilbert, invfourier, invhilbert, invlaplace, invmellin, laplace, mellin, savetable]

(1)

assume(a > 0)

NULL

"f(x):=((e)^(x/(a)))/(a*(1+(e)^(x/(a)))^(2))"

proc (x) options operator, arrow, function_assign; exp(x/a)/(a*(1+exp(x/a))^2) end proc

(2)

int(f(x), x = -infinity .. infinity)

1

(3)

fourier(f(x), x, omega)

fourier(exp(x/a)/(1+exp(x/a))^2, x, omega)/a

(4)

"f(x) := 1/(4*a*(cosh(x/(2*a)))^(2))"

proc (x) options operator, arrow, function_assign; (1/4)/(a*cosh((1/2)*x/a)^2) end proc

(5)

int(f(x), x = -infinity .. infinity)

1

(6)

fourier(f(x), x, omega)

fourier(1/(exp((1/2)*x/a)+exp(-(1/2)*x/a))^2, x, omega)/a

(7)

Wikipedia's article on "Logistic distribution" gives a characteristic function that implies that the Fourier transform of this pdf should equal Pi*a*omega/sinh(Pi*a*omega).

Unit rectangular function

rect := proc (x) options operator, arrow; Heaviside(x+1/2)-Heaviside(x-1/2) end proc

proc (x) options operator, arrow; Heaviside(x+1/2)-Heaviside(x-1/2) end proc

(8)

fourier(rect(a*x), x, omega)

2*sin((1/2)*omega/a)/omega

(9)

algsubs(omega = 2*Pi*xi, 2*sin((1/2)*omega/a)/omega)

2*sin(Pi*xi/a)/omega

(10)

subs(omega = 2*Pi*xi, 2*sin(Pi*xi/a)/omega)

sin(Pi*xi/a)/(Pi*xi)

(11)

``

NULL


 

Download Logistic_pdf.mw

 

How do I calculate the intersection curve between a plane and a drop?
The "drop" is defined in the following way:

R1 := 3.;R2 := 1.0;DR := 4;g := R2 + DR;

f1 := h -> sqrt(R1^2 - h^2);
f2 := h -> sqrt(g^2 - h^2);
f3 := h -> (1 - h/g)*f1(h*R1/g) + h*f2(h)/g;
f4 := h -> sqrt(1/2*g - 1/2*h);
f5 := h -> (1 - h/g)*f3(h) + h*f4(h)/g;
gg := h -> piecewise(h < 0, f1(h), 0 <= h, f5(h));#Radius depending on the z-position h
cir := (h, phi, R) -> <sin(phi)*R, cos(phi)*R, h>; # a circle at the hight h with radius R
#The plane is placed inside the drop.
n := (x, y, z) -> <x, y, z>/sqrt(x^2 + y^2 + z^2);

# the following lines show, how it looks like:
with(plots);
with(plottools);
dro1 := plot3d(cir(h, phi, gg(h)), h = -R1 .. g, phi = 0 .. 2*Pi, scaling = constrained, orientation = [-60, 72, 0]);
plotDropWithPlane := (x, y, z) -> display(dro1, arrow(Vector([0, 0, 0]), 2*R1*n(x, y, z), 0.2, 0.4, 0.1, cylindrical_arrow, fringe = blue, color = "Green"), implicitplot3d(x*x1 + y*y1 + z*z1 = 0, x1 = -R1 .. R1, y1 = -R1 .. R1, z1 = -R1 .. g, color = blue));
plotDropWithPlane(3, 1, 2);

#I'm searching a function like
fintersect:=theta-><"?,?,?>"

Any idea how to solve?

Best regards,

Andreas


 

with(VectorCalculus)

pde := Laplacian(u(r, t), 'cylindrical'[r, theta, z]) = diff(u(r, t), t)

iv := {u(1, t) = 0, u(4, t) = 0, u(r, 0) = r}

dsol := pdsolve(pde, iv, numeric):-value(output = listprocedure)

sd := rhs(dsol[3])

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 ) = (18446746697122892894)  ] ) ] ) INFO := table( [( "extrabcs" ) = [0], ( "totalwidth" ) = 6, ( "spacevar" ) = r, ( "dependson" ) = [{1}], ( "solmatrix" ) = Matrix(21, 6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (7, 5) = .0, (7, 6) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0, (8, 5) = .0, (8, 6) = .0, (9, 1) = .0, (9, 2) = .0, (9, 3) = .0, (9, 4) = .0, (9, 5) = .0, (9, 6) = .0, (10, 1) = .0, (10, 2) = .0, (10, 3) = .0, (10, 4) = .0, (10, 5) = .0, (10, 6) = .0, (11, 1) = .0, (11, 2) = .0, (11, 3) = .0, (11, 4) = .0, (11, 5) = .0, (11, 6) = .0, (12, 1) = .0, (12, 2) = .0, (12, 3) = .0, (12, 4) = .0, (12, 5) = .0, (12, 6) = .0, (13, 1) = .0, (13, 2) = .0, (13, 3) = .0, (13, 4) = .0, (13, 5) = .0, (13, 6) = .0, (14, 1) = .0, (14, 2) = .0, (14, 3) = .0, (14, 4) = .0, (14, 5) = .0, (14, 6) = .0, (15, 1) = .0, (15, 2) = .0, (15, 3) = .0, (15, 4) = .0, (15, 5) = .0, (15, 6) = .0, (16, 1) = .0, (16, 2) = .0, (16, 3) = .0, (16, 4) = .0, (16, 5) = .0, (16, 6) = .0, (17, 1) = .0, (17, 2) = .0, (17, 3) = .0, (17, 4) = .0, (17, 5) = .0, (17, 6) = .0, (18, 1) = .0, (18, 2) = .0, (18, 3) = .0, (18, 4) = .0, (18, 5) = .0, (18, 6) = .0, (19, 1) = .0, (19, 2) = .0, (19, 3) = .0, (19, 4) = .0, (19, 5) = .0, (19, 6) = .0, (20, 1) = .0, (20, 2) = .0, (20, 3) = .0, (20, 4) = .0, (20, 5) = .0, (20, 6) = .0, (21, 1) = .0, (21, 2) = .0, (21, 3) = .0, (21, 4) = .0, (21, 5) = .0, (21, 6) = .0}, datatype = float[8], order = C_order), ( "matrixproc" ) = proc (v, vp, vpp, t, x, k, h, n, mat) local _s1, _s2, xi; _s1 := 4*h^2; _s2 := -(h^2+k)/(h^2*k); mat[3] := 1; mat[6*n-3] := 1; for xi from 2 to n-1 do mat[6*xi-3] := _s2; mat[6*xi-4] := -(h-2*x[xi])/(_s1*x[xi]); mat[6*xi-2] := (h+2*x[xi])/(_s1*x[xi]) end do end proc, ( "leftwidth" ) = 1, ( "solmat_i1" ) = 0, ( "eqnords" ) = [[2, 1]], ( "allocspace" ) = 21, ( "method" ) = theta, ( "theta" ) = 1/2, ( "solmat_i2" ) = 0, ( "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), ( "depords" ) = [[2, 1]], ( "rightwidth" ) = 0, ( "depeqn" ) = [1], ( "stages" ) = 1, ( "spacepts" ) = 21, ( "indepvars" ) = [r, t], ( "minspcpoints" ) = 4, ( "startup_only" ) = false, ( "eqndep" ) = [1], ( "depdords" ) = [[[2, 1]]], ( "adjusted" ) = false, ( "norigdepvars" ) = 1, ( "solvec4" ) = 0, ( "explicit" ) = false, ( "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), ( "pts", r ) = [1, 4], ( "spaceidx" ) = 1, ( "solmat_v" ) = Vector(126, {(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}, datatype = float[8], order = C_order, attributes = [source_rtable = (Matrix(21, 6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (7, 5) = .0, (7, 6) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0, (8, 5) = .0, (8, 6) = .0, (9, 1) = .0, (9, 2) = .0, (9, 3) = .0, (9, 4) = .0, (9, 5) = .0, (9, 6) = .0, (10, 1) = .0, (10, 2) = .0, (10, 3) = .0, (10, 4) = .0, (10, 5) = .0, (10, 6) = .0, (11, 1) = .0, (11, 2) = .0, (11, 3) = .0, (11, 4) = .0, (11, 5) = .0, (11, 6) = .0, (12, 1) = .0, (12, 2) = .0, (12, 3) = .0, (12, 4) = .0, (12, 5) = .0, (12, 6) = .0, (13, 1) = .0, (13, 2) = .0, (13, 3) = .0, (13, 4) = .0, (13, 5) = .0, (13, 6) = .0, (14, 1) = .0, (14, 2) = .0, (14, 3) = .0, (14, 4) = .0, (14, 5) = .0, (14, 6) = .0, (15, 1) = .0, (15, 2) = .0, (15, 3) = .0, (15, 4) = .0, (15, 5) = .0, (15, 6) = .0, (16, 1) = .0, (16, 2) = .0, (16, 3) = .0, (16, 4) = .0, (16, 5) = .0, (16, 6) = .0, (17, 1) = .0, (17, 2) = .0, (17, 3) = .0, (17, 4) = .0, (17, 5) = .0, (17, 6) = .0, (18, 1) = .0, (18, 2) = .0, (18, 3) = .0, (18, 4) = .0, (18, 5) = .0, (18, 6) = .0, (19, 1) = .0, (19, 2) = .0, (19, 3) = .0, (19, 4) = .0, (19, 5) = .0, (19, 6) = .0, (20, 1) = .0, (20, 2) = .0, (20, 3) = .0, (20, 4) = .0, (20, 5) = .0, (20, 6) = .0, (21, 1) = .0, (21, 2) = .0, (21, 3) = .0, (21, 4) = .0, (21, 5) = .0, (21, 6) = .0}, datatype = float[8], order = C_order))]), ( "maxords" ) = [2, 1], ( "solvec5" ) = 0, ( "fdepvars" ) = [u(r, t)], ( "spacestep" ) = .150000000000000, ( "banded" ) = true, ( "PDEs" ) = [(diff(u(r, t), r)+r*(diff(diff(u(r, t), r), r)))/r-(diff(u(r, t), t))], ( "erroraccum" ) = true, ( "autonomous" ) = true, ( "solmat_ne" ) = 0, ( "inputargs" ) = [(diff(u(r, t), r)+r*(diff(diff(u(r, t), r), r)))/r = diff(u(r, t), t), {u(1, t) = 0, u(4, t) = 0, u(r, 0) = r}], ( "multidep" ) = [false, false], ( "initialized" ) = false, ( "BCS", 1 ) = {[[1, 0, 1], b[1, 0, 1]], [[1, 0, 4], b[1, 0, 4]]}, ( "matrixhf" ) = true, ( "ICS" ) = [r], ( "timeadaptive" ) = false, ( "solspace" ) = Vector(21, {(1) = 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) = 4.0}, datatype = float[8]), ( "vectorproc" ) = proc (v, vp, vpp, t, x, k, h, n, vec) local _s1, _s2, _s3, _s4, _s5, _s6, xi; _s3 := -2*k; _s4 := -4*h^2; _s5 := -h*k; _s6 := 4*h^2*k; vec[1] := 0; vec[n] := 0; for xi from 2 to n-1 do _s1 := -vp[xi-1]+vp[xi+1]; _s2 := vp[xi-1]-2*vp[xi]+vp[xi+1]; vec[xi] := (_s2*_s3*x[xi]+_s4*vp[xi]*x[xi]+_s1*_s5)/(_s6*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]), ( "timeidx" ) = 2, ( "depvars" ) = [u], ( "bandwidth" ) = [1, 2], ( "depshift" ) = [1], ( "soltimes" ) = Vector(3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8]), ( "timevar" ) = t, ( "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]), ( "timestep" ) = .150000000000000, ( "spaceadaptive" ) = false, ( "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]), ( "IBC" ) = b, ( "solmat_is" ) = 0, ( "errorest" ) = false, ( "mixed" ) = false, ( "vectorhf" ) = true, ( "linear" ) = true, ( "t0" ) = 0, ( "periodic" ) = false ] ); 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 := []; 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

(1)

eval(diff(sd(r, t), r), [r = 2, t = 4])

(D[1](sd))(2, 4)

(2)

subs(r = 2, t = 4, diff(sd(r, t), r))

diff(sd(2, 4), 2)

(3)

 Using numerical methods, I cannot calculate the derivative of sd with respect to r at r = 2 and t = 4.

Oliveira.

``


 

Download Derivative-numerical.mw

Does anyone know how to enter in the pdsolve function Dirichlet conditions and Neumann values?

Oliveira.

First 6 7 8 9 10 11 12 Last Page 8 of 19