mmcdara

7159 Reputation

18 Badges

8 years, 250 days

MaplePrimes Activity


These are answers submitted by mmcdara


When you know that warnings may occur for some specific reason you know, use this remove them

interface(warnlevel=0)

But this might be dangerous when you get "sputious warnings" as they may reveal that something does not work as expected.
So be carefull in using the comman above.

In your case it is very easy to find that the display command is the one which produces these 3 warnings.
The reason comes from the command

dr := draw([e1(color = blue), NorA(color = red), NorB(color = red), NorC(color = red), A(color = red, symbol = solidcircle, symbolsize = 12), B(color = red, symbol = solidcircle, symbolsize = 12), C(color = red, symbol = solidcircle, symbolsize = 12), Oo(color = red, symbol = solidcircle, symbolsize = 12)]);

To see what happens just do 

draw(NorA(color = red))

What do you get? Some line;: No; what you get it a boxed frameworkwith noting drawn inside.
So run this command

detail(NorA)

You get the equation of a line with two names A[1] and A[2]... and thus draw simply returns nothing.

To fix this define NorA, NorB, NorC this way

line(NorA, y - coordinates(A)[2] = a^2*coordinates(A)[2]*(x - coordinates(A)[1])/b^2, [x, y]);
line(NorB, y - coordinates(B)[2] = a^2*coordinates(B)[2]*(x - coordinates(B)[1])/b^2, [x, y]);
line(NorC, y - coordinates(C)[2] = a^2*coordinates(C)[2]*(x - coordinates(C)[1])/b^2, [x, y]);


sol.mw


PS: Vous pourriez avoir un peu plus de respect pour ceux dont vous sollicitez de l'aide en livrant une feuille de travail Maple plutôt qu'un copié-collé produit par Mistral. 

After your second restart you write N:=2: This is inconsistent with what comes after (obviously i ranges from 1 to 3 and not 1 to 2 in thedefinition of f0). 

Once this corrected:

First thing: The Iterator package is not part of my Maple 2015 version, so I used in this workshet a workaround that you can ignore and replace by your own two command lines.

Second thing: I don't understand what your last comment "Change b[1,2]*b[2,3]*b[1,3] to b[1,2,3], etc" does mean. More precisely what does etc mean???

So I interpreted this comment in a way which might not be the correct one

m-lump_2015.mw

Before trying to use dsolve blindly verify if your problem is correctly posed.

Read carefully the code after the comment STEP by STEP explanation : it is a kind of "debugging process" to understand where your error comes from and how to fix them ny yourselve.

At the end, once you have understood what I wrote, it will be on you to pose your problem correctly.

restart

kernelopts(version);

`Maple 2015.2, APPLE UNIVERSAL OSX, Dec 20 2015, Build ID 1097895`

(1)

with(PDETools, declare):

with(plots):

eq1 := diff(f(x), x, x, x)-(diff(f(x), x))^2+theta*Gr+f(x)*(diff(f(x), x, x))-M^2*(diff(f(x), x))-(diff(f(x), x))^2*G[1]-(diff(f(x), x))*j[1] = 0;

diff(diff(diff(f(x), x), x), x)-(diff(f(x), x))^2+theta*Gr+f(x)*(diff(diff(f(x), x), x))-M^2*(diff(f(x), x))-(diff(f(x), x))^2*G[1]-(diff(f(x), x))*j[1] = 0

 

(1+(4/3)*R)*(diff(diff(theta(x), x), x))/Pr+f(x)*(diff(theta(x), x))+Delta*theta-g[1]*theta*(diff(f(x), x))+N[b]*(diff(theta(x), x))*(diff(phi(x), x))+N[t]*(diff(theta(x), x))^2 = 0

 

diff(diff(phi(x), x), x)+Sc*f(x)*(diff(phi(x), x))+N[t]*(diff(diff(theta(x), x), x))/N[b] = 0

(2)

bcs := f(0) = .45, (D(f))(0) = 1, (D(f))(7) = 0, theta(0) = 1, theta(7) = 0, phi(0) = 1, phi(7) = 0;

f(0) = .45, (D(f))(0) = 1, (D(f))(7) = 0, theta(0) = 1, theta(7) = 0, phi(0) = 1, phi(7) = 0

(3)

a1 := [M = .8, Gr = 2.0, G[1] = .5, j[1] = .4, N[t] = .7, N[b] = .1, Sc = .4, R = 1.0, Delta = .5, g[1] = .5, Pr = 2.5, eta = 3];

[M = .8, Gr = 2.0, G[1] = .5, j[1] = .4, N[t] = .7, N[b] = .1, Sc = .4, R = 1.0, Delta = .5, g[1] = .5, Pr = 2.5, eta = 3]

 

[M = .8, Gr = 2.0, G[1] = .5, j[1] = .4, N[t] = .7, N[b] = .2, Sc = .4, R = 1.0, Delta = .5, g[1] = .5, Pr = 2.5, eta = 3]

 

[M = .8, Gr = 2.0, G[1] = .5, j[1] = .4, N[t] = .7, N[b] = .3, Sc = .4, R = 1.0, Delta = .5, g[1] = .5, Pr = 2.5, eta = 3]

 

[M = .8, Gr = 2.0, G[1] = .5, j[1] = .4, N[t] = .7, N[b] = .4, Sc = .4, R = 1.0, Delta = .5, g[1] = .5, Pr = 2.5, eta = 3]

(4)

b1 := subs(a1, eq3);

diff(diff(phi(x), x), x)+.4*f(x)*(diff(phi(x), x))+7.000000000*(diff(diff(theta(x), x), x)) = 0

 

diff(diff(phi(x), x), x)+.4*f(x)*(diff(phi(x), x))+3.500000000*(diff(diff(theta(x), x), x)) = 0

 

diff(diff(phi(x), x), x)+.4*f(x)*(diff(phi(x), x))+2.333333333*(diff(diff(theta(x), x), x)) = 0

 

diff(diff(phi(x), x), x)+.4*f(x)*(diff(phi(x), x))+1.750000000*(diff(diff(theta(x), x), x)) = 0

(5)


STEP by STEP explanation

# Functions which appear through derivatives

select(has, indets(b1, function), diff)

{diff(diff(phi(x), x), x), diff(diff(theta(x), x), x), diff(phi(x), x), diff(theta(x), x)}

(6)

# You have to give 2 BCs for phi and theta
# BCs for f are useless
#
# Example

bcs_version_1 := theta(0) = 1, theta(7) = 0, phi(0) = 1, phi(7) = 0;

# Let us try this

sol_version_1 := dsolve({b1, bcs_version_1}, numeric);  # No 'eval' is requiered here

theta(0) = 1, theta(7) = 0, phi(0) = 1, phi(7) = 0

 

Error, (in dsolve/numeric/bvp/convertsys) the ODE system does not contain derivatives of the unknown function f

 

# What this happen?
#
# b1 contains the abstract function f(x) and Maple does not know how to consider it.
# By default Maple considers f(x) is a function defined through some ODE and asks for
# IC/BC.
#
# But we saw above thos ODE does not exist.
# As you are using dsol/numeric (not dsolve/symbolic) you must provide an algebraic expression
# for f(x)
#
# Example

My_f := x -> 1:

b1_version_2 := eval(b1, f = (x -> My_f(x)));

sol_version_12 := dsolve({b1_version_2, bcs_version_1}, numeric)

diff(diff(phi(x), x), x)+.4*(diff(phi(x), x))+7.000000000*(diff(diff(theta(x), x), x)) = 0

 

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system

 

# Still an error
#
# You have two functions which intervene both through derivatives but you have only
# one ODE.
#
# So, either you give one ofthem an analytic expression... or you introduce a second ODE.
#
# Example (choice 1)

My_theta := x -> cos(x):

b1_version_21 := eval(b1_version_2, theta = (x -> My_theta(x)));

sol_version_121 := dsolve({b1_version_21, bcs_version_1}, numeric);
 

diff(diff(phi(x), x), x)+.4*(diff(phi(x), x))-7.000000000*cos(x) = 0

 

Error, (in dsolve/numeric/process_input) invalid specification of initial conditions, got {theta(0) = 1, theta(7) = 0}

 

# Here the error is due to the fact that there exist BC on some function (theta) which no
# longer exist.
# Then remove the and look to what it happens

bcs_version_2 := remove(has, {bcs_version_1}, theta);

sol_version_221 := dsolve({b1_version_21, bcs_version_2[]}, numeric);

# Now you get a result without no more error.

{phi(0) = 1, phi(7) = 0}

 

proc (x_bvp) local res, data, solnproc, _ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x_bvp) else outpoint := evalf(x_bvp) 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(25, {(1) = .0, (2) = .2845794951815041, (3) = .5802905055695667, (4) = .8885514207025176, (5) = 1.2072408515580282, (6) = 1.5241277598656842, (7) = 1.8382008239664442, (8) = 2.149174530656815, (9) = 2.454885413871613, (10) = 2.7552060874703397, (11) = 3.0504383007402915, (12) = 3.341945280064638, (13) = 3.6304496964963757, (14) = 3.916042462400899, (15) = 4.199264378526463, (16) = 4.481461632120577, (17) = 4.762724895602928, (18) = 5.043072238353252, (19) = 5.322982531757949, (20) = 5.60272511766346, (21) = 5.882300297153527, (22) = 6.161736333213332, (23) = 6.4411575554755345, (24) = 6.720578777737737, (25) = 7.0}, datatype = float[8], order = C_order); Y := Matrix(25, 2, {(1, 1) = 1.0, (1, 2) = .680000113877016, (2, 1) = 1.4540344894609882, (2, 2) = 2.463663505833786, (3, 1) = 2.4133563766655417, (3, 2) = 3.9525259361508316, (4, 1) = 3.806469293070552, (4, 2) = 4.990526648497383, (5, 1) = 5.484513374261103, (5, 2) = 5.4286636191202335, (6, 1) = 7.185613557031606, (6, 2) = 5.198133226626437, (7, 1) = 8.700318339263731, (7, 2) = 4.35109243403419, (8, 1) = 9.854835597801994, (8, 2) = 2.9995181989632598, (9, 1) = 10.520628264025243, (9, 2) = 1.3097082601253847, (10, 1) = 10.639047230240717, (10, 2) = -.5377118814794638, (11, 1) = 10.208598658044096, (11, 2) = -2.3662421601997328, (12, 1) = 9.272019330320754, (12, 2) = -4.021912028517894, (13, 1) = 7.908633538352818, (13, 2) = -5.370773086444524, (14, 1) = 6.2304684531398875, (14, 2) = -6.307447573944695, (15, 1) = 4.367478957858471, (15, 2) = -6.765495697796848, (16, 1) = 2.4532747959522974, (16, 2) = -6.715491733720893, (17, 1) = .6306526038008767, (17, 2) = -6.163394831083677, (18, 1) = -.9657591305154667, (18, 2) = -5.154441254712672, (19, 1) = -2.222019341567904, (19, 2) = -3.7663470770234446, (20, 1) = -3.0482022672294895, (20, 2) = -2.1047744945032707, (21, 1) = -3.385816445756158, (21, 2) = -.2973066715468748, (22, 1) = -3.213883951896306, (22, 2) = 1.5174992505865381, (23, 1) = -2.550009800084594, (23, 2) = 3.2012162343653574, (24, 1) = -1.4492056621226057, (24, 2) = 4.624740690704019, (25, 1) = .0, (25, 2) = 5.678906303352601}, datatype = float[8], order = C_order); YP := Matrix(25, 2, {(1, 1) = .680000113877016, (1, 2) = 6.727999954449194, (2, 1) = 2.463663505833786, (2, 2) = 5.732993168764835, (3, 1) = 3.9525259361508316, (3, 2) = 4.273113499848399, (4, 1) = 4.990526648497383, (4, 2) = 2.417548451570903, (5, 1) = 5.4286636191202335, (5, 2) = .3177314557407489, (6, 1) = 5.198133226626437, (6, 2) = -1.752691891619449, (7, 1) = 4.35109243403419, (7, 2) = -3.5900404704335074, (8, 1) = 2.9995181989632598, (8, 2) = -5.026473793037796, (9, 1) = 1.3097082601253847, (9, 2) = -5.937247865802401, (10, 1) = -.5377118814794638, (10, 2) = -6.268852877857702, (11, 1) = -2.3662421601997328, (11, 2) = -6.024441361269366, (12, 1) = -4.021912028517894, (12, 2) = -5.251210414497452, (13, 1) = -5.370773086444524, (13, 2) = -4.031782077027102, (14, 1) = -6.307447573944695, (14, 2) = -2.480662295094154, (15, 1) = -6.765495697796848, (15, 2) = -.7301145902921422, (16, 1) = -6.715491733720893, (16, 2) = 1.084034220951506, (17, 1) = -6.163394831083677, (17, 2) = 2.817560565427252, (18, 1) = -5.154441254712672, (18, 2) = 4.334601907617293, (19, 1) = -3.7663470770234446, (19, 2) = 5.520015867378172, (20, 1) = -2.1047744945032707, (20, 2) = 6.282892705082078, (21, 1) = -.2973066715468748, (21, 2) = 6.563934628042916, (22, 1) = 1.5174992505865381, (22, 2) = 6.341439236571117, (23, 1) = 3.2012162343653574, (23, 2) = 5.632351685288582, (24, 1) = 4.624740690704019, (24, 2) = 4.49111540968702, (25, 1) = 5.678906303352601, (25, 2) = 3.0057532590620917}, 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(25, {(1) = .0, (2) = .2845794951815041, (3) = .5802905055695667, (4) = .8885514207025176, (5) = 1.2072408515580282, (6) = 1.5241277598656842, (7) = 1.8382008239664442, (8) = 2.149174530656815, (9) = 2.454885413871613, (10) = 2.7552060874703397, (11) = 3.0504383007402915, (12) = 3.341945280064638, (13) = 3.6304496964963757, (14) = 3.916042462400899, (15) = 4.199264378526463, (16) = 4.481461632120577, (17) = 4.762724895602928, (18) = 5.043072238353252, (19) = 5.322982531757949, (20) = 5.60272511766346, (21) = 5.882300297153527, (22) = 6.161736333213332, (23) = 6.4411575554755345, (24) = 6.720578777737737, (25) = 7.0}, datatype = float[8], order = C_order); Y := Matrix(25, 2, {(1, 1) = .0, (1, 2) = -0.386828811067095e-9, (2, 1) = -0.2216993652237478e-8, (2, 2) = 0.14616118388886258e-8, (3, 1) = -0.7455359978153146e-8, (3, 2) = 0.4710721571687838e-8, (4, 1) = -0.16982400311690186e-7, (4, 2) = 0.9783146113229471e-8, (5, 1) = -0.30786424328469905e-7, (5, 2) = 0.16376183200789656e-7, (6, 1) = -0.42994838799769425e-7, (6, 2) = 0.21679520965836272e-7, (7, 1) = -0.5199511141359532e-7, (7, 2) = 0.25066260659017816e-7, (8, 1) = -0.57048689185532754e-7, (8, 2) = 0.26345990690227306e-7, (9, 1) = -0.5764327724544523e-7, (9, 2) = 0.25512842943438724e-7, (10, 1) = -0.5454799668685388e-7, (10, 2) = 0.23057686439816014e-7, (11, 1) = -0.48775069611964923e-7, (11, 2) = 0.1952775106925937e-7, (12, 1) = -0.4123996424533945e-7, (12, 2) = 0.1536586484164985e-7, (13, 1) = -0.3267675690322781e-7, (13, 2) = 0.10934233693752469e-7, (14, 1) = -0.2380016759889455e-7, (14, 2) = 0.6579831839030053e-8, (15, 1) = -0.15163340859773915e-7, (15, 2) = 0.25529972644398807e-8, (16, 1) = -0.70473915201684054e-8, (16, 2) = -0.10263308878804077e-8, (17, 1) = 0.8879410521278488e-10, (17, 2) = -0.396150548455334e-8, (18, 1) = 0.58580954539161245e-8, (18, 2) = -0.6103585276554362e-8, (19, 1) = 0.10054792443665074e-7, (19, 2) = -0.7389912750476629e-8, (20, 1) = 0.12515005620175738e-7, (20, 2) = -0.7786388630503472e-8, (21, 1) = 0.1314747786841381e-7, (21, 2) = -0.73037450796828595e-8, (22, 1) = 0.11994749277089035e-7, (22, 2) = -0.6016610201442588e-8, (23, 1) = 0.922090957032956e-8, (23, 2) = -0.4052497756437588e-8, (24, 1) = 0.50988935528244924e-8, (24, 2) = -0.15865659658969408e-8, (25, 1) = .0, (25, 2) = 0.1169288499659421e-8}, 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[25] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(5.764327724544523e-8) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [2, 25, [phi(x), diff(phi(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[25] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[25] 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`(25, 2, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(2, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(25, 2, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[phi(x), diff(phi(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[25] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(5.764327724544523e-8) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [2, 25, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[25] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[25] 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`(25, 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`(25, 2, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 2)] end proc, (2) = Array(0..0, {}), (3) = [x, phi(x), diff(phi(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_bvp) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x_bvp) else _ndsol := pointto(data[2][0]); return ('_ndsol')(x_bvp) end if end if; try res := solnproc(outpoint); [x = res[1], seq('[phi(x), diff(phi(x), x)]'[i] = res[i+1], i = 1 .. 2)] catch: error  end try end proc

(7)

# Example (choice 2)

theta_ODE := diff(theta(x), x$2) = -cos(x);

sol_version_122 := dsolve({b1_version_21, theta_ODE, bcs_version_1}, numeric);

diff(diff(theta(x), x), x) = -cos(x)

 

proc (x_bvp) local res, data, solnproc, _ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x_bvp) else outpoint := evalf(x_bvp) 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(25, {(1) = .0, (2) = .28520548245364286, (3) = .5804267750886297, (4) = .8867996014587105, (5) = 1.2024168713093397, (6) = 1.516490756931242, (7) = 1.828081490992342, (8) = 2.1369804990785846, (9) = 2.441297638072586, (10) = 2.740843228475919, (11) = 3.0358473137457134, (12) = 3.3274938221286643, (13) = 3.6165102799031974, (14) = 3.9029665821545896, (15) = 4.187278554555015, (16) = 4.4706485025470535, (17) = 4.753178280859624, (18) = 5.034879807884609, (19) = 5.316114597466504, (20) = 5.597108322973903, (21) = 5.877861603239838, (22) = 6.158413231749467, (23) = 6.4389421544996335, (24) = 6.7194710772498, (25) = 7.0}, datatype = float[8], order = C_order); Y := Matrix(25, 4, {(1, 1) = 1.0, (1, 2) = .6800001141915756, (1, 3) = 1.0, (1, 4) = -.10770032145261926, (2, 1) = 1.4555778346757655, (2, 2) = 2.467251452269994, (2, 3) = .9288871372343895, (2, 4) = -.38905496030243697, (3, 1) = 2.41389502527256, (3, 2) = 3.9531081800302297, (3, 3) = .7737165400395145, (3, 4) = -.6560811894451447, (4, 1) = 3.7977305074549896, (4, 2) = 4.986281722155367, (4, 3) = .5363871347833484, (4, 4) = -.8827537230163028, (5, 1) = 5.458329428543932, (5, 2) = 5.427053283664983, (5, 3) = .23060339365575372, (5, 4) = -1.0406124558656162, (6, 1) = 7.145864751639465, (6, 2) = 5.211334913005845, (6, 3) = -.1090476642823681, (6, 4) = -1.106226135662627, (7, 1) = 8.656105291435619, (7, 2) = 4.387148425267441, (7, 3) = -.4513409872291526, (7, 4) = -1.0747846682597781, (8, 1) = 9.817886839751916, (8, 2) = 3.06052326126533, (8, 3) = -.7665690720379669, (8, 4) = -.9516543047346938, (9, 1) = 10.502285020674476, (9, 2) = 1.3901891996747462, (9, 3) = -1.0275806475847535, (9, 4) = -.7521436205601852, (10, 1) = 10.646123777846578, (10, 2) = -.4476899047049343, (10, 3) = -1.2159586001919325, (10, 4) = -.49780882034435076, (11, 1) = 10.242482266704474, (11, 2) = -2.278154170876014, (11, 3) = -1.3213759092969448, (11, 4) = -.21324869596893348, (12, 1) = 9.329591730689856, (12, 2) = -3.945662326965407, (12, 3) = -1.3411422471054835, (12, 4) = 0.7713192838752932e-1, (13, 1) = 7.9831050732299085, (13, 2) = -5.314098252522818, (13, 3) = -1.2788297188219224, (13, 4) = .3495648696077279, (14, 1) = 6.31272962090734, (14, 2) = -6.274508403873006, (14, 3) = -1.1442395610365943, (14, 4) = .5822163456476159, (15, 1) = 4.448514720431188, (15, 2) = -6.756285897222395, (15, 3) = -.952279808998006, (15, 4) = .7575682675818803, (16, 1) = 2.5259523072397716, (16, 2) = -6.726840319017909, (16, 3) = -.7208831449003039, (16, 4) = .8632224657350345, (17, 1) = .6896197010206715, (17, 2) = -6.190025385322881, (17, 3) = -.4711408436738631, (17, 4) = .8914679098482646, (18, 1) = -.9233867179040366, (18, 2) = -5.189787797755726, (18, 3) = -.22532821479950457, (18, 4) = .8407486212772263, (19, 1) = -2.1960223235374414, (19, 2) = -3.8041747048793875, (19, 3) = -0.4833823450593729e-2, (19, 4) = .7155259283310865, (20, 1) = -3.036281130330681, (20, 2) = -2.140034201882414, (20, 3) = .17092684962735377, (20, 4) = .5258063597197039, (21, 1) = -3.3844321334512153, (21, 2) = -.32644082827058757, (21, 3) = .28592721573290636, (21, 4) = .28661593509633077, (22, 1) = -3.218891731891214, (22, 2) = 1.4964167203250038, (22, 3) = .3289629696080515, (22, 4) = 0.16748262350674885e-1, (23, 1) = -2.557087950205907, (23, 2) = 3.1887300964101932, (23, 3) = .2944182621774102, (23, 4) = -.2628281503292269, (24, 1) = -1.454325733487907, (24, 2) = 4.619762960152376, (24, 3) = .1826382571203129, (24, 4) = -.5302764003905673, (25, 1) = .0, (25, 2) = 5.678906303600271, (25, 3) = .0, (25, 4) = -.7646869199395754}, datatype = float[8], order = C_order); YP := Matrix(25, 4, {(1, 1) = .6800001141915756, (1, 2) = 6.72799995432337, (1, 3) = -.10770032145261926, (1, 4) = -1.0, (2, 1) = 2.467251452269994, (2, 2) = 5.730326435416583, (2, 3) = -.38905496030243697, (2, 4) = -.95960385947494, (3, 1) = 3.9531081800302297, (3, 2) = 4.272357563466833, (3, 3) = -.6560811894451447, (3, 4) = -.8362286907827035, (4, 1) = 4.986281722155367, (4, 2) = 2.4287574787194566, (4, 3) = -.8827537230163028, (4, 4) = -.6318957382259434, (5, 1) = 5.427053283664983, (5, 2) = .34990724534380924, (5, 3) = -1.0406124558656162, (5, 4) = -.3601040798299718, (6, 1) = 5.211334913005845, (6, 2) = -1.7045817929344094, (6, 3) = -1.106226135662627, (6, 4) = -0.5427888175256125e-1, (7, 1) = 4.387148425267441, (7, 2) = -3.536051493439708, (7, 3) = -1.0747846682597781, (7, 4) = .25445601761896164, (8, 1) = 3.06052326126533, (8, 2) = -4.9791183560505745, (8, 3) = -.9516543047346938, (8, 4) = .5364155787920631, (9, 1) = 1.3901891996747462, (9, 2) = -5.908640378395377, (9, 3) = -.7521436205601852, (9, 4) = .7646520997893541, (10, 1) = -.4476899047049343, (10, 2) = -6.266306306570833, (10, 3) = -.49780882034435076, (10, 4) = .920768895493258, (11, 1) = -2.278154170876014, (11, 2) = -6.049637518575932, (11, 3) = -.21324869596893348, (11, 4) = .9944141695609054, (12, 1) = -3.945662326965407, (12, 2) = -5.301125662115611, (12, 3) = 0.7713192838752932e-1, (12, 4) = .9827700847002534, (13, 1) = -5.314098252522818, (13, 2) = -4.099673437810365, (13, 3) = .3495648696077279, (13, 4) = .8893303912599275, (14, 1) = -6.274508403873006, (14, 2) = -2.5574182248522686, (14, 3) = .5822163456476159, (14, 4) = .7238887980573531, (15, 1) = -6.756285897222395, (15, 2) = -.8066455312345733, (15, 3) = .7575682675818803, (15, 4) = .5013085557319331, (16, 1) = -6.726840319017909, (16, 2) = 1.014986123288068, (16, 3) = .8632224657350345, (16, 4) = .23939285775987082, (17, 1) = -6.190025385322881, (17, 2) = 2.7614560894974827, (17, 3) = .8914679098482646, (17, 4) = -0.4077799076690431e-1, (18, 1) = -5.189787797755726, (18, 2) = 4.294424867345132, (18, 3) = .8407486212772263, (18, 4) = -.3169299640346917, (19, 1) = -3.8041747048793875, (19, 2) = 5.495663906439946, (19, 3) = .7155259283310865, (19, 4) = -.5677134320697415, (20, 1) = -2.140034201882414, (20, 2) = 6.272174215576857, (20, 3) = .5258063597197039, (20, 4) = -.7737372192605559, (21, 1) = -.32644082827058757, (21, 2) = 6.563399956432721, (21, 3) = .28661593509633077, (21, 4) = -.9189748035892124, (22, 1) = 1.4964167203250038, (22, 2) = 6.347015717113467, (22, 3) = 0.16748262350674885e-1, (22, 4) = -.9922260578919242, (23, 1) = 3.1887300964101932, (23, 2) = 5.639768800955563, (23, 3) = -.2628281503292269, (23, 4) = -.9878944056456629, (24, 1) = 4.619762960152376, (24, 2) = 4.496387007564442, (24, 3) = -.5302764003905673, (24, 4) = -.9063274559464846, (25, 1) = 5.678906303600271, (25, 2) = 3.005753258963024, (25, 3) = -.7646869199395754, (25, 4) = -.7539022543433046}, 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(25, {(1) = .0, (2) = .28520548245364286, (3) = .5804267750886297, (4) = .8867996014587105, (5) = 1.2024168713093397, (6) = 1.516490756931242, (7) = 1.828081490992342, (8) = 2.1369804990785846, (9) = 2.441297638072586, (10) = 2.740843228475919, (11) = 3.0358473137457134, (12) = 3.3274938221286643, (13) = 3.6165102799031974, (14) = 3.9029665821545896, (15) = 4.187278554555015, (16) = 4.4706485025470535, (17) = 4.753178280859624, (18) = 5.034879807884609, (19) = 5.316114597466504, (20) = 5.597108322973903, (21) = 5.877861603239838, (22) = 6.158413231749467, (23) = 6.4389421544996335, (24) = 6.7194710772498, (25) = 7.0}, datatype = float[8], order = C_order); Y := Matrix(25, 4, {(1, 1) = .0, (1, 2) = -0.7015069783321377e-9, (1, 3) = .0, (1, 4) = -0.5965656887873573e-9, (2, 1) = -0.23419904967339463e-8, (2, 2) = 0.12117914769870434e-8, (2, 3) = -0.6988221912180033e-10, (2, 4) = -0.7360660541260077e-9, (3, 1) = -0.7581195258999318e-8, (3, 2) = 0.44477264061633045e-8, (3, 3) = 0.14026482338789395e-9, (3, 4) = -0.8989594038105847e-9, (4, 1) = -0.166979179613667e-7, (4, 2) = 0.9303801157844887e-8, (4, 3) = 0.7726610329851505e-9, (4, 4) = -0.10717291859501544e-8, (5, 1) = -0.29504315499220376e-7, (5, 2) = 0.15433270292964003e-7, (5, 3) = 0.1897371148385938e-8, (5, 4) = -0.1215573317985683e-8, (6, 1) = -0.4095776458114617e-7, (6, 2) = 0.20421023018317123e-7, (6, 3) = 0.31296694108390305e-8, (6, 4) = -0.1273626297873477e-8, (7, 1) = -0.495552731106085e-7, (7, 2) = 0.2367435799081896e-7, (7, 3) = 0.4299295107747069e-8, (7, 4) = -0.1247102621312409e-8, (8, 1) = -0.5456862366461368e-7, (8, 2) = 0.24989537653112128e-7, (8, 3) = 0.5283688944596066e-8, (8, 4) = -0.11485072811566145e-8, (9, 1) = -0.5545807727832772e-7, (9, 2) = 0.24323033428771882e-7, (9, 3) = 0.595861720640578e-8, (9, 4) = -0.10024667080314673e-8, (10, 1) = -0.5280149631736434e-7, (10, 2) = 0.22075216342591082e-7, (10, 3) = 0.6307142990864475e-8, (10, 4) = -0.8331553746433627e-9, (11, 1) = -0.4746483117748984e-7, (11, 2) = 0.18730783839641616e-7, (11, 3) = 0.6355167829862161e-8, (11, 4) = -0.6603314496931463e-9, (12, 1) = -0.40286883814052245e-7, (12, 2) = 0.14707115641354395e-7, (12, 3) = 0.6146987777745153e-8, (12, 4) = -0.4956897879397524e-9, (13, 1) = -0.3196335776467257e-7, (13, 2) = 0.10353703028456993e-7, (13, 3) = 0.572387482707407e-8, (13, 4) = -0.34940367176685377e-9, (14, 1) = -0.2319611091857721e-7, (14, 2) = 0.6017831105147596e-8, (14, 3) = 0.5135552400129261e-8, (14, 4) = -0.23097926591791715e-9, (15, 1) = -0.14568936052459186e-7, (15, 2) = 0.19697237353884613e-8, (15, 3) = 0.4432324943689459e-8, (15, 4) = -0.14565999002417557e-9, (16, 1) = -0.6410382958141966e-8, (16, 2) = -0.16464434352513352e-8, (16, 3) = 0.3648773527807103e-8, (16, 4) = -0.9526716154865928e-10, (17, 1) = 0.7982532172029822e-9, (17, 2) = -0.4622532222662276e-8, (17, 3) = 0.28362462783361233e-8, (17, 4) = -0.8203345859682403e-10, (18, 1) = 0.6641790807729078e-8, (18, 2) = -0.67965150474308445e-8, (18, 3) = 0.20472289485995545e-8, (18, 4) = -0.10538202154419052e-9, (19, 1) = 0.10873197068473307e-7, (19, 2) = -0.8089560828637094e-8, (19, 3) = 0.13238666882840484e-8, (19, 4) = -0.16245538409690216e-9, (20, 1) = 0.1331323636811854e-7, (20, 2) = -0.8463393358019913e-8, (20, 3) = 0.7057083300480924e-9, (20, 4) = -0.24848113430325744e-9, (21, 1) = 0.13869862627268089e-7, (21, 2) = -0.7930735714966703e-8, (21, 3) = 0.22775201526424163e-9, (21, 4) = -0.35638263891457173e-9, (22, 1) = 0.125914677539068e-7, (22, 2) = -0.6570863156361201e-8, (22, 3) = -0.8661712219936396e-10, (22, 4) = -0.477599099037555e-9, (23, 1) = 0.9649616429420714e-8, (23, 2) = -0.4515509635171421e-8, (23, 3) = -0.22653672532804103e-9, (23, 4) = -0.6031151379294315e-9, (24, 1) = 0.5324781923122823e-8, (24, 2) = -0.1945076363704714e-8, (24, 3) = -0.19288727142698676e-9, (24, 4) = -0.7231862652462719e-9, (25, 1) = .0, (25, 2) = 0.9215035892091513e-9, (25, 3) = .0, (25, 4) = -0.8284250125731864e-9}, 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[25] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(5.545807727832772e-8) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [4, 25, [phi(x), diff(phi(x), x), theta(x), diff(theta(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[25] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[25] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(4, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(25, 4, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(4, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(25, 4, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[phi(x), diff(phi(x), x), theta(x), diff(theta(x), x)]'[i] = yout[i], i = 1 .. 4)] 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[25] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(5.545807727832772e-8) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [4, 25, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[25] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[25] 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(4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(25, 4, 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(4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}); `dsolve/numeric/hermite`(25, 4, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 4)] end proc, (2) = Array(0..0, {}), (3) = [x, phi(x), diff(phi(x), x), theta(x), diff(theta(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_bvp) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x_bvp) else _ndsol := pointto(data[2][0]); return ('_ndsol')(x_bvp) end if end if; try res := solnproc(outpoint); [x = res[1], seq('[phi(x), diff(phi(x), x), theta(x), diff(theta(x), x)]'[i] = res[i+1], i = 1 .. 4)] catch: error  end try end proc

(8)

 


 

Download sps1_mmcdara.mw
 

restart

kernelopts(version);

`Maple 2015.2, APPLE UNIVERSAL OSX, Dec 20 2015, Build ID 1097895`

(1)

with(PDETools, declare):

with(plots):

eq1 := diff(f(x), x, x, x)-(diff(f(x), x))^2+theta*Gr+f(x)*(diff(f(x), x, x))-M^2*(diff(f(x), x))-(diff(f(x), x))^2*G[1]-(diff(f(x), x))*j[1] = 0;

diff(diff(diff(f(x), x), x), x)-(diff(f(x), x))^2+theta*Gr+f(x)*(diff(diff(f(x), x), x))-M^2*(diff(f(x), x))-(diff(f(x), x))^2*G[1]-(diff(f(x), x))*j[1] = 0

 

(1+(4/3)*R)*(diff(diff(theta(x), x), x))/Pr+f(x)*(diff(theta(x), x))+Delta*theta-g[1]*theta*(diff(f(x), x))+N[b]*(diff(theta(x), x))*(diff(phi(x), x))+N[t]*(diff(theta(x), x))^2 = 0

 

diff(diff(phi(x), x), x)+Sc*f(x)*(diff(phi(x), x))+N[t]*(diff(diff(theta(x), x), x))/N[b] = 0

(2)

bcs := f(0) = .45, (D(f))(0) = 1, (D(f))(7) = 0, theta(0) = 1, theta(7) = 0, phi(0) = 1, phi(7) = 0;

f(0) = .45, (D(f))(0) = 1, (D(f))(7) = 0, theta(0) = 1, theta(7) = 0, phi(0) = 1, phi(7) = 0

(3)

a1 := [M = .8, Gr = 2.0, G[1] = .5, j[1] = .4, N[t] = .7, N[b] = .1, Sc = .4, R = 1.0, Delta = .5, g[1] = .5, Pr = 2.5, eta = 3];

[M = .8, Gr = 2.0, G[1] = .5, j[1] = .4, N[t] = .7, N[b] = .1, Sc = .4, R = 1.0, Delta = .5, g[1] = .5, Pr = 2.5, eta = 3]

 

[M = .8, Gr = 2.0, G[1] = .5, j[1] = .4, N[t] = .7, N[b] = .2, Sc = .4, R = 1.0, Delta = .5, g[1] = .5, Pr = 2.5, eta = 3]

 

[M = .8, Gr = 2.0, G[1] = .5, j[1] = .4, N[t] = .7, N[b] = .3, Sc = .4, R = 1.0, Delta = .5, g[1] = .5, Pr = 2.5, eta = 3]

 

[M = .8, Gr = 2.0, G[1] = .5, j[1] = .4, N[t] = .7, N[b] = .4, Sc = .4, R = 1.0, Delta = .5, g[1] = .5, Pr = 2.5, eta = 3]

(4)

b1 := subs(a1, eq3);

diff(diff(phi(x), x), x)+.4*f(x)*(diff(phi(x), x))+7.000000000*(diff(diff(theta(x), x), x)) = 0

 

diff(diff(phi(x), x), x)+.4*f(x)*(diff(phi(x), x))+3.500000000*(diff(diff(theta(x), x), x)) = 0

 

diff(diff(phi(x), x), x)+.4*f(x)*(diff(phi(x), x))+2.333333333*(diff(diff(theta(x), x), x)) = 0

 

diff(diff(phi(x), x), x)+.4*f(x)*(diff(phi(x), x))+1.750000000*(diff(diff(theta(x), x), x)) = 0

(5)


STEP by STEP explanation

# Functions which appear through derivatives

select(has, indets(b1, function), diff)

{diff(diff(phi(x), x), x), diff(diff(theta(x), x), x), diff(phi(x), x), diff(theta(x), x)}

(6)

# You have to give 2 BCs for phi and theta
# BCs for f are useless
#
# Example

bcs_version_1 := theta(0) = 1, theta(7) = 0, phi(0) = 1, phi(7) = 0;

# Let us try this

sol_version_1 := dsolve({b1, bcs_version_1}, numeric);  # No 'eval' is requiered here

theta(0) = 1, theta(7) = 0, phi(0) = 1, phi(7) = 0

 

Error, (in dsolve/numeric/bvp/convertsys) the ODE system does not contain derivatives of the unknown function f

 

# What this happen?
#
# b1 contains the abstract function f(x) and Maple does not know how to consider it.
# By default Maple considers f(x) is a function defined through some ODE and asks for
# IC/BC.
#
# But we saw above thos ODE does not exist.
# As you are using dsol/numeric (not dsolve/symbolic) you must provide an algebraic expression
# for f(x)
#
# Example

My_f := x -> 1:

b1_version_2 := eval(b1, f = (x -> My_f(x)));

sol_version_12 := dsolve({b1_version_2, bcs_version_1}, numeric)

diff(diff(phi(x), x), x)+.4*(diff(phi(x), x))+7.000000000*(diff(diff(theta(x), x), x)) = 0

 

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system

 

# Still an error
#
# You have two functions which intervene both through derivatives but you have only
# one ODE.
#
# So, either you give one ofthem an analytic expression... or you introduce a second ODE.
#
# Example (choice 1)

My_theta := x -> cos(x):

b1_version_21 := eval(b1_version_2, theta = (x -> My_theta(x)));

sol_version_121 := dsolve({b1_version_21, bcs_version_1}, numeric);
 

diff(diff(phi(x), x), x)+.4*(diff(phi(x), x))-7.000000000*cos(x) = 0

 

Error, (in dsolve/numeric/process_input) invalid specification of initial conditions, got {theta(0) = 1, theta(7) = 0}

 

# Here the error is due to the fact that there exist BC on some function (theta) which no
# longer exist.
# Then remove the and look to what it happens

bcs_version_2 := remove(has, {bcs_version_1}, theta);

sol_version_221 := dsolve({b1_version_21, bcs_version_2[]}, numeric);

# Now you get a result without no more error.

{phi(0) = 1, phi(7) = 0}

 

proc (x_bvp) local res, data, solnproc, _ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x_bvp) else outpoint := evalf(x_bvp) 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(25, {(1) = .0, (2) = .2845794951815041, (3) = .5802905055695667, (4) = .8885514207025176, (5) = 1.2072408515580282, (6) = 1.5241277598656842, (7) = 1.8382008239664442, (8) = 2.149174530656815, (9) = 2.454885413871613, (10) = 2.7552060874703397, (11) = 3.0504383007402915, (12) = 3.341945280064638, (13) = 3.6304496964963757, (14) = 3.916042462400899, (15) = 4.199264378526463, (16) = 4.481461632120577, (17) = 4.762724895602928, (18) = 5.043072238353252, (19) = 5.322982531757949, (20) = 5.60272511766346, (21) = 5.882300297153527, (22) = 6.161736333213332, (23) = 6.4411575554755345, (24) = 6.720578777737737, (25) = 7.0}, datatype = float[8], order = C_order); Y := Matrix(25, 2, {(1, 1) = 1.0, (1, 2) = .680000113877016, (2, 1) = 1.4540344894609882, (2, 2) = 2.463663505833786, (3, 1) = 2.4133563766655417, (3, 2) = 3.9525259361508316, (4, 1) = 3.806469293070552, (4, 2) = 4.990526648497383, (5, 1) = 5.484513374261103, (5, 2) = 5.4286636191202335, (6, 1) = 7.185613557031606, (6, 2) = 5.198133226626437, (7, 1) = 8.700318339263731, (7, 2) = 4.35109243403419, (8, 1) = 9.854835597801994, (8, 2) = 2.9995181989632598, (9, 1) = 10.520628264025243, (9, 2) = 1.3097082601253847, (10, 1) = 10.639047230240717, (10, 2) = -.5377118814794638, (11, 1) = 10.208598658044096, (11, 2) = -2.3662421601997328, (12, 1) = 9.272019330320754, (12, 2) = -4.021912028517894, (13, 1) = 7.908633538352818, (13, 2) = -5.370773086444524, (14, 1) = 6.2304684531398875, (14, 2) = -6.307447573944695, (15, 1) = 4.367478957858471, (15, 2) = -6.765495697796848, (16, 1) = 2.4532747959522974, (16, 2) = -6.715491733720893, (17, 1) = .6306526038008767, (17, 2) = -6.163394831083677, (18, 1) = -.9657591305154667, (18, 2) = -5.154441254712672, (19, 1) = -2.222019341567904, (19, 2) = -3.7663470770234446, (20, 1) = -3.0482022672294895, (20, 2) = -2.1047744945032707, (21, 1) = -3.385816445756158, (21, 2) = -.2973066715468748, (22, 1) = -3.213883951896306, (22, 2) = 1.5174992505865381, (23, 1) = -2.550009800084594, (23, 2) = 3.2012162343653574, (24, 1) = -1.4492056621226057, (24, 2) = 4.624740690704019, (25, 1) = .0, (25, 2) = 5.678906303352601}, datatype = float[8], order = C_order); YP := Matrix(25, 2, {(1, 1) = .680000113877016, (1, 2) = 6.727999954449194, (2, 1) = 2.463663505833786, (2, 2) = 5.732993168764835, (3, 1) = 3.9525259361508316, (3, 2) = 4.273113499848399, (4, 1) = 4.990526648497383, (4, 2) = 2.417548451570903, (5, 1) = 5.4286636191202335, (5, 2) = .3177314557407489, (6, 1) = 5.198133226626437, (6, 2) = -1.752691891619449, (7, 1) = 4.35109243403419, (7, 2) = -3.5900404704335074, (8, 1) = 2.9995181989632598, (8, 2) = -5.026473793037796, (9, 1) = 1.3097082601253847, (9, 2) = -5.937247865802401, (10, 1) = -.5377118814794638, (10, 2) = -6.268852877857702, (11, 1) = -2.3662421601997328, (11, 2) = -6.024441361269366, (12, 1) = -4.021912028517894, (12, 2) = -5.251210414497452, (13, 1) = -5.370773086444524, (13, 2) = -4.031782077027102, (14, 1) = -6.307447573944695, (14, 2) = -2.480662295094154, (15, 1) = -6.765495697796848, (15, 2) = -.7301145902921422, (16, 1) = -6.715491733720893, (16, 2) = 1.084034220951506, (17, 1) = -6.163394831083677, (17, 2) = 2.817560565427252, (18, 1) = -5.154441254712672, (18, 2) = 4.334601907617293, (19, 1) = -3.7663470770234446, (19, 2) = 5.520015867378172, (20, 1) = -2.1047744945032707, (20, 2) = 6.282892705082078, (21, 1) = -.2973066715468748, (21, 2) = 6.563934628042916, (22, 1) = 1.5174992505865381, (22, 2) = 6.341439236571117, (23, 1) = 3.2012162343653574, (23, 2) = 5.632351685288582, (24, 1) = 4.624740690704019, (24, 2) = 4.49111540968702, (25, 1) = 5.678906303352601, (25, 2) = 3.0057532590620917}, 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(25, {(1) = .0, (2) = .2845794951815041, (3) = .5802905055695667, (4) = .8885514207025176, (5) = 1.2072408515580282, (6) = 1.5241277598656842, (7) = 1.8382008239664442, (8) = 2.149174530656815, (9) = 2.454885413871613, (10) = 2.7552060874703397, (11) = 3.0504383007402915, (12) = 3.341945280064638, (13) = 3.6304496964963757, (14) = 3.916042462400899, (15) = 4.199264378526463, (16) = 4.481461632120577, (17) = 4.762724895602928, (18) = 5.043072238353252, (19) = 5.322982531757949, (20) = 5.60272511766346, (21) = 5.882300297153527, (22) = 6.161736333213332, (23) = 6.4411575554755345, (24) = 6.720578777737737, (25) = 7.0}, datatype = float[8], order = C_order); Y := Matrix(25, 2, {(1, 1) = .0, (1, 2) = -0.386828811067095e-9, (2, 1) = -0.2216993652237478e-8, (2, 2) = 0.14616118388886258e-8, (3, 1) = -0.7455359978153146e-8, (3, 2) = 0.4710721571687838e-8, (4, 1) = -0.16982400311690186e-7, (4, 2) = 0.9783146113229471e-8, (5, 1) = -0.30786424328469905e-7, (5, 2) = 0.16376183200789656e-7, (6, 1) = -0.42994838799769425e-7, (6, 2) = 0.21679520965836272e-7, (7, 1) = -0.5199511141359532e-7, (7, 2) = 0.25066260659017816e-7, (8, 1) = -0.57048689185532754e-7, (8, 2) = 0.26345990690227306e-7, (9, 1) = -0.5764327724544523e-7, (9, 2) = 0.25512842943438724e-7, (10, 1) = -0.5454799668685388e-7, (10, 2) = 0.23057686439816014e-7, (11, 1) = -0.48775069611964923e-7, (11, 2) = 0.1952775106925937e-7, (12, 1) = -0.4123996424533945e-7, (12, 2) = 0.1536586484164985e-7, (13, 1) = -0.3267675690322781e-7, (13, 2) = 0.10934233693752469e-7, (14, 1) = -0.2380016759889455e-7, (14, 2) = 0.6579831839030053e-8, (15, 1) = -0.15163340859773915e-7, (15, 2) = 0.25529972644398807e-8, (16, 1) = -0.70473915201684054e-8, (16, 2) = -0.10263308878804077e-8, (17, 1) = 0.8879410521278488e-10, (17, 2) = -0.396150548455334e-8, (18, 1) = 0.58580954539161245e-8, (18, 2) = -0.6103585276554362e-8, (19, 1) = 0.10054792443665074e-7, (19, 2) = -0.7389912750476629e-8, (20, 1) = 0.12515005620175738e-7, (20, 2) = -0.7786388630503472e-8, (21, 1) = 0.1314747786841381e-7, (21, 2) = -0.73037450796828595e-8, (22, 1) = 0.11994749277089035e-7, (22, 2) = -0.6016610201442588e-8, (23, 1) = 0.922090957032956e-8, (23, 2) = -0.4052497756437588e-8, (24, 1) = 0.50988935528244924e-8, (24, 2) = -0.15865659658969408e-8, (25, 1) = .0, (25, 2) = 0.1169288499659421e-8}, 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[25] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(5.764327724544523e-8) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [2, 25, [phi(x), diff(phi(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[25] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[25] 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`(25, 2, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(2, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(25, 2, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[phi(x), diff(phi(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[25] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(5.764327724544523e-8) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [2, 25, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[25] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[25] 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`(25, 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`(25, 2, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 2)] end proc, (2) = Array(0..0, {}), (3) = [x, phi(x), diff(phi(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_bvp) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x_bvp) else _ndsol := pointto(data[2][0]); return ('_ndsol')(x_bvp) end if end if; try res := solnproc(outpoint); [x = res[1], seq('[phi(x), diff(phi(x), x)]'[i] = res[i+1], i = 1 .. 2)] catch: error  end try end proc

(7)

# Example (choice 2)

theta_ODE := diff(theta(x), x$2) = -cos(x);

sol_version_122 := dsolve({b1_version_21, theta_ODE, bcs_version_1}, numeric);

diff(diff(theta(x), x), x) = -cos(x)

 

proc (x_bvp) local res, data, solnproc, _ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x_bvp) else outpoint := evalf(x_bvp) 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(25, {(1) = .0, (2) = .28520548245364286, (3) = .5804267750886297, (4) = .8867996014587105, (5) = 1.2024168713093397, (6) = 1.516490756931242, (7) = 1.828081490992342, (8) = 2.1369804990785846, (9) = 2.441297638072586, (10) = 2.740843228475919, (11) = 3.0358473137457134, (12) = 3.3274938221286643, (13) = 3.6165102799031974, (14) = 3.9029665821545896, (15) = 4.187278554555015, (16) = 4.4706485025470535, (17) = 4.753178280859624, (18) = 5.034879807884609, (19) = 5.316114597466504, (20) = 5.597108322973903, (21) = 5.877861603239838, (22) = 6.158413231749467, (23) = 6.4389421544996335, (24) = 6.7194710772498, (25) = 7.0}, datatype = float[8], order = C_order); Y := Matrix(25, 4, {(1, 1) = 1.0, (1, 2) = .6800001141915756, (1, 3) = 1.0, (1, 4) = -.10770032145261926, (2, 1) = 1.4555778346757655, (2, 2) = 2.467251452269994, (2, 3) = .9288871372343895, (2, 4) = -.38905496030243697, (3, 1) = 2.41389502527256, (3, 2) = 3.9531081800302297, (3, 3) = .7737165400395145, (3, 4) = -.6560811894451447, (4, 1) = 3.7977305074549896, (4, 2) = 4.986281722155367, (4, 3) = .5363871347833484, (4, 4) = -.8827537230163028, (5, 1) = 5.458329428543932, (5, 2) = 5.427053283664983, (5, 3) = .23060339365575372, (5, 4) = -1.0406124558656162, (6, 1) = 7.145864751639465, (6, 2) = 5.211334913005845, (6, 3) = -.1090476642823681, (6, 4) = -1.106226135662627, (7, 1) = 8.656105291435619, (7, 2) = 4.387148425267441, (7, 3) = -.4513409872291526, (7, 4) = -1.0747846682597781, (8, 1) = 9.817886839751916, (8, 2) = 3.06052326126533, (8, 3) = -.7665690720379669, (8, 4) = -.9516543047346938, (9, 1) = 10.502285020674476, (9, 2) = 1.3901891996747462, (9, 3) = -1.0275806475847535, (9, 4) = -.7521436205601852, (10, 1) = 10.646123777846578, (10, 2) = -.4476899047049343, (10, 3) = -1.2159586001919325, (10, 4) = -.49780882034435076, (11, 1) = 10.242482266704474, (11, 2) = -2.278154170876014, (11, 3) = -1.3213759092969448, (11, 4) = -.21324869596893348, (12, 1) = 9.329591730689856, (12, 2) = -3.945662326965407, (12, 3) = -1.3411422471054835, (12, 4) = 0.7713192838752932e-1, (13, 1) = 7.9831050732299085, (13, 2) = -5.314098252522818, (13, 3) = -1.2788297188219224, (13, 4) = .3495648696077279, (14, 1) = 6.31272962090734, (14, 2) = -6.274508403873006, (14, 3) = -1.1442395610365943, (14, 4) = .5822163456476159, (15, 1) = 4.448514720431188, (15, 2) = -6.756285897222395, (15, 3) = -.952279808998006, (15, 4) = .7575682675818803, (16, 1) = 2.5259523072397716, (16, 2) = -6.726840319017909, (16, 3) = -.7208831449003039, (16, 4) = .8632224657350345, (17, 1) = .6896197010206715, (17, 2) = -6.190025385322881, (17, 3) = -.4711408436738631, (17, 4) = .8914679098482646, (18, 1) = -.9233867179040366, (18, 2) = -5.189787797755726, (18, 3) = -.22532821479950457, (18, 4) = .8407486212772263, (19, 1) = -2.1960223235374414, (19, 2) = -3.8041747048793875, (19, 3) = -0.4833823450593729e-2, (19, 4) = .7155259283310865, (20, 1) = -3.036281130330681, (20, 2) = -2.140034201882414, (20, 3) = .17092684962735377, (20, 4) = .5258063597197039, (21, 1) = -3.3844321334512153, (21, 2) = -.32644082827058757, (21, 3) = .28592721573290636, (21, 4) = .28661593509633077, (22, 1) = -3.218891731891214, (22, 2) = 1.4964167203250038, (22, 3) = .3289629696080515, (22, 4) = 0.16748262350674885e-1, (23, 1) = -2.557087950205907, (23, 2) = 3.1887300964101932, (23, 3) = .2944182621774102, (23, 4) = -.2628281503292269, (24, 1) = -1.454325733487907, (24, 2) = 4.619762960152376, (24, 3) = .1826382571203129, (24, 4) = -.5302764003905673, (25, 1) = .0, (25, 2) = 5.678906303600271, (25, 3) = .0, (25, 4) = -.7646869199395754}, datatype = float[8], order = C_order); YP := Matrix(25, 4, {(1, 1) = .6800001141915756, (1, 2) = 6.72799995432337, (1, 3) = -.10770032145261926, (1, 4) = -1.0, (2, 1) = 2.467251452269994, (2, 2) = 5.730326435416583, (2, 3) = -.38905496030243697, (2, 4) = -.95960385947494, (3, 1) = 3.9531081800302297, (3, 2) = 4.272357563466833, (3, 3) = -.6560811894451447, (3, 4) = -.8362286907827035, (4, 1) = 4.986281722155367, (4, 2) = 2.4287574787194566, (4, 3) = -.8827537230163028, (4, 4) = -.6318957382259434, (5, 1) = 5.427053283664983, (5, 2) = .34990724534380924, (5, 3) = -1.0406124558656162, (5, 4) = -.3601040798299718, (6, 1) = 5.211334913005845, (6, 2) = -1.7045817929344094, (6, 3) = -1.106226135662627, (6, 4) = -0.5427888175256125e-1, (7, 1) = 4.387148425267441, (7, 2) = -3.536051493439708, (7, 3) = -1.0747846682597781, (7, 4) = .25445601761896164, (8, 1) = 3.06052326126533, (8, 2) = -4.9791183560505745, (8, 3) = -.9516543047346938, (8, 4) = .5364155787920631, (9, 1) = 1.3901891996747462, (9, 2) = -5.908640378395377, (9, 3) = -.7521436205601852, (9, 4) = .7646520997893541, (10, 1) = -.4476899047049343, (10, 2) = -6.266306306570833, (10, 3) = -.49780882034435076, (10, 4) = .920768895493258, (11, 1) = -2.278154170876014, (11, 2) = -6.049637518575932, (11, 3) = -.21324869596893348, (11, 4) = .9944141695609054, (12, 1) = -3.945662326965407, (12, 2) = -5.301125662115611, (12, 3) = 0.7713192838752932e-1, (12, 4) = .9827700847002534, (13, 1) = -5.314098252522818, (13, 2) = -4.099673437810365, (13, 3) = .3495648696077279, (13, 4) = .8893303912599275, (14, 1) = -6.274508403873006, (14, 2) = -2.5574182248522686, (14, 3) = .5822163456476159, (14, 4) = .7238887980573531, (15, 1) = -6.756285897222395, (15, 2) = -.8066455312345733, (15, 3) = .7575682675818803, (15, 4) = .5013085557319331, (16, 1) = -6.726840319017909, (16, 2) = 1.014986123288068, (16, 3) = .8632224657350345, (16, 4) = .23939285775987082, (17, 1) = -6.190025385322881, (17, 2) = 2.7614560894974827, (17, 3) = .8914679098482646, (17, 4) = -0.4077799076690431e-1, (18, 1) = -5.189787797755726, (18, 2) = 4.294424867345132, (18, 3) = .8407486212772263, (18, 4) = -.3169299640346917, (19, 1) = -3.8041747048793875, (19, 2) = 5.495663906439946, (19, 3) = .7155259283310865, (19, 4) = -.5677134320697415, (20, 1) = -2.140034201882414, (20, 2) = 6.272174215576857, (20, 3) = .5258063597197039, (20, 4) = -.7737372192605559, (21, 1) = -.32644082827058757, (21, 2) = 6.563399956432721, (21, 3) = .28661593509633077, (21, 4) = -.9189748035892124, (22, 1) = 1.4964167203250038, (22, 2) = 6.347015717113467, (22, 3) = 0.16748262350674885e-1, (22, 4) = -.9922260578919242, (23, 1) = 3.1887300964101932, (23, 2) = 5.639768800955563, (23, 3) = -.2628281503292269, (23, 4) = -.9878944056456629, (24, 1) = 4.619762960152376, (24, 2) = 4.496387007564442, (24, 3) = -.5302764003905673, (24, 4) = -.9063274559464846, (25, 1) = 5.678906303600271, (25, 2) = 3.005753258963024, (25, 3) = -.7646869199395754, (25, 4) = -.7539022543433046}, 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(25, {(1) = .0, (2) = .28520548245364286, (3) = .5804267750886297, (4) = .8867996014587105, (5) = 1.2024168713093397, (6) = 1.516490756931242, (7) = 1.828081490992342, (8) = 2.1369804990785846, (9) = 2.441297638072586, (10) = 2.740843228475919, (11) = 3.0358473137457134, (12) = 3.3274938221286643, (13) = 3.6165102799031974, (14) = 3.9029665821545896, (15) = 4.187278554555015, (16) = 4.4706485025470535, (17) = 4.753178280859624, (18) = 5.034879807884609, (19) = 5.316114597466504, (20) = 5.597108322973903, (21) = 5.877861603239838, (22) = 6.158413231749467, (23) = 6.4389421544996335, (24) = 6.7194710772498, (25) = 7.0}, datatype = float[8], order = C_order); Y := Matrix(25, 4, {(1, 1) = .0, (1, 2) = -0.7015069783321377e-9, (1, 3) = .0, (1, 4) = -0.5965656887873573e-9, (2, 1) = -0.23419904967339463e-8, (2, 2) = 0.12117914769870434e-8, (2, 3) = -0.6988221912180033e-10, (2, 4) = -0.7360660541260077e-9, (3, 1) = -0.7581195258999318e-8, (3, 2) = 0.44477264061633045e-8, (3, 3) = 0.14026482338789395e-9, (3, 4) = -0.8989594038105847e-9, (4, 1) = -0.166979179613667e-7, (4, 2) = 0.9303801157844887e-8, (4, 3) = 0.7726610329851505e-9, (4, 4) = -0.10717291859501544e-8, (5, 1) = -0.29504315499220376e-7, (5, 2) = 0.15433270292964003e-7, (5, 3) = 0.1897371148385938e-8, (5, 4) = -0.1215573317985683e-8, (6, 1) = -0.4095776458114617e-7, (6, 2) = 0.20421023018317123e-7, (6, 3) = 0.31296694108390305e-8, (6, 4) = -0.1273626297873477e-8, (7, 1) = -0.495552731106085e-7, (7, 2) = 0.2367435799081896e-7, (7, 3) = 0.4299295107747069e-8, (7, 4) = -0.1247102621312409e-8, (8, 1) = -0.5456862366461368e-7, (8, 2) = 0.24989537653112128e-7, (8, 3) = 0.5283688944596066e-8, (8, 4) = -0.11485072811566145e-8, (9, 1) = -0.5545807727832772e-7, (9, 2) = 0.24323033428771882e-7, (9, 3) = 0.595861720640578e-8, (9, 4) = -0.10024667080314673e-8, (10, 1) = -0.5280149631736434e-7, (10, 2) = 0.22075216342591082e-7, (10, 3) = 0.6307142990864475e-8, (10, 4) = -0.8331553746433627e-9, (11, 1) = -0.4746483117748984e-7, (11, 2) = 0.18730783839641616e-7, (11, 3) = 0.6355167829862161e-8, (11, 4) = -0.6603314496931463e-9, (12, 1) = -0.40286883814052245e-7, (12, 2) = 0.14707115641354395e-7, (12, 3) = 0.6146987777745153e-8, (12, 4) = -0.4956897879397524e-9, (13, 1) = -0.3196335776467257e-7, (13, 2) = 0.10353703028456993e-7, (13, 3) = 0.572387482707407e-8, (13, 4) = -0.34940367176685377e-9, (14, 1) = -0.2319611091857721e-7, (14, 2) = 0.6017831105147596e-8, (14, 3) = 0.5135552400129261e-8, (14, 4) = -0.23097926591791715e-9, (15, 1) = -0.14568936052459186e-7, (15, 2) = 0.19697237353884613e-8, (15, 3) = 0.4432324943689459e-8, (15, 4) = -0.14565999002417557e-9, (16, 1) = -0.6410382958141966e-8, (16, 2) = -0.16464434352513352e-8, (16, 3) = 0.3648773527807103e-8, (16, 4) = -0.9526716154865928e-10, (17, 1) = 0.7982532172029822e-9, (17, 2) = -0.4622532222662276e-8, (17, 3) = 0.28362462783361233e-8, (17, 4) = -0.8203345859682403e-10, (18, 1) = 0.6641790807729078e-8, (18, 2) = -0.67965150474308445e-8, (18, 3) = 0.20472289485995545e-8, (18, 4) = -0.10538202154419052e-9, (19, 1) = 0.10873197068473307e-7, (19, 2) = -0.8089560828637094e-8, (19, 3) = 0.13238666882840484e-8, (19, 4) = -0.16245538409690216e-9, (20, 1) = 0.1331323636811854e-7, (20, 2) = -0.8463393358019913e-8, (20, 3) = 0.7057083300480924e-9, (20, 4) = -0.24848113430325744e-9, (21, 1) = 0.13869862627268089e-7, (21, 2) = -0.7930735714966703e-8, (21, 3) = 0.22775201526424163e-9, (21, 4) = -0.35638263891457173e-9, (22, 1) = 0.125914677539068e-7, (22, 2) = -0.6570863156361201e-8, (22, 3) = -0.8661712219936396e-10, (22, 4) = -0.477599099037555e-9, (23, 1) = 0.9649616429420714e-8, (23, 2) = -0.4515509635171421e-8, (23, 3) = -0.22653672532804103e-9, (23, 4) = -0.6031151379294315e-9, (24, 1) = 0.5324781923122823e-8, (24, 2) = -0.1945076363704714e-8, (24, 3) = -0.19288727142698676e-9, (24, 4) = -0.7231862652462719e-9, (25, 1) = .0, (25, 2) = 0.9215035892091513e-9, (25, 3) = .0, (25, 4) = -0.8284250125731864e-9}, 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[25] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(5.545807727832772e-8) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [4, 25, [phi(x), diff(phi(x), x), theta(x), diff(theta(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[25] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[25] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(4, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(25, 4, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(4, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(25, 4, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[phi(x), diff(phi(x), x), theta(x), diff(theta(x), x)]'[i] = yout[i], i = 1 .. 4)] 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[25] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(5.545807727832772e-8) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [4, 25, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[25] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[25] 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(4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(25, 4, 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(4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}); `dsolve/numeric/hermite`(25, 4, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 4)] end proc, (2) = Array(0..0, {}), (3) = [x, phi(x), diff(phi(x), x), theta(x), diff(theta(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_bvp) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x_bvp) else _ndsol := pointto(data[2][0]); return ('_ndsol')(x_bvp) end if end if; try res := solnproc(outpoint); [x = res[1], seq('[phi(x), diff(phi(x), x), theta(x), diff(theta(x), x)]'[i] = res[i+1], i = 1 .. 4)] catch: error  end try end proc

(8)
 

 

Download sps1_mmcdara.mw


EDITED Wed 5th Feb 2025 at 6:50 UT

@segfault

@vv : Thank you for having pointed out this mistake.

@segfault : Here is a modified procedure which seems correct:  Download Into_Sine.mw

UPDATED : Here is a version which gives more concise expressions 
                    Into_Sine_more_concise.mw

Let us take this simple example

z := a+I*b
                            a + I b
Re(z), Im(z)
                    Re(a + I b), Im(a + I b)

This may be a surprising result but it is normal: as you did not say that a and b where real, for instance, you have no reason to say that Re(z) = a and Im(z) = b.

Now you want to take the real and imaginary parts of pde3 and the results are "unchanged" as you say: but how could they be if you don't say that theta, phi, c, x, t, Omega, k, ... are real or imaginary or complex?

If you just want to separate the sub-expressions which explicitely contain I , you can, do this:

ImPart, RePart := add~([ selectremove(has, [op(lhs(pde3))], I) ])[]:
print(RePart);
print(ImPart);




About your question:  Also how to convert 'D(phi)(-c*t + x) = phi_\xi' as in Eq. (1.5)?

phi_\xi is not a mathematical expression in Maple. What is this supposed to mean?
Be more clear please.




About your question: How to assume phi is an even function and theta is an odd function as in the image?
Example (phi is assumed even)

expr := phi(x-c*t)*phi(-x+c*t); 
                      phi(-c t + x) phi(c t - x)

op(1, expr) * eval(op(2, expr),  phi = (u -> phi(-u)));
                                      2
                         phi(-c t + x) 

eval(op(1, expr),  phi = (u -> phi(-u))) * op(2, expr)
                                     2
                         phi(c t - x) 

A more complex example:

expr    := phi(x-c*t)*phi(-x+c*t) + theta(x-c*t)*theta(-x+c*t);
expr_f  := indets(expr, function):
expr_fo := op~(expr_f):

# Select arbitrarily one of these two as the "reference"

ref := expr_fo[1]:

# Assuming phi is even and theta is odd
# Select amid Im_f the functions which DO NOT depend on ref: there will be the
# functions to rewrite:

ref_free := remove(has, expr_f, ref):

# Build the rewritting rules RR:

RR := NULL:
for f in ref_free do
print(f);
  if op(0, f) = phi then 
    RR := RR, phi(ref) = phi(-ref)
  elif op(0, f) = theta then 
    RR := RR, theta(ref) = -theta(-ref)
  end if
end do:

# Rewrite expr wrt RR

eval(expr, {RR});

  phi(-c t + x) phi(c t - x) + theta(-c t + x) theta(c t - x)
                            2                 2
                phi(c t - x)  - theta(c t - x) 


PD_OD_mmcdara.mw



 

restart

S := x^2+y^2-1

x^2+y^2-1

(1)

convert(S, polar)

polar(abs(x^2+y^2-1), argument(x^2+y^2-1))

(2)

S := x^2+y^2-1;
changecoords(x^2+y^2-1, [x,y], polar, [r,theta]);
solve(%, r)

x^2+y^2-1

 

r^2*cos(theta)^2+r^2*sin(theta)^2-1

 

1, -1

(3)

T := x^4+2*x^2*y^2+y^4+2*x^3+2*x*y^2-y^2;
changecoords(T, [x,y], polar, [r,theta]);
simplify(%);
solve(%, {r});

x^4+2*x^2*y^2+y^4+2*x^3+2*x*y^2-y^2

 

r^4*cos(theta)^4+2*r^4*cos(theta)^2*sin(theta)^2+r^4*sin(theta)^4+2*r^3*cos(theta)^3+2*r^3*cos(theta)*sin(theta)^2-r^2*sin(theta)^2

 

r^2*(cos(theta)^2+2*r*cos(theta)+r^2-1)

 

{r = 0}, {r = -cos(theta)+(cos(theta)^2+sin(theta)^2)^(1/2)}, {r = -cos(theta)-(cos(theta)^2+sin(theta)^2)^(1/2)}

(4)

infolevel[changecoords] := 4:
changecoords(T, [x,y], polar, [r,theta]);

r^4*cos(theta)^4+2*r^4*cos(theta)^2*sin(theta)^2+r^4*sin(theta)^4+2*r^3*cos(theta)^3+2*r^3*cos(theta)*sin(theta)^2-r^2*sin(theta)^2

(5)

R := -3*x^2+y^2-4*x-1;
changecoords(R, [x,y], polar, [r,theta]);
simplify(%);
solve(%, {r});

-3*x^2+y^2-4*x-1

 

-3*r^2*cos(theta)^2+r^2*sin(theta)^2-4*r*cos(theta)-1

 

-4*r^2*cos(theta)^2-4*r*cos(theta)+r^2-1

 

{r = -1/(2*cos(theta)-1)}, {r = -1/(2*cos(theta)+1)}

(6)

changecoords(x-2, [x,y], polar, [r,theta]);

r*cos(theta)-2

(7)

changecoords(x*y-4, [x,y], polar, [r,theta]);

r^2*cos(theta)*sin(theta)-4

(8)

changecoords(x^2-y^2-1, [x,y], polar, [r,theta]);

r^2*cos(theta)^2-r^2*sin(theta)^2-1

(9)

changecoords(y^2-3*x^2-4*x-1, [x,y], polar, [r,theta]);
simplify(%, trig);

# 4th equivalence in the book is false

simplify(% - (1+2*r*cos(theta)))

-3*r^2*cos(theta)^2+r^2*sin(theta)^2-4*r*cos(theta)-1

 

-4*r^2*cos(theta)^2-4*r*cos(theta)+r^2-1

 

-4*r^2*cos(theta)^2-6*r*cos(theta)+r^2-2

(10)

changecoords(x^4+y^4+2*x^2*y^2+2*x^ 3+2*x*y^2-y^2, [x,y], polar, [r,theta]);
simplify(%, trig);

# 5th equivalence in the book is false

simplify(% - (1-cos(theta)))

r^4*cos(theta)^4+2*r^4*cos(theta)^2*sin(theta)^2+r^4*sin(theta)^4+2*r^3*cos(theta)^3+2*r^3*cos(theta)*sin(theta)^2-r^2*sin(theta)^2

 

r^2*(cos(theta)^2+2*r*cos(theta)+r^2-1)

 

r^2*cos(theta)^2+2*cos(theta)*r^3+r^4-r^2+cos(theta)-1

(11)

# 4th book example reversed

book4 := 1+2*r*cos(theta);
algsubs(r*cos(theta) = x, book4);
changecoords(%, [x,y], polar, [r,theta]);

1+2*r*cos(theta)

 

2*x+1

 

1+2*r*cos(theta)

(12)

# 5th book example reversed

book5 := 1-cos(theta);
algsubs(cos(theta) = x/sqrt(x^2+ y^2), book5);
changecoords(%, [x,y], polar, [r,theta]);
simplify(%) assuming r::positive

1-cos(theta)

 

((x^2+y^2)^(1/2)-x)/(x^2+y^2)^(1/2)

 

-(r*cos(theta)-(r^2*cos(theta)^2+r^2*sin(theta)^2)^(1/2))/(r^2*cos(theta)^2+r^2*sin(theta)^2)^(1/2)

 

1-cos(theta)

(13)

 


 

Download polar_mmcdara.mw

Here are two examples

restart:

with(Grid):

F := proc(n, N, Folder)
  local data := LinearAlgebra:-RandomVector(N, generator=rand(0. .. 1.)):
  save data, cat(Folder, "/rand_", n, ".m");
end proc:

N      := 10:
folder := currentdir():

NN := 2:

Setup(numnodes=NN):
Set('F'):

for i from 0 to NN-1 do
  Run(i, F, [i, N, folder])
end do:
Wait():

 

G := proc(n, N, Folder)
  local file_name := cat(Folder, "/test_", n, ".txt"):
  FileTools:-Text:-WriteString(file_name, cat("processing at node =",n));
end proc:

NN := 2:

Setup(numnodes=NN):
Set('G'):

for i from 0 to NN-1 do
  Run(i, G, [i, N, folder])
end do:
Wait():

 

restart:
folder := currentdir():
read cat(folder, "/rand_", 0, ".m");
data;

Vector[column]([[.2342493224], [.1799302829], [.5137385362], [.2907448089], [.8953600369], [.2617341097], [.7780122500], [0.6587642124e-1], [.7235311453], [.3157837057]])

(1)

FileTools:-Text:-ReadLine(cat(folder, "/test_", 0, ".txt"));

"processing at node =0"

(2)
 

 

Download Grid_Files.mw



What is the polar angle?
What is the radius?
What are t and x?

You cannot use polarplot to plot a complex function depending of 5 parameters (x, t, alpha, beta, gamma) ; just read the help page for a few examples

What you could so is:

Firsly: give alpha, beta and gamma numeric values (your P?)

Secondly: choose the component (Re or Im) you want tp plot

Thirdly: choose a calue for x or t and use polarplot withthe remaining variable (t or x)...
... or use plot3d(..., coords=cylindrical) with t and x as variables.

Example:  How_to_use_xxx.mw

that the points you construct are not evenly spread within the unit disk?
(I'm sorry  @Rouben Rostamian , I missed your comment)

The way you proceed your points are concentrated round its center.
To be convinced do this

ScatterPlot(Sample(x1, 1000), Sample(y1, 1000))

The first question you have to ask yourself is "What distribution of points am I expected?", in other terms what does "taking two points at random within the unit disc" means to you?
Without this, independently of the capabilities of Maple to compute the corresponding PDF, you have several solutions.

Here is a similar problem Bertrand paradox

The attached file below explores three different "definitions" of randomness

restart

with(Statistics):


Your choice

N  := 10^4:
R1 := Sample(Uniform(0, 1), N):
R2 := Sample(Uniform(0, 1), N):
T1 := Sample(Uniform(0, 2*Pi), N):
T2 := Sample(Uniform(0, 2*Pi), N):

X1 := R1 *~ cos~(T1):
Y1 := R1 *~ sin~(T1):
X2 := R2 *~ cos~(T2):
Y2 := R2 *~ sin~(T2):

d := sqrt~((X1-X2)^~2 + (Y1-Y2)^~2):

ScatterPlot(X1, Y1, symbol=point);  # concentration round the center

 

Histogram(d)

 


Another choice

X1 := Sample(Uniform(-1, 1), N)^+:
X2 := Sample(Uniform(-1, 1), N)^+:

U1 := Sample(Uniform(-1, 1), N)^+:
U2 := Sample(Uniform(-1, 1), N)^+:

Y1 := U1 *~ sqrt~(1-~X1^~2):
Y2 := U2 *~ sqrt~(1-~X2^~2):

ScatterPlot(X1, Y1, symbol=point);  # concentration near the boundary
  

 

d := sqrt~((X1-X2)^~2 +(Y1-Y2)^~2):
Histogram(d)

 


Yet nother choice

Generaly considered as the correct one as it gives an homogenous distribution of points in the
following sense: the Voronoï diagramassociated to the (X1, Y1) points has N cells with almost
the same area.

R1 := Sample(Uniform(0, 1), N)^+:
R2 := Sample(Uniform(0, 1), N)^+:
T1 := Sample(Uniform(0, 2*Pi), N)^+:
T2 := Sample(Uniform(0, 2*Pi), N)^+:


X1 := sqrt~(R1) *~ cos~(T1):
Y1 := sqrt~(R1) *~ sin~(T1):
X2 := sqrt~(R2) *~ cos~(T2):
Y2 := sqrt~(R2) *~ sin~(T2):

ScatterPlot(X1, Y1, symbol=point);  # GOOD !

 

d := sqrt~((X1-X2)^~2 +(Y1-Y2)^~2):
Histogram(d)

 

 

 

Download Randomness_definitions.mw

_____________________________________________________________________________

I dont think it is possible to get an analytic expression of the PDF with Maple (I mean usingdirectly Statistics:-PDF).
Here is an excerpt from Lellouche & Souris which gives you the expression of this PDF

You can follow this paper step by step to try and get this result with Maple
_____________________________________________________________________________

A quite common approach in Statistics to build an analytic  approximation of a  PDF from raw data is to use tools like Edgeworth series, Burr distribution or, like I do in the attached file below, Pearson distribution.

PDF_analytic_approximation.mw

Here is the c omparison between the exact PDF (see excerpt above) and its Pearson approximation


You will see at the end that worksheet that Maple is not even capable to compute the expectation of the distance, which introduces a lot of doubt in its capability to find the PDF
_____________________________________________________________________________

@Rouben Rostamian:  I don't consider Maple's inability to compute the PDF as a bug, read the paper I cite above or watch the 1st and 4th videos I mention below to see how this PDF can be gotten almost by hand.
_____________________________________________________________________________

Here is a serie of 4 amazing videos which detail step by step (the last one being mesmerizing) how to prove the expectation of the distance of two random points in the unit disk (third randomness choice above) is 128/(45*Pi).

First point,
the correct syntax (Maple 2015) is

solve(identity(K1, xi), [A[0], A[1], A[2], B[1], B[2]])

(no braces around xi)

Second point,
K1 depends also on 4 more parameters: alpha, beta, c, mu.
So you expect [A[0], A[1], A[2], B[1], B[2]] to be function of them don't you?
It is highly likely that those functions, provided solve/identity has indeed a solution are very complex and it thus highly unlikely taht Maple will be capable to get them.

Workaround
I propose you a numeric workaround in which you first give alpha, beta, c, mu numeric values, then build N relations between A[0], A[1], A[2], B[1], B[2], each for a different value of xi (this mimics the identity(K1, xi) stuff), finally minimize them in the least squares sense.

Maybe this will not suit you? But I'm afraid it's this (maybe something close) or nothing else.

restart

with(PDEtools):

with(LinearAlgebra):

with(SolveTools):

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

_local(gamma):

ode := beta*U(xi)^2*c^2+(-alpha*c^2+1)*U(xi)+mu^2*c^2*(diff(diff(U(xi), xi), xi)) = 0

beta*U(xi)^2*c^2+(-alpha*c^2+1)*U(xi)+mu^2*c^2*(diff(diff(U(xi), xi), xi)) = 0

(2)

n := 2

2

(3)

F := U(xi) = sum(tanh(xi)^(i-1)*(B[i]*sech(xi)+A[i]*tanh(xi)), i = 1 .. n)+A[0]

U(xi) = B[1]*sech(xi)+A[1]*tanh(xi)+tanh(xi)*(B[2]*sech(xi)+A[2]*tanh(xi))+A[0]

(4)

K1 := eval(ode, F)

beta*(B[1]*sech(xi)+A[1]*tanh(xi)+tanh(xi)*(B[2]*sech(xi)+A[2]*tanh(xi))+A[0])^2*c^2+(-alpha*c^2+1)*(B[1]*sech(xi)+A[1]*tanh(xi)+tanh(xi)*(B[2]*sech(xi)+A[2]*tanh(xi))+A[0])+mu^2*c^2*(B[1]*sech(xi)*tanh(xi)^2-B[1]*sech(xi)*(1-tanh(xi)^2)-2*A[1]*tanh(xi)*(1-tanh(xi)^2)-2*tanh(xi)*(1-tanh(xi)^2)*(B[2]*sech(xi)+A[2]*tanh(xi))+2*(1-tanh(xi)^2)*(-B[2]*sech(xi)*tanh(xi)+A[2]*(1-tanh(xi)^2))+tanh(xi)*(B[2]*sech(xi)*tanh(xi)^2-B[2]*sech(xi)*(1-tanh(xi)^2)-2*A[2]*tanh(xi)*(1-tanh(xi)^2))) = 0

(5)

solve(identity(K1, xi), [A[0], A[1], A[2], B[1], B[2]])

Warning,  computation interrupted

 

# Any analytic solution seems to be out of range.
#
# Here is a numeric workaround

randomize();
# randomize(173729404478144);  # A seed which give some IDsol values (see below)
# randomize(173729420578144);  # This one doesn't seem to give any (see below)

# Identify the "remaining" parameters

params := convert(indets(K1, name) minus {xi, A[0], A[1], A[2], B[1], B[2]}, list);
NP     := numelems(params):

# Define the function F(params)(xi) = lhs(K1)

F := unapply(unapply(lhs(K1), xi), params):

# Chose values for all parameters, for instance

X := [ seq(p = rand(0. .. 1.)(), p in params) ];

# Define the function Fp(xi) as the instance of F(params)(xi) forthose values

Fp := unapply(eval(F(params)(xi), X), xi):

# Randomly chose (for instance) N values of xi in some ad hoc range

N  := 100:
Xi := Statistics:-Sample(Uniform(0, 1), N):

# Compute the corresponding values of f(xi)

Y := Vector(N, n -> Fp(Xi[n])):

# Define the objective function to minize over A[0], ..., B[2]
# (ideally its minimum should ne 0, or somethong close)

Obj := Y^+ . Y:

# Minimize the objective function


interface(warnlevel = 0):

opt := Optimization:-NLPSolve(Obj);

# Plot the N residues agaist xi

plot(
  [ seq([Xi[n], eval(Y[n], opt[2])], n=1..N) ]
  , style=point
  , labels=[xi, "residue (should be 0)"]
  , labeldirections=[default, "vertical"]
  , title=typeset(evalf[4](X))
)

173729420578144

 

[alpha, beta, c, mu]

 

[alpha = .9364695393, beta = .1127828746, c = .8295135814, mu = .9551208268]

 

[0.164551129077846001e-2, [A[0] = HFloat(-0.2515499002096579), A[1] = HFloat(-1.331181289087155), A[2] = HFloat(0.010288244997440708), B[1] = HFloat(-0.2312944419813471), B[2] = HFloat(0.4525201303944428)]]

 

 

# Observing that Fp(xi) only depends on A[0], ..., B[2] on can try using solve/identity now:

IdSol := solve(identity(Fp(xi)=0, xi))

Warning,  computation interrupted

 

# Depending one the seed his would be a bad idea as shows the plot below

plot(eval(Fp(xi), IdSol[1]), xi=0..1)

 

# Evaluate Y for the first IdSol solution

plot(
  [ seq([Xi[n], eval(Y[n], IdSol[1])], n=1..N) ]
  , style=point
  , labels=[xi, "residue (should be 0)"]
  , labeldirections=[default, "vertical"]
  , title=typeset('Obj' = evalf[4](eval(Obj, IdSol[1])))
)

 

# My guess:
# There is no set of values for A[0], ..., B[2] which identically verifies K1
# for arbitrary values os alpha, beta, c, mu.


Download Find_params_mmcdara.mw

Find_params_mmcdara_larger_xi_range.mw  contains results obtained on a large xi range

The autocorrelation functionis "the" tool to detect periodicity or to extract the periodic component from a noisy signal.

Autocorrelation is acccessible from both SignalProcessing and Statistics packages, with little differences, but for sampled signals only. Meaning you don't copute the autocorrelation function itself but something which van be interpreted as its sampling (on a finite number of points).

The "continuous" correlation function of s signal S(t) doesn't seem to exist in my 2015 Maple version.
Generally it is computed by taking the inverse Fourier transform of the spectral power density of S(t) which is itself defined by
FS(xi) * conjugate(FS(xi)), where FS(xi)  is the Fourier transform of S(t).
inttrans package might help you to do this.
The issue is that a periodic signal as a discrete spectrum made of a finite set of Dirac distributions and so is its spectral power density function (it contains squares of Dirac(s))... a thing invfourier doesn't seem capable to handle.

So here is maybe a simple workaround that coukd answer your question: if inttrans:-fourier(S(t), t, xi)  is a linear combination of Dirac distribution, then S(t) is periodic.
This is already a first step.
The second step consists in identifyong the period: here is a notional example that could give you some hints:

restart

with(inttrans):

S := t -> cos(2*Pi*t/3)+cos(2*Pi*t/7)

proc (t) options operator, arrow; cos((2/3)*Pi*t)+cos((2/7)*Pi*t) end proc

(1)

# S(t) is periodic as it is a linear combination of Dirac distribution

F__S := unapply(fourier(S(t), t, xi), xi);  

proc (xi) options operator, arrow; Pi*(Dirac(xi+(2/3)*Pi)+Dirac(xi-(2/3)*Pi)+Dirac(xi-(2/7)*Pi)+Dirac(xi+(2/7)*Pi)) end proc

(2)

# Period

indets(F__S(xi), function);
op~(%);
denom~(eval(%, xi=0));

period := mul(%)/gcd(op(%))

{Dirac(xi-(2/3)*Pi), Dirac(xi-(2/7)*Pi), Dirac(xi+(2/3)*Pi), Dirac(xi+(2/7)*Pi)}

 

{xi-(2/3)*Pi, xi-(2/7)*Pi, xi+(2/3)*Pi, xi+(2/7)*Pi}

 

{3, 7}

 

21

(3)

plot(S(t), t=0..period)

 

pattern       := t -> piecewise(0 <= t and t <= period, S(t), 0):
periodization := unapply(pattern(t-floor(t/period)*period), t):

plot(periodization(t), t=0..period*3);

 

# The normalized autocorrelation function should be equal to 1 fot t=Z*period

# Autocorrelation with lag=0

A[0] := evalf(Int(periodization(t)*periodization(t), t=0..period)):

Normalized_A[lag=0] := A[0]/A[0];

# Autocorrelation with lag=period

Normalized_A[lag='period'] := evalf(Int(periodization(t)*periodization(t-period), t=0..period)) / A[0];

# Autocorrelation with lag=2*period

Normalized_A[lag=2*'period'] := evalf(Int(periodization(t)*periodization(t-2*period), t=0..period)) / A[0];

# Autocorrelation with lag=-period

Normalized_A[lag=-'period'] := evalf(Int(periodization(t)*periodization(t+period), t=0..period)) / A[0];

1.000000000

 

1.000000000

 

1.000000000

 

1.000000000

(4)
 

 

A more complete code with more cases (including the one above): Period_detection.mw

restart

kernelopts(version)

`Maple 2015.2, APPLE UNIVERSAL OSX, Dec 20 2015, Build ID 1097895`

(1)

sl10 :=  -1 <= (3-5*x)*(1/2) and (3-5*x)*(1/2) <= 9

0 <= 5/2-(5/2)*x and -(5/2)*x <= 15/2

(2)

sol_1 := solve(sl10)

RealRange(-3, 1)

(3)

convert(x in sol_1, relation)

And(-3 <= x, x <= 1)

(4)

sol_2 := solve({op(sl10)})

{-3 <= x, x <= 1}

(5)

simplify(And(op(sol_2)))

And(-3 <= x, x <= 1)

(6)

# Or use what I proposed you here


Download examples.mw

Technically f is a number and writing diff(f, something) is identically null.

Don't you mean "what is the variation delta(f) of f given a variation delta(q) of function q" ?

Look to this, maybe that will help you (or not)

variation.mw

The key code is 

# N = numelems(team):
# n = number of teammates per set
# T = list of sets lists

T := [seq(team[1+(i-1)*n..i*n], i=1..N/n)]:

restart

 

new_team := ["Michael K", "Andy C", "Michael G", "Mitch", "Jez", "Dean B", "Anthony B", "Rik B", "Ilya", "Fariborz", "Eugene", "Tania", "Bill", "Stevs", "Victor", "Jane", "Nash", "Ben"]:

 

MakeTeams := proc(team, n)
  local N, T, i, k, fmt;
  N := numelems(team):
  if irem(N, n) <> 0 then
    error cat("The number of players (", N, ") is not a multiple of the number (", n, ") of team members")
  end if:
  T := [seq(team[1+(i-1)*n..i*n], i=1..N/n)]:

  k   := numelems(convert(N/n, base, 10)):
  fmt := cat("set %", k, "d: %a\n"):
  for i from 1 to N/n do
    printf(fmt, i, T[i])
  end do:

  return T
end proc:

MakeTeams(new_team, 2):

set 1: ["Michael K", "Andy C"]
set 2: ["Michael G", "Mitch"]
set 3: ["Jez", "Dean B"]
set 4: ["Anthony B", "Rik B"]
set 5: ["Ilya", "Fariborz"]
set 6: ["Eugene", "Tania"]
set 7: ["Bill", "Stevs"]
set 8: ["Victor", "Jane"]
set 9: ["Nash", "Ben"]

 

 

newnew_team := ["Michael K", "Andy C", "Michael G", "Mitch", "Jez", "Dean B", "Anthony B", "Rik B", "Ilya", "Fariborz", "Eugene", "Tania", "Bill", "Stevs", "Victor", "Jane", "Nash", "Ben", "Malachi T", "R", "Sachin ", "Prakash Sn", "Graeme", "Nayu", "Martih", "Rickn", "Ahmed"]:

MakeTeams(newnew_team, 3):

set 1: ["Michael K", "Andy C", "Michael G"]

set 2: ["Mitch", "Jez", "Dean B"]
set 3: ["Anthony B", "Rik B", "Ilya"]
set 4: ["Fariborz", "Eugene", "Tania"]
set 5: ["Bill", "Stevs", "Victor"]
set 6: ["Jane", "Nash", "Ben"]
set 7: ["Malachi T", "R", "Sachin "]
set 8: ["Prakash Sn", "Graeme", "Nayu"]
set 9: ["Martih", "Rickn", "Ahmed"]

 


printf variant

MakeTeams_bis := proc(team, n)
  local N, T, i, k, fmt;
  N := numelems(team):
  if irem(N, n) <> 0 then
    error cat("The number of players (", N, ") is not a multiple of the number (", n, ") of team members")
  end if:
  T := [seq(team[1+(i-1)*n..i*n], i=1..N/n)]:

  k   := numelems(convert(N/n, base, 10)):
  fmt := cat("set %", k, "d: ", seq("%s, ", i=1..n-1), "%s\n");
  for i from 1 to N/n do
    printf(fmt, i, op(T[i]))
  end do:
  return T
end proc:

MakeTeams_bis(new_team, 2):
print():
MakeTeams_bis(newnew_team, 3):

set 1: Michael K, Andy C
set 2: Michael G, Mitch

set 3: Jez, Dean B
set 4: Anthony B, Rik B
set 5: Ilya, Fariborz
set 6: Eugene, Tania
set 7: Bill, Stevs
set 8: Victor, Jane
set 9: Nash, Ben

 

 

set 1: Michael K, Andy C, Michael G
set 2: Mitch, Jez, Dean B
set 3: Anthony B, Rik B, Ilya
set 4: Fariborz, Eugene, Tania
set 5: Bill, Stevs, Victor
set 6: Jane, Nash, Ben
set 7: Malachi T, R, Sachin
set 8: Prakash Sn, Graeme, Nayu
set 9: Martih, Rickn, Ahmed

 

`&rsquo;`

(1)


You can also build random teams this way

MakeRandomTeams := proc(TEAM, n)
  local team, N, T, i, k, fmt;
  team := combinat:-randperm(TEAM);
  N := numelems(team):
  if irem(N, n) <> 0 then
    error cat("The number of players (", N, ") is not a multiple of the number (", n, ") of team members")
  end if:
  T := [seq(team[1+(i-1)*n..i*n], i=1..N/n)]:

  k   := numelems(convert(N/n, base, 10)):
  fmt := cat("set %", k, "d: %a\n"):
  for i from 1 to N/n do
    printf(fmt, i, T[i])
  end do:
  return T
end proc:

MakeRandomTeams(new_team, 2):

set 1: ["Michael G", "Andy C"]
set 2: ["Nash", "Ilya"]
set 3: ["Anthony B", "Bill"]
set 4: ["Tania", "Stevs"]
set 5: ["Michael K", "Mitch"]
set 6: ["Rik B", "Victor"]
set 7: ["Dean B", "Jez"]
set 8: ["Ben", "Jane"]
set 9: ["Eugene", "Fariborz"]

 
 

 

Download teams_mmcdara.mw

x in RealRange(1, Open(4)):
convert(%, relation)
                    1 <= x < 4

If you realy want to get a single inequality when the interval contains +/- infinity you can use procedure rel below: 

rel := proc(RR)
  local r := convert(RR, relation);
  if has(r, infinity) then
    r := remove(has, [op(r)], infinity)[]
  end if:
  r
end proc:

RR := x in RealRange(1, Open(4));
rel(RR)

`in`(x, RealRange(1, Open(4)))

 

And(1 <= x, x < 4)

(1)

RR := x in RealRange(Open(2), Open(infinity));
rel(RR)

`in`(x, RealRange(Open(2), infinity))

 

2 < x

(2)

RR := x in RealRange(Open(-infinity), Open(-3));
rel(RR)

`in`(x, RealRange(-infinity, Open(-3)))

 

x < -3

(3)

RR := x in RealRange(2, 3);
rel(RR)

`in`(x, RealRange(2, 3))

 

And(2 <= x, x <= 3)

(4)
 

 

Download Enhanced_convert.mw

1 2 3 4 5 6 7 Last Page 1 of 60