acer

32363 Reputation

29 Badges

19 years, 332 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

In general the solve command does not return all solutions for transcendental equations, while also not returning a warning about solutions being lost. This has some mention on the help-page for topic solve,details .

What that page fails to say is that, when the number of solutions can be determined by Maple as being bound by additional, supplied inequalities, the use of the explicit option as well as the allsolutions option can (sometimes, if it can be worked out by Maple) get an explicit full answer or additional solutions.

Sorry, I only have access to back to Maple 16.02 today, and not Maple 15 which seems to be indicated on your Question.

restart;

H := sqrt(1-2*r*cos(theta)):

eqs := { 0=2*r*(H*(2-H)-3*sin(theta)^2),
         0=-3*sin(2*theta) }:

solve( {r>=0, op(eqs)}, [r,theta] ):
map(print, %):

[r = 0, theta = 0]

 

[r = 1/2, theta = 0]

 

[r = 3/2, theta = Pi]

(1)

sols := solve( {r>=0, op(eqs), theta>=0, theta<=2*Pi},
               [r,theta], explicit, allsolutions ):
map(print, %):

[r = 0, theta = 0]

 

[r = 0, theta = (1/2)*Pi]

 

[r = 0, theta = Pi]

 

[r = 0, theta = (3/2)*Pi]

 

[r = 0, theta = 2*Pi]

 

[r = 1/2, theta = 0]

 

[r = 1/2, theta = 2*Pi]

 

[r = 3/2, theta = Pi]

(2)

 

Download solvert.mw

If you are just trying to get the right-hand sides of the equations in L,

map(rhs, L);
                             {b, f}

If you are trying to use L as a lookup key for a and e,

L := {a = b, e = f};
                      L := {a = b, e = f}

eval({a, e}, L);
                             {b, f}

eval([a, e], L);
                             [b, f]

eval(a, L);
                               b

eval(e, L);
                               f

Perhaps you are looking for a syncronized side-by-side Array of animations.

With the Table borders toggled off (via right-click Table->Properties), and with scaling=constrained, you could get it like so:

animarray.mw

The correct syntax would be Eigenvectors(A) instead of Eigenvectors[A] as you had it. But that seems to take too long.

restart;

local gamma;

E := [q2, q2^2/q1+(gamma-1)*(q5-(1/2)*q2^2/q1-(1/2)*q3^2/q1-(1/2)*q4^2/q1), q2*q3/q1, q4*q2/q1, q5*q2/q1+q2*(gamma-1)*(q5-(1/2)*q2^2/q1-(1/2)*q3^2/q1-(1/2)*q4^2/q1)/q1, q6*q2/q1]:

F := [q3, q2*q3/q1, q3^2/q1+(gamma-1)*(q5-(1/2)*q2^2/q1-(1/2)*q3^2/q1-(1/2)*q4^2/q1), q4*q3/q1, q5*q3/q1+q3*(gamma-1)*(q5-(1/2)*q2^2/q1-(1/2)*q3^2/q1-(1/2)*q4^2/q1)/q1, q6*q3/q1]:

G := [q4, q4*q2/q1, q4*q3/q1, q4^2/q1+(gamma-1)*(q5-(1/2)*q2^2/q1-(1/2)*q3^2/q1-(1/2)*q4^2/q1), q5*q4/q1+q4*(gamma-1)*(q5-(1/2)*q2^2/q1-(1/2)*q3^2/q1-(1/2)*q4^2/q1)/q1, q6*q4/q1]:

Ebar := expand(E*xi_x+F*xi_y+G*xi_z):
U := [q1, q2, q3, q4, q5, q6]:

A := subs(q1 = rho, q2 = rho*u, q3 = rho*v, q4 = rho*w, q5 = rho*e, q6 = rho*nu, VectorCalculus:-Jacobian(Ebar, U)):

A := subs(e = P/((gamma-1)*rho)+(1/2)*u^2+(1/2)*v^2+(1/2)*w^2, A):

A := subs(P = rho*c^2/gamma, A):

A := simplify(A):

op(1,A);

6, 6

(1)

with(LinearAlgebra):

evalsA:=LinearAlgebra:-Eigenvalues(A);

Vector(6, {(1) = u*xi_x+v*xi_y+w*xi_z+sqrt(c^2*xi_x^2+c^2*xi_y^2+c^2*xi_z^2), (2) = u*xi_x+v*xi_y+w*xi_z-sqrt(c^2*xi_x^2+c^2*xi_y^2+c^2*xi_z^2), (3) = u*xi_x+v*xi_y+w*xi_z, (4) = u*xi_x+v*xi_y+w*xi_z, (5) = u*xi_x+v*xi_y+w*xi_z, (6) = u*xi_x+v*xi_y+w*xi_z})

(2)

DetK:=Determinant(CharacteristicMatrix(A,K)):

seq(simplify(eval(DetK,K=evalsA[ii])), ii=1..6);

0, 0, 0, 0, 0, 0

(3)

#N6gen:=LinearSolve(eval(CharacteristicMatrix(A,K),K=evalsA[6]), Vector(6));

#simplify(eval(CharacteristicMatrix(A,K),K=evalsA[6]) . N6gen);
#simplify( A.N6gen - evalsA[6]*N6gen );

for ii from 1 to 3 do
  evecsA[ii]:=simplify(NullSpace(eval(CharacteristicMatrix(A,K),K=evalsA[ii])));
end do:

for ii from 1 to 3 do
  seq( simplify( A . evecsA[ii][jj] - evalsA[ii] * evecsA[ii][jj] ), jj=1..nops(evecsA[ii]));
end do;

Vector(6, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0, (6) = 0})

 

Vector(6, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0, (6) = 0})

 

Vector[column](%id = 18446884146858440574), Vector[column](%id = 18446884146858442254), Vector[column](%id = 18446884146531192950), Vector[column](%id = 18446884146531194390)

(4)

 


Download eigs.mw

Since the answer you expected has just F on the left-hand side then it is understandable that people give you answers about isolating or solving for F.

But another way to interpret your question involves cancellation of common factors in the left- and right-hand sides. For your given example that just happens to provide the same result as isolating for F.

But it's not a silly question. The simplify command will not "cancel" such common factors.

I don't promise that the following will work for all kinds of equations. But here's your example as well as another slightly more complicated one.

restart;

fact := (expr::equation) -> frontend(gcd,[numer(lhs(expr)),numer(rhs(expr))])/
                            frontend(gcd,[denom(lhs(expr)),denom(rhs(expr))]):

eq1 := F*R=(1/2*M*R^2)*(a/R);

                                       M R a
                          eq1 := F R = -----
                                         2

eq1/fact(eq1);

                                    M a
                                F = ---
                                     2

eq2 := (F+G)*R/sqrt(W-1)=(1/2*M*R^2)*(a/(R*sqrt(W-1)));

                          (F + G) R       M R a
                   eq2 := ---------- = ------------
                                 1/2            1/2
                          (W - 1)      2 (W - 1)

eq2/fact(eq2);

                                      M a
                              F + G = ---
                                       2

After some simplification the modified expression can become real-valued (eg. for positive omega). fsolve can be used for this example.

ps. Are you using Maple 2016.0, and if so have you considered upgrading to 2016.2?

Download fs.mw

Using Maple 2015.2,

restart;
ee := simplify(expand(exp(-(2*m-4)*exp(t)+t*(m+1))*(t-2*exp(t)))):
f2 := subs(foo=ee,m->evalf(Int(unapply(foo,t),0..infinity))):
plot(f2, 3..20);

or,

restart;
ee := simplify(expand(exp(-(2*m-4)*exp(t)+t*(m+1))*(t-2*exp(t)))):
f2 := subs(foo=ee,m->evalf(Int(foo,t=0..infinity,method=_d01amc))):
plot(f2, 3..20);

Why are you trying for output=Array(...)? And why with so few points? (With more points you could get a much smoother piecewise spline as an interpolation.)

restart;

sol := dsolve([-diff(F(x), x$2)+F(x) = x*sin(5*x),
              F(0)=0.2, F(1)=1],
              numeric, 'output' = listprocedure);

[x = proc (x) local _res, _dat, _solnproc; option `Copyright (c) 1993 by the University of Waterloo. All rights reserved.`; _dat := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .2, (1, 2) = .6355472386901964, (2, 1) = .28679901058587776, (2, 2) = .6642172351157226, (3, 1) = .4026629349647905, (3, 2) = .6898565048786539, (4, 1) = .5191388059317775, (4, 2) = .7087686351481234, (5, 1) = .6327422107075403, (5, 2) = .7672375606410581, (6, 1) = .745854892367845, (6, 2) = .8933518491303937, (7, 1) = .8652730228741763, (7, 2) = 1.0741950607628237, (8, 1) = 1.0, (8, 2) = 1.2869514632712835}, datatype = float[8], order = C_order); YP := Matrix(8, 2, {(1, 1) = .6355472386901964, (1, 2) = .2, (2, 1) = .6642172351157226, (2, 2) = .2040819987788216, (3, 1) = .6898565048786539, (3, 2) = 0.987321747068094e-1, (4, 1) = .7087686351481234, (4, 2) = .18582163798963208, (5, 1) = .7672375606410581, (5, 2) = .6263258981104891, (6, 1) = .8933518491303937, (6, 2) = 1.2240154135287016, (7, 1) = 1.0741950607628237, (7, 2) = 1.7154194632259072, (8, 1) = 1.2869514632712835, (8, 2) = 1.9589242746631386}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .0, (1, 2) = 0.13030464384801514e-6, (2, 1) = 0.1302535103026619e-7, (2, 2) = 0.14221614646911444e-6, (3, 1) = -0.4128469958203856e-7, (3, 2) = 0.15918945269923148e-6, (4, 1) = -0.7225809617070991e-7, (4, 2) = 0.11203207102741712e-6, (5, 1) = -0.5203959916725329e-7, (5, 2) = 0.648213485009814e-7, (6, 1) = -0.26104233388354814e-7, (6, 2) = 0.4841390359814309e-7, (7, 1) = -0.10238961917655763e-7, (7, 2) = 0.4628901322935305e-7, (8, 1) = .0, (8, 2) = 0.48876597274231683e-7}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [2, 8, [F(x), diff(F(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(2, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(2, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[F(x), diff(F(x), x)]'[i] = yout[i], i = 1 .. 2)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [2, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(2, {(1) = .0, (2) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(2, {(1) = 0., (2) = 0.}); `dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 2)] end proc, (2) = Array(1..3, {(1) = 18446883866908093534, (2) = 18446883866908094062, (3) = 18446883866908094238}), (3) = [x, F(x), diff(F(x), x)], (4) = 0}); _solnproc := _dat[1]; if member(x, ["last", 'last']) then _res := _solnproc("last"); if type(_res, 'list') then return _res[1] end if elif type(x, `=`) and member(lhs(x), ["initial", 'initial']) then if type(rhs(x), 'list') then _res := _solnproc("initial" = [0, op(rhs(x))]) else _res := _solnproc("initial" = [1, rhs(x)]) end if; if type(_res, 'list') then return _res[1] end if elif x = "sysvars" then return _dat[3] end if; x end proc, F(x) = proc (x) local res, data, solnproc, `F(x)`, outpoint; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x) else outpoint := evalf(x) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .2, (1, 2) = .6355472386901964, (2, 1) = .28679901058587776, (2, 2) = .6642172351157226, (3, 1) = .4026629349647905, (3, 2) = .6898565048786539, (4, 1) = .5191388059317775, (4, 2) = .7087686351481234, (5, 1) = .6327422107075403, (5, 2) = .7672375606410581, (6, 1) = .745854892367845, (6, 2) = .8933518491303937, (7, 1) = .8652730228741763, (7, 2) = 1.0741950607628237, (8, 1) = 1.0, (8, 2) = 1.2869514632712835}, datatype = float[8], order = C_order); YP := Matrix(8, 2, {(1, 1) = .6355472386901964, (1, 2) = .2, (2, 1) = .6642172351157226, (2, 2) = .2040819987788216, (3, 1) = .6898565048786539, (3, 2) = 0.987321747068094e-1, (4, 1) = .7087686351481234, (4, 2) = .18582163798963208, (5, 1) = .7672375606410581, (5, 2) = .6263258981104891, (6, 1) = .8933518491303937, (6, 2) = 1.2240154135287016, (7, 1) = 1.0741950607628237, (7, 2) = 1.7154194632259072, (8, 1) = 1.2869514632712835, (8, 2) = 1.9589242746631386}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .0, (1, 2) = 0.13030464384801514e-6, (2, 1) = 0.1302535103026619e-7, (2, 2) = 0.14221614646911444e-6, (3, 1) = -0.4128469958203856e-7, (3, 2) = 0.15918945269923148e-6, (4, 1) = -0.7225809617070991e-7, (4, 2) = 0.11203207102741712e-6, (5, 1) = -0.5203959916725329e-7, (5, 2) = 0.648213485009814e-7, (6, 1) = -0.26104233388354814e-7, (6, 2) = 0.4841390359814309e-7, (7, 1) = -0.10238961917655763e-7, (7, 2) = 0.4628901322935305e-7, (8, 1) = .0, (8, 2) = 0.48876597274231683e-7}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [2, 8, [F(x), diff(F(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(2, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(2, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[F(x), diff(F(x), x)]'[i] = yout[i], i = 1 .. 2)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [2, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(2, {(1) = .0, (2) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(2, {(1) = 0., (2) = 0.}); `dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 2)] end proc, (2) = Array(1..3, {(1) = 18446883866908093534, (2) = 18446883866908094062, (3) = 18446883866908094238}), (3) = [x, F(x), diff(F(x), x)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(x) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x) else `F(x)` := pointto(data[2][2]); return ('`F(x)`')(x) end if end if; try res := solnproc(outpoint); res[2] catch: error  end try end proc, diff(F(x), x) = proc (x) local res, data, solnproc, `diff(F(x),x)`, outpoint; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x) else outpoint := evalf(x) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .2, (1, 2) = .6355472386901964, (2, 1) = .28679901058587776, (2, 2) = .6642172351157226, (3, 1) = .4026629349647905, (3, 2) = .6898565048786539, (4, 1) = .5191388059317775, (4, 2) = .7087686351481234, (5, 1) = .6327422107075403, (5, 2) = .7672375606410581, (6, 1) = .745854892367845, (6, 2) = .8933518491303937, (7, 1) = .8652730228741763, (7, 2) = 1.0741950607628237, (8, 1) = 1.0, (8, 2) = 1.2869514632712835}, datatype = float[8], order = C_order); YP := Matrix(8, 2, {(1, 1) = .6355472386901964, (1, 2) = .2, (2, 1) = .6642172351157226, (2, 2) = .2040819987788216, (3, 1) = .6898565048786539, (3, 2) = 0.987321747068094e-1, (4, 1) = .7087686351481234, (4, 2) = .18582163798963208, (5, 1) = .7672375606410581, (5, 2) = .6263258981104891, (6, 1) = .8933518491303937, (6, 2) = 1.2240154135287016, (7, 1) = 1.0741950607628237, (7, 2) = 1.7154194632259072, (8, 1) = 1.2869514632712835, (8, 2) = 1.9589242746631386}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .0, (1, 2) = 0.13030464384801514e-6, (2, 1) = 0.1302535103026619e-7, (2, 2) = 0.14221614646911444e-6, (3, 1) = -0.4128469958203856e-7, (3, 2) = 0.15918945269923148e-6, (4, 1) = -0.7225809617070991e-7, (4, 2) = 0.11203207102741712e-6, (5, 1) = -0.5203959916725329e-7, (5, 2) = 0.648213485009814e-7, (6, 1) = -0.26104233388354814e-7, (6, 2) = 0.4841390359814309e-7, (7, 1) = -0.10238961917655763e-7, (7, 2) = 0.4628901322935305e-7, (8, 1) = .0, (8, 2) = 0.48876597274231683e-7}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [2, 8, [F(x), diff(F(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(2, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(2, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[F(x), diff(F(x), x)]'[i] = yout[i], i = 1 .. 2)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [2, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(2, {(1) = .0, (2) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(2, {(1) = 0., (2) = 0.}); `dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 2)] end proc, (2) = Array(1..3, {(1) = 18446883866908093534, (2) = 18446883866908094062, (3) = 18446883866908094238}), (3) = [x, F(x), diff(F(x), x)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(x) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x) else `diff(F(x),x)` := pointto(data[2][3]); return ('`diff(F(x),x)`')(x) end if end if; try res := solnproc(outpoint); res[3] catch: error  end try end proc]

(1)

f := eval(F(x),sol);

proc (x) local res, data, solnproc, `F(x)`, outpoint; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x) else outpoint := evalf(x) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .2, (1, 2) = .6355472386901964, (2, 1) = .28679901058587776, (2, 2) = .6642172351157226, (3, 1) = .4026629349647905, (3, 2) = .6898565048786539, (4, 1) = .5191388059317775, (4, 2) = .7087686351481234, (5, 1) = .6327422107075403, (5, 2) = .7672375606410581, (6, 1) = .745854892367845, (6, 2) = .8933518491303937, (7, 1) = .8652730228741763, (7, 2) = 1.0741950607628237, (8, 1) = 1.0, (8, 2) = 1.2869514632712835}, datatype = float[8], order = C_order); YP := Matrix(8, 2, {(1, 1) = .6355472386901964, (1, 2) = .2, (2, 1) = .6642172351157226, (2, 2) = .2040819987788216, (3, 1) = .6898565048786539, (3, 2) = 0.987321747068094e-1, (4, 1) = .7087686351481234, (4, 2) = .18582163798963208, (5, 1) = .7672375606410581, (5, 2) = .6263258981104891, (6, 1) = .8933518491303937, (6, 2) = 1.2240154135287016, (7, 1) = 1.0741950607628237, (7, 2) = 1.7154194632259072, (8, 1) = 1.2869514632712835, (8, 2) = 1.9589242746631386}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .0, (1, 2) = 0.13030464384801514e-6, (2, 1) = 0.1302535103026619e-7, (2, 2) = 0.14221614646911444e-6, (3, 1) = -0.4128469958203856e-7, (3, 2) = 0.15918945269923148e-6, (4, 1) = -0.7225809617070991e-7, (4, 2) = 0.11203207102741712e-6, (5, 1) = -0.5203959916725329e-7, (5, 2) = 0.648213485009814e-7, (6, 1) = -0.26104233388354814e-7, (6, 2) = 0.4841390359814309e-7, (7, 1) = -0.10238961917655763e-7, (7, 2) = 0.4628901322935305e-7, (8, 1) = .0, (8, 2) = 0.48876597274231683e-7}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [2, 8, [F(x), diff(F(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(2, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(2, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[F(x), diff(F(x), x)]'[i] = yout[i], i = 1 .. 2)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [2, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(2, {(1) = .0, (2) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(2, {(1) = 0., (2) = 0.}); `dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 2)] end proc, (2) = Array(1..3, {(1) = 18446883866908093534, (2) = 18446883866908094062, (3) = 18446883866908094238}), (3) = [x, F(x), diff(F(x), x)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(x) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x) else `F(x)` := pointto(data[2][2]); return ('`F(x)`')(x) end if end if; try res := solnproc(outpoint); res[2] catch: error  end try end proc

(2)

fdx := eval(diff(F(x),x),sol);

proc (x) local res, data, solnproc, `diff(F(x),x)`, outpoint; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x) else outpoint := evalf(x) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .2, (1, 2) = .6355472386901964, (2, 1) = .28679901058587776, (2, 2) = .6642172351157226, (3, 1) = .4026629349647905, (3, 2) = .6898565048786539, (4, 1) = .5191388059317775, (4, 2) = .7087686351481234, (5, 1) = .6327422107075403, (5, 2) = .7672375606410581, (6, 1) = .745854892367845, (6, 2) = .8933518491303937, (7, 1) = .8652730228741763, (7, 2) = 1.0741950607628237, (8, 1) = 1.0, (8, 2) = 1.2869514632712835}, datatype = float[8], order = C_order); YP := Matrix(8, 2, {(1, 1) = .6355472386901964, (1, 2) = .2, (2, 1) = .6642172351157226, (2, 2) = .2040819987788216, (3, 1) = .6898565048786539, (3, 2) = 0.987321747068094e-1, (4, 1) = .7087686351481234, (4, 2) = .18582163798963208, (5, 1) = .7672375606410581, (5, 2) = .6263258981104891, (6, 1) = .8933518491303937, (6, 2) = 1.2240154135287016, (7, 1) = 1.0741950607628237, (7, 2) = 1.7154194632259072, (8, 1) = 1.2869514632712835, (8, 2) = 1.9589242746631386}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .0, (1, 2) = 0.13030464384801514e-6, (2, 1) = 0.1302535103026619e-7, (2, 2) = 0.14221614646911444e-6, (3, 1) = -0.4128469958203856e-7, (3, 2) = 0.15918945269923148e-6, (4, 1) = -0.7225809617070991e-7, (4, 2) = 0.11203207102741712e-6, (5, 1) = -0.5203959916725329e-7, (5, 2) = 0.648213485009814e-7, (6, 1) = -0.26104233388354814e-7, (6, 2) = 0.4841390359814309e-7, (7, 1) = -0.10238961917655763e-7, (7, 2) = 0.4628901322935305e-7, (8, 1) = .0, (8, 2) = 0.48876597274231683e-7}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [2, 8, [F(x), diff(F(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(2, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(2, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[F(x), diff(F(x), x)]'[i] = yout[i], i = 1 .. 2)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [2, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(2, {(1) = .0, (2) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(2, {(1) = 0., (2) = 0.}); `dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 2)] end proc, (2) = Array(1..3, {(1) = 18446883866908093534, (2) = 18446883866908094062, (3) = 18446883866908094238}), (3) = [x, F(x), diff(F(x), x)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(x) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x) else `diff(F(x),x)` := pointto(data[2][3]); return ('`diff(F(x),x)`')(x) end if end if; try res := solnproc(outpoint); res[3] catch: error  end try end proc

(3)

fd2x := D(eval(diff(F(x),x),sol));

D(proc (x) local res, data, solnproc, `diff(F(x),x)`, outpoint; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x) else outpoint := evalf(x) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .2, (1, 2) = .6355472386901964, (2, 1) = .28679901058587776, (2, 2) = .6642172351157226, (3, 1) = .4026629349647905, (3, 2) = .6898565048786539, (4, 1) = .5191388059317775, (4, 2) = .7087686351481234, (5, 1) = .6327422107075403, (5, 2) = .7672375606410581, (6, 1) = .745854892367845, (6, 2) = .8933518491303937, (7, 1) = .8652730228741763, (7, 2) = 1.0741950607628237, (8, 1) = 1.0, (8, 2) = 1.2869514632712835}, datatype = float[8], order = C_order); YP := Matrix(8, 2, {(1, 1) = .6355472386901964, (1, 2) = .2, (2, 1) = .6642172351157226, (2, 2) = .2040819987788216, (3, 1) = .6898565048786539, (3, 2) = 0.987321747068094e-1, (4, 1) = .7087686351481234, (4, 2) = .18582163798963208, (5, 1) = .7672375606410581, (5, 2) = .6263258981104891, (6, 1) = .8933518491303937, (6, 2) = 1.2240154135287016, (7, 1) = 1.0741950607628237, (7, 2) = 1.7154194632259072, (8, 1) = 1.2869514632712835, (8, 2) = 1.9589242746631386}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .13356755121790845, (3) = .30430039984542584, (4) = .4711335427102931, (5) = .6262694366777036, (6) = .7636417442240576, (7) = .8856536401001731, (8) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(8, 2, {(1, 1) = .0, (1, 2) = 0.13030464384801514e-6, (2, 1) = 0.1302535103026619e-7, (2, 2) = 0.14221614646911444e-6, (3, 1) = -0.4128469958203856e-7, (3, 2) = 0.15918945269923148e-6, (4, 1) = -0.7225809617070991e-7, (4, 2) = 0.11203207102741712e-6, (5, 1) = -0.5203959916725329e-7, (5, 2) = 0.648213485009814e-7, (6, 1) = -0.26104233388354814e-7, (6, 2) = 0.4841390359814309e-7, (7, 1) = -0.10238961917655763e-7, (7, 2) = 0.4628901322935305e-7, (8, 1) = .0, (8, 2) = 0.48876597274231683e-7}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [2, 8, [F(x), diff(F(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(2, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(2, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 2, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[F(x), diff(F(x), x)]'[i] = yout[i], i = 1 .. 2)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.5918945269923148e-7) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [2, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(2, {(1) = .0, (2) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(2, {(1) = 0., (2) = 0.}); `dsolve/numeric/hermite`(8, 2, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 2)] end proc, (2) = Array(1..3, {(1) = 18446883866908093534, (2) = 18446883866908094062, (3) = 18446883866908094238}), (3) = [x, F(x), diff(F(x), x)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(x) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x) else `diff(F(x),x)` := pointto(data[2][3]); return ('`diff(F(x),x)`')(x) end if end if; try res := solnproc(outpoint); res[3] catch: error  end try end proc)

(4)

plot( f, 0 .. 1, view=0 .. 1, size=[600,200] );

 

plot( fdx, 0 .. 1, view=0 .. 1.5, size=[600,200] );

 

plot( fd2x, 0 .. 1, view=0 .. 3, size=[600,200] );

 

 

Download fd2x_bvp.mw

This question has come up several times before, and you can find several old posts about it by entering the word colorbar in the Mapleprimes search.

One can manually edit the properties of the GUI Table inserted by plots:-display (to remove borders), and re-size it by dragging the borders. But such edits are lost upon re-execution.

Another possibility is to use the DocumentTools:-Tabulate command. Here is a variant on Adri's pointplot3d example.

tabulate_colorbar.mw

Unfortunately the worksheet renderer of this site is unable to inline the worksheet so that it's properly visible here.

For example here is an old post where I used Tabulate to align a 3d surface and a 2d densityplot for the colorbar. It's also possible to orient the colorbar horizontally, and locate it below/above the 3d plot. Using a 2d densityplot has the advantage that it can be constructed using the size option. However using a 2d densityplot can get tricky since one end of the hue rolls back to red. This may not match that of the 3d plot created with shading=zhue, with hue ending around magenta. So in that post I used,
    color=[f,1,1,colortype=HSV]
instead of
   shading=zhue
for the 3d surface plot.

Using the main menubar you can toggle off the item View -> Status Bar . That removes the status bar, in which the button appears (along with everything else in that bar). This aspect of the GUI's "View" is saved as a preference when the GUI is fully closed.

But I'm unaware of any way only to disable that "editable" button.

Your code assigns a value to Ha, but it appears as if you wanted the ode sys to vary with Ha=L[k].

[edit] Even if I've misunderstood the role you intend for Ha, or whether you still intend on looping, you might still utilize the visual labelling of the curves and a legend as below. [end of edit]

I'm not sure what you mean by "contour" here. Do you mean that you want to distinguish between the curves, say by color and a legend?

restart;

with(plots):

R1 := .1; R0 := .1; m := .1; a := .1;
#Ha := .1;
Nt := .1; Nb := .1; Pr := 6.2; Le := .6; Bi := 1; Ec := .1; k := 1; r := .1; A := 1; fcns := {C(y), T(y), U(y), W(y)}; sys := diff(U(y), `$`(y, 2))+(R1*(diff(U(y), y))-2*R0*W(y))*exp(a*T(y))-a*(diff(U(y), y))*(diff(T(y), y))-Ha*(U(y)+m*W(y))*exp(a*T(y))/(m^2+1)-U(y)/k+A*exp(a*T(y)) = 0, diff(W(y), `$`(y, 2))+(R1*(diff(W(y), y))+2*R0*U(y))*exp(a*T(y))-a*(diff(W(y), y))*(diff(T(y), y))-Ha*(W(y)-m*U(y))*exp(a*T(y))/(m^2+1)-W(y)/k = 0, diff(T(y), `$`(y, 2))+R1*Pr*(diff(T(y), y))+Pr*Ec*exp(-a*T(y))*((diff(U(y), y))*(diff(U(y), y))+(diff(W(y), y))*(diff(W(y), y)))+Nt*(diff(T(y), y))*(diff(T(y), y))+Pr*Ec*(U(y)*U(y)+W(y)*W(y))*exp(-a*T(y))/k = 0, diff(C(y), `$`(y, 2))+Pr*Le*R1*(diff(C(y), y))+Nt*(diff(C(y), `$`(y, 2)))/Nb-r*C(y) = 0; bc := U(0) = 0, W(0) = 0, C(0) = 0, (D(T))(0) = Bi*(T(0)-1), U(1) = 0, W(1) = 0, C(1) = 1, T(1) = 0;

.1

 

.1

 

.1

 

.1

 

.1

 

.1

 

6.2

 

.6

 

1

 

.1

 

1

 

.1

 

1

 

{C(y), T(y), U(y), W(y)}

 

diff(diff(U(y), y), y)+(.1*(diff(U(y), y))-.2*W(y))*exp(.1*T(y))-.1*(diff(U(y), y))*(diff(T(y), y))-.9900990099*Ha*(U(y)+.1*W(y))*exp(.1*T(y))-U(y)+exp(.1*T(y)) = 0, diff(diff(W(y), y), y)+(.1*(diff(W(y), y))+.2*U(y))*exp(.1*T(y))-.1*(diff(W(y), y))*(diff(T(y), y))-.9900990099*Ha*(W(y)-.1*U(y))*exp(.1*T(y))-W(y) = 0, diff(diff(T(y), y), y)+.62*(diff(T(y), y))+.62*exp(-.1*T(y))*((diff(U(y), y))^2+(diff(W(y), y))^2)+.1*(diff(T(y), y))^2+.62*(U(y)^2+W(y)^2)*exp(-.1*T(y)) = 0, 2.000000000*(diff(diff(C(y), y), y))+.372*(diff(C(y), y))-.1*C(y) = 0

 

U(0) = 0, W(0) = 0, C(0) = 0, (D(T))(0) = T(0)-1, U(1) = 0, W(1) = 0, C(1) = 1, T(1) = 0

(1)

L := [seq(0.5 .. 2.0, 0.25)]; AP := NULL;

[.5, .75, 1.00, 1.25, 1.50, 1.75, 2.00]

 

(2)

NN := nops(L);
for k to NN do
 R := dsolve(eval({bc, sys}, Ha = L[k]), fcns, type = numeric, method = bvp[midrich], AP);
 AP := approxsoln = R;
 p1u[k] := odeplot(R, [y, U(y)], 0 .. 1, numpoints = 100, labels = ["y", "U"], linestyle = dash,
                   color = ColorTools:-Color("HSV",[(k-1)/(NN),1.0,1.0]), legend=[typeset(''Ha''=L[k])]);
end do:

7

(3)

display([seq(p1u[i], i=1..NN)], legendstyle=[location=right], size=[600,400]);

 

 

Download odelegend.mw

The differences in the Matrix between k=0.001 and k=0.0001 is on the order of 10^(-6), while the values themselves range from 0 to about 1.8. So you don't see the difference between frames.

I'm presuming that the computation of the data is doing what you intend.

How about plotting the difference instead?

ps. I don't see why you'd want to set Digits to 5.

restart; Digits := 15; with(plots); with(LinearAlgebra)

NULL

a := 0; b := 1; N := 9; h := (b-a)/(N+1); phi := .5; K := 10^(-6); mu := 1.67; alpha := K/(phi*mu); lambda := alpha*k/h^2

0.119760479041916e-3*k

(1)

NULL

for i from 0 while i <= N do u[i, 0] := h*i+1 end do

NULL

for j from 0 while j <= N+1 do u[0, j] := .1; u[N+1, j] := .5 end do

NULL

printlevel := 2; for i while i <= N do for j from 0 while j <= N do eq[i, j] := lambda*u[i-1, j]+(2-2*lambda)*u[i, j]+lambda*u[i+1, j] = -lambda*u[i-1, j+1]+(2+2*lambda)*u[i, j+1]-lambda*u[i+1, j+1] end do end do; for i while i <= N do for j from 0 while j <= N do eq[i, j] := lambda*u[i-1, j]+(2-2*lambda)*u[i, j]+lambda*u[i+1, j] = -lambda*u[i-1, j+1]+(2+2*lambda)*u[i, j+1]-lambda*u[i+1, j+1] end do end do

``

``

sys := ([seq])(seq(eq[i, j], j = 0 .. N), i = 1 .. N):

nops(sys);

vars:=indets(sys) minus {k}:

nn := Matrix(N+1, N+1,(i, j)-> u[i-1, j-1]):

##

p:=proc(kk) local u_res,A;

  u_res:=solve(eval(sys,k=kk),vars);

  A:=eval(nn,u_res);

  #plots:-matrixplot(A)

end proc:

90

(2)

## Testing p for k=0.001:

plots:-matrixplot(p(0.0001)-p(0.001));

 

## Animating the plot for k=0.0001..0.001:

plots:-animate(K->plots:-matrixplot(p(0.0001)-p(K)),[k],k=0.0001..0.001);

 

 

 

NULL


Download Crank_scheme_4a.mw

I have a suspicion that this is a consequence of normal (as called by simplify) using the sign of the rational polynomial according to the lexicographic ordering of the variables.

Contrast these two cases, where variables are r and b versus r and s.

restart;
sign( (1-b/r)^(-1) );
                       -1

normal( sqrt((1-b/r)^(-1)) );
                    /    r   \1/2
                    |- ------|
                    \  -r + b/

restart;
sign( (1-s/r)^(-1) );
                        1

normal( sqrt((1-s/r)^(-1)) );
                     /  r  \1/2
                     |-----|
                     \r - s/

But, even if that speculation if correct, I'm not aware of a way to instruct kernel builtin normal to use a specific ordering for ascertaining the sign (or to enforce it somehow).

Which leaves "fixing up" the result, as recourse. One possibility here is:

H := u->simplify(sign(u)*numer(u))
        /simplify(sign(u)*denom(u)):

foo := sqrt((1-b/r)^(-1));

                      /   1   \1/2
               foo := |-------|
                      \1 - b/r/

evalindets(foo,ratpoly,H);

                       /  r  \1/2
                       |-----|
                       \r - b/

# or,

HH := u->simplify(sign(numer(u))*numer(u))
        /simplify(sign(numer(u))*denom(u)):

evalindets(foo,ratpoly,HH);

                       /  r  \1/2
                       |-----|
                       \r - b/

 

These aren't nearly as neat and quick as Axel's suggestion to turn the MeijerG call into a Sum.

kernelopts(version);

`Maple 2018.0, X86 64 LINUX, Mar 9 2018, Build ID 1298750`

(1)

restart;

ig:=(-5*ln(x)^4*Pi^4-20*ln(x)^2*Pi^4-8*Pi^4+120
    *MeijerG([[0, 0], [1, 1, 1]], [[0, 0, 0, 0, 0], []], x^Pi))
    /(120*Pi^4*(-1+x)^2):

fig := proc(X) option remember, system;
         if not X::numeric then return 'procname'(args); end if;
         NumericEventHandler(division_by_zero=default):
         evalf(eval(ig,x=X));
       end proc:

H:=IntegrationTools:-Expand(Int( (Re+I*Im)(fig(x)), x=4/10 .. 6/10,
                                 method=_d01ajc )):

CodeTools:-Usage( evalf(H) );

memory used=3.09GiB, alloc change=142.57MiB, cpu time=19.63s, real time=17.75s, gc time=3.46s

 

-0.5551687694e-2+0.8100967140e-40*I

(2)

restart;

ig:=(-5*ln(x)^4*Pi^4-20*ln(x)^2*Pi^4-8*Pi^4+120
    *MeijerG([[0, 0], [1, 1, 1]], [[0, 0, 0, 0, 0], []], x^Pi))
    /(120*Pi^4*(-1+x)^2):

fig := proc(X) option remember, system;
         if not X::numeric then return 'procname'(args); end if;
         NumericEventHandler(division_by_zero=default):
         evalf(eval(ig,x=X));
       end proc:

CodeTools:-Usage( evalf(Int( fig(x), x=4/10 .. 6/10, method=_Gquad )) );

memory used=1.39GiB, alloc change=142.57MiB, cpu time=8.97s, real time=8.16s, gc time=1.47s

 

-0.5551687694e-2+0.4526240059e-31*I

(3)

 

Download MI_int.mw

You don't need to introduce a second plot, in order to utilize plots:-display.

restart;

ode:= diff(y(x),x)=2*x:

p1:=DEtools:-DEplot(ode,y(x),x = -2 .. 2,y = -2 .. 2, [[0.1,0]],
               labels=["",""],
               linecolour = red, thickness=1,
               color = "#00ccff",
               'arrows' = 'medium'                    
               ):

plots:-display(p1, axis=[tickmarks=[color=red]],
               font=["Lucida Sans",bold,12]);

If you really are seeing a colored axis on your machine with the above code, then it's still possible to get the effect using custom tickmarks and Typesetting to color them.
First 174 175 176 177 178 179 180 Last Page 176 of 336