mmcdara

3713 Reputation

17 Badges

5 years, 347 days

MaplePrimes Activity


These are answers submitted by mmcdara

I used your worksheet and just add this at the end of it:

# you wrote "I can always define a function that computes the commutator"
# Yes, here is a naive example where neither the type of Phi nor e is checked

commut := proc(Phi, e)
  collect(simplify(mult(Phi, e)-mult(e, Phi)), [Dx])
end proc:

# your example
f := x -> sin(x)*cos(x)^8:
commut(A(s), f(x))

        /        2   \       7
        \9 cos(x) - 8/ cos(x) 



# "What command allows me to act with 'A(s)' on 'f' and get the resulting function?"
#
# I suggest you doing this

eval(diffop2de(A(s),u(x)), u(x)=f(x));
                           8         9           2       7
     s cot(x) sin(x) cos(x)  + cos(x)  - 8 sin(x)  cos(x) 

Example_mmdara.mw

@jennierubyjane  

Here is the answer to your removed question  (see @Preben Alsholm above)  
Comments and advices are in Maple 1D font within your worksheet named  ODEprobz-2 

restart

``

with(plots):

 

fixedparameter := [Nb = 0, Nt = 0, Bi = 1000, Le = 10]

[Nb = 0, Nt = 0, Bi = 1000, Le = 10]

(1)

DE1 := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))-(diff(f(eta), eta))^2 = 0;

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))-(diff(f(eta), eta))^2 = 0

(2)

``

DE2 := diff(theta(eta), eta, eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0;

diff(diff(theta(eta), eta), eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

(3)

DE3 := diff(phi(eta), eta, eta)+Le*(diff(phi(eta), eta))+Nt*(diff(theta(eta), eta, eta))/Nb = 0;

diff(diff(phi(eta), eta), eta)+Le*(diff(phi(eta), eta))+Nt*(diff(diff(theta(eta), eta), eta))/Nb = 0

(4)

# check the number of boundary conditions we need

select(has, indets({DE1, DE2, DE3}, function), diff);
nb_of_bcs_needed := add(map(u -> numelems(select(has, %, u)), [f, phi, theta]))

{diff(diff(diff(f(eta), eta), eta), eta), diff(diff(f(eta), eta), eta), diff(diff(phi(eta), eta), eta), diff(diff(theta(eta), eta), eta), diff(f(eta), eta), diff(phi(eta), eta), diff(theta(eta), eta)}

 

7

(5)

BC1 := f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0;

f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

(6)

BC2 := theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0));

theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

(7)

BC3 := phi(0) = 1, phi(10) = 0;

phi(0) = 1, phi(10) = 0

(8)

# Check the whole number of unknowns

indets({BC1, BC2, BC3, DE1, DE2, DE3}) minus {eta} minus {f, phi, theta}(eta);
Whole_nb_of_unknowns := numelems(%);

{Bi, Le, Nb, Nt, Pr, diff(diff(diff(f(eta), eta), eta), eta), diff(diff(f(eta), eta), eta), diff(diff(phi(eta), eta), eta), diff(diff(theta(eta), eta), eta), diff(f(eta), eta), diff(phi(eta), eta), diff(theta(eta), eta)}

 

12

(9)

Number_of_parameters := Whole_nb_of_unknowns - nb_of_bcs_needed;

parameters := indets({BC1, BC2, BC3, DE1, DE2, DE3}, name) minus {eta}

5

 

{Bi, Le, Nb, Nt, Pr}

(10)

indets({DE1, DE2, DE3}, function)

# Below you fix one parameter (Pr) to numerical values.
# Thus it remains to you to fix also

parameters minus{Pr};

# If not MAPLE will consider you have 7+4=11 quantities and will wait for 11 bcs

{Bi, Le, Nb, Nt}

(11)

# As I told you in a previous answer, the 'parameter' options is not supported by bc solvers.
# Thus you have to fix {Bi, Le, Nb, Nt} by using, for instance, the way you use to fix Pr.
#
# But it's probably better to define something like this

solver := proc(Bi, Le, Nb, Nt)
  # place her the code you have written
  # add   return R
end proc:

# do this
# solver(1, 2, 3, 2, 1)
  

L := [0.7e-1, .2, .7, 2, 7, 20, 70]; for k to 7 do R := dsolve(eval({BC1, BC2, BC3, DE1, DE2, DE3}, Pr = L[k]), [f(eta), theta(eta), phi(eta)], numeric, output = listprocedure); Y || k := rhs(R[5]); YP || k := -rhs(R[6]) end do

Error, (in dsolve/numeric/bvp/convertsys) too few boundary conditions: expected 11, got 7

 

plot([Y || (1 .. 10)], 0 .. 6, labels = [eta, theta(eta)])

Error, (in plot) procedure expected, as range contains no plotting variable

 

NULL

Download ODEprobz-2_mmcdara.mw

Using de Cayley-Menger determinant,
it seems there is no other solution:

restart:

Vol := proc(L::table)
  local M := Matrix(5$2, (i,j) -> `if`(i=j, 0, `if`(i=1 or j=1, 1, L[[op(sort([i-1,j-1]))]]^2))):
  sqrt( LinearAlgebra:-Determinant(M)/288 ):
end proc

proc (L::table) local M; M := Matrix(`$`(5, 2), proc (i, j) options operator, arrow; `if`(i = j, 0, `if`(i = 1 or j = 1, 1, L[[op(sort([i-1, j-1]))]]^2)) end proc); sqrt((1/288)*LinearAlgebra:-Determinant(M)) end proc

(1)

P := table([ [1, 2]=6, [2, 3]=8, [1, 3]=10, [1, 4]=11, [2, 4]=7, [3, 4]=9 ]);
Vol(P)

48

(2)

# search for polyhedra whose sides are in arithmetic progression with common difference n

Q := table([ [1, 2]=6+n, [2, 3]=8+n, [1, 3]=10+n, [1, 4]=11+n, [2, 4]=7+n, [3, 4]=9+n ]);
Vol(Q);

table( [( [1, 2] ) = 6+n, ( [2, 3] ) = 8+n, ( [3, 4] ) = 9+n, ( [1, 3] ) = 10+n, ( [2, 4] ) = 7+n, ( [1, 4] ) = 11+n ] )

 

(1/12)*(2*n^6+102*n^5+2099*n^4+22128*n^3+124160*n^2+340992*n+331776)^(1/2)

(3)

# the term under the square root mus be a multiple of 144

sol := msolve(2*n^6+102*n^5+2099*n^4+22128*n^3+124160*n^2+340992*n+331776=0, 144)

{n = 0}, {n = 2}, {n = 4}, {n = 6}, {n = 8}, {n = 10}, {n = 12}, {n = 14}, {n = 128}, {n = 18}, {n = 16}, {n = 130}, {n = 132}, {n = 22}, {n = 20}, {n = 134}, {n = 136}, {n = 26}, {n = 24}, {n = 138}, {n = 140}, {n = 30}, {n = 28}, {n = 142}, {n = 36}, {n = 38}, {n = 32}, {n = 34}, {n = 44}, {n = 46}, {n = 40}, {n = 42}, {n = 54}, {n = 52}, {n = 50}, {n = 48}, {n = 62}, {n = 60}, {n = 58}, {n = 56}, {n = 72}, {n = 74}, {n = 76}, {n = 78}, {n = 64}, {n = 66}, {n = 68}, {n = 70}, {n = 90}, {n = 88}, {n = 94}, {n = 92}, {n = 82}, {n = 80}, {n = 86}, {n = 84}, {n = 108}, {n = 110}, {n = 104}, {n = 106}, {n = 100}, {n = 102}, {n = 96}, {n = 98}, {n = 126}, {n = 124}, {n = 122}, {n = 120}, {n = 118}, {n = 116}, {n = 114}, {n = 112}

(4)

# plug these potential solution within Q and compute the volumes of the tetrahedra

map(s -> Vol(eval(Q, s)), [sol]):
select(is, %, integer)

[48]

(5)

factor(2*n^6+102*n^5+2099*n^4+22128*n^3+124160*n^2+340992*n+331776);
b := op(1, %);

# the equation b=Z^2 doesn't seem to have any integer solution

[seq(sqrt(eval(b, n=m)), m in [seq(2...10^5, 2)])]:
select(is, %, integer)

(2*n^4+70*n^3+851*n^2+4032*n+5184)*(8+n)^2

 

2*n^4+70*n^3+851*n^2+4032*n+5184

 

[]

(6)

 

Other_Polyhedra.mw

By hand.
From elementary calculus (probably in your Dutch Book?):

  1. sqrt(1+eta) is equivalent to 1+eta/2 as eta tends to 0
  2. 1/(1-mu) is equivalent to 1+mu as mu tends to 0

Assume abs(v) << c, set v^2 / c^2 = eta and apply rule 1 above.

Then apply rule 2

You'll get the desired result

Not completely clear:

  • "maximum of p" : what is p? is it power?
  • Are  [Rth, Rload, S, X, Y] the unknowns of the maximization  problem?
  • In such a case why does the expression of power not contain Rth but R? A typo?
  • Are the remaining variables a kind of  "parameters" you would like to express the maximiser in terms of?

(previous answer deleted)

First error :

The term 

[diff(f(eta), eta)]^2

should be written

diff(f(eta), eta)^2

(no square brackets).

Second error:

Bi, Le, Nb and Nt are not set to numerical values before calling dsolve.
Fotr BCs problems it's not possible to use the option 'parameters', meaning you must fix these 4 parameters.

Third error:

What does this boundary contitions mean?

f(eta) = 1-exp(-eta)

Either you fix f(eta) this way and you must discard DE1 or you remove this condition (which is not a BC).

Once corrected this will work.
Here is an example

restart

with(plots):

fixedparameter := [Nb = 0, Nt = 0, Bi = 1000, Le = 10]

[Nb = 0, Nt = 0, Bi = 1000, Le = 10]

(1)

DE1 := diff(f(eta), eta$3)+f(eta)*(diff(f(eta), eta$2))-(diff(f(eta), eta))^2 = 0;

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))-(diff(f(eta), eta))^2 = 0

(2)

DE2 := diff(theta(eta), eta$2)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*diff(theta(eta), eta)^2 = 0

diff(diff(theta(eta), eta), eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

(3)

DE3 := diff(phi(eta), eta$2)+Le*(diff(phi(eta), eta))+Nt*(diff(theta(eta), eta$2))/Nb

diff(diff(phi(eta), eta), eta)+Le*(diff(phi(eta), eta))+Nt*(diff(diff(theta(eta), eta), eta))/Nb

(4)

BC1 := f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

(5)

BC2 := theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

(6)

BC3 := phi(0) = 1, phi(10) = 0

phi(0) = 1, phi(10) = 0

(7)

L := [0.7e-1, .2, .7, 2, 7, 20, 70];

[0.7e-1, .2, .7, 2, 7, 20, 70]

(8)

dsolve(eval({BC1, BC2, BC3, DE1, DE2, DE3}, [Pr = L[1], Nb=1, Nt=1, Le=1, Bi=1]), numeric)

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(18, {(1) = .0, (2) = .5600274343870987, (3) = 1.1247730730738694, (4) = 1.6946860875767662, (5) = 2.2722338749422577, (6) = 2.8581908733706656, (7) = 3.4503875303957297, (8) = 4.046474878343585, (9) = 4.645912112388458, (10) = 5.246207324495506, (11) = 5.847078344278084, (12) = 6.448189428827225, (13) = 7.049388603437387, (14) = 7.650651033541072, (15) = 8.251932706844324, (16) = 8.851091084023928, (17) = 9.434168515476642, (18) = 10.0}, datatype = float[8], order = C_order); Y := Matrix(18, 7, {(1, 1) = .0, (1, 2) = 1.0, (1, 3) = -1.0000083736477487, (1, 4) = 1.0, (1, 5) = -.9627155087094051, (1, 6) = .8932939532798244, (1, 7) = -.10670604672017561, (2, 1) = .428805764191583, (2, 2) = .5711880250884803, (2, 3) = -.5712021333779463, (2, 4) = .5879089240679947, (2, 5) = -.5480427785945484, (2, 6) = .8326501314543692, (2, 7) = -.10928770090302715, (3, 1) = .6752686255501761, (3, 2) = .32471529023290274, (3, 3) = -.3247361839239819, (3, 4) = .3514685900109421, (3, 5) = -.31175581510040584, (3, 6) = .7708760093957655, (3, 7) = -.10913433034011712, (4, 1) = .8163300300814248, (4, 2) = .18364009123554187, (4, 3) = -.18366746271748552, (4, 4) = .2156589005000783, (4, 5) = -.17769871258268596, (4, 6) = .7091231701957647, (4, 7) = -.10738174334697312, (5, 1) = .8968937693034735, (5, 2) = .10305891152073104, (5, 3) = -.10309171674583331, (5, 4) = .1370826582156433, (5, 5) = -.10177344755313196, (5, 6) = .6478411263284996, (5, 7) = -.1047307660920922, (6, 1) = .9425879376516816, (6, 2) = 0.5734423547221287e-1, (6, 3) = -0.5738120767061603e-1, (6, 4) = 0.9120208654489624e-1, (6, 5) = -0.5902593183029002e-1, (6, 6) = .5873771403606965, (6, 7) = -.10159771014418705, (7, 1) = .968208882050101, (7, 2) = 0.31700458254958055e-1, (7, 3) = -0.31740414019857124e-1, (7, 4) = 0.640039411990049e-1, (7, 5) = -0.3518581602607183e-1, (7, 6) = .528200451135273, (7, 7) = -0.982396806025139e-1, (8, 1) = .9824375482583976, (8, 2) = 0.17447328478490266e-1, (8, 3) = -0.17489314525260428e-1, (8, 4) = 0.4735824943761653e-1, (8, 5) = -0.21969584798259677e-1, (8, 6) = .47066305597890323, (8, 7) = -0.9481022006893768e-1, (9, 1) = .9902978667013029, (9, 2) = 0.9561413163810085e-2, (9, 3) = -0.9604732476457444e-2, (9, 4) = 0.3660288451484923e-1, (9, 5) = -0.14634865389515228e-1, (9, 6) = .4148581736099834, (9, 7) = -0.9138957455491484e-1, (10, 1) = .9946069088414775, (10, 2) = 0.5226092062699899e-2, (10, 3) = -0.5270260936309525e-2, (10, 4) = 0.29161494701877153e-1, (10, 5) = -0.10550276331235979e-1, (10, 6) = .36100906217464296, (10, 7) = -0.8803277380022204e-1, (11, 1) = .996960735905653, (11, 2) = 0.28455530828105915e-2, (11, 3) = -0.2890252591206066e-2, (11, 4) = 0.23580498519393985e-1, (11, 5) = -0.8240264424813144e-2, (11, 6) = .3091002018850351, (11, 7) = -0.8476178952416168e-1, (12, 1) = .9982396576611059, (12, 2) = 0.15396559050107964e-2, (12, 3) = -0.158468154775915e-2, (12, 4) = 0.19065404599670637e-1, (12, 5) = -0.689907138366603e-2, (12, 6) = .2591079384449367, (12, 7) = -0.8158788864558544e-1, (13, 1) = .9989286097142687, (13, 2) = 0.8235700180203321e-3, (13, 3) = -0.8687934884478193e-3, (13, 4) = 0.15180974928955936e-1, (13, 5) = -0.60870811911754984e-2, (13, 6) = .2109860791426831, (13, 7) = -0.7851544916736126e-1, (14, 1) = .9992940035318575, (14, 2) = 0.43094630617234223e-3, (14, 3) = -0.4762884116093326e-3, (14, 4) = 0.11688545571122016e-1, (14, 5) = -0.5565002313156132e-2, (14, 6) = .16467578310745598, (14, 7) = -0.7554509868754672e-1, (15, 1) = .9994819673692723, (15, 2) = 0.21569608742561243e-3, (15, 3) = -0.2611085552531902e-3, (15, 4) = 0.8457161125539943e-2, (15, 5) = -0.52027650858171934e-2, (15, 6) = .12011951486817667, (15, 7) = -0.7267595146930358e-1, (16, 1) = .9995724447708355, (16, 2) = 0.9799600420333745e-4, (16, 3) = -0.14344960056701566e-3, (16, 4) = 0.5424704328738625e-2, (16, 5) = -0.4930492436351609e-2, (16, 6) = 0.7740687344443793e-1, (16, 7) = -0.6991576732196783e-1, (17, 1) = .9996093201088455, (17, 2) = 0.3461029279444914e-4, (17, 3) = -0.8008720758115132e-4, (17, 4) = 0.26146838320783984e-2, (17, 5) = -0.4714079315267472e-2, (17, 6) = 0.3740108086578089e-1, (17, 7) = -0.6732215994639175e-1, (18, 1) = .9996181940805127, (18, 2) = .0, (18, 3) = -0.454900416212326e-4, (18, 4) = .0, (18, 5) = -0.4531292061552813e-2, (18, 6) = .0, (18, 7) = -0.6489026336802801e-1}, datatype = float[8], order = C_order); YP := Matrix(18, 7, {(1, 1) = 1.0, (1, 2) = -1.0000083736477487, (1, 3) = 1.0, (1, 4) = -.9627155087094051, (1, 5) = .9707034709614114, (1, 6) = -.10670604672017561, (1, 7) = -0.7987962252006221e-2, (2, 1) = .5711880250884803, (2, 2) = -.5712021333779463, (2, 3) = .5711905273154713, (2, 4) = -.5480427785945484, (2, 5) = .5497910244460202, (2, 6) = -.10928770090302715, (2, 7) = -0.17482458514717523e-2, (3, 1) = .32471529023290274, (3, 2) = -.3247361839239819, (3, 3) = .3247241762957947, (3, 4) = -.31175581510040584, (3, 5) = .30981251534482657, (3, 6) = -.10913433034011712, (3, 7) = 0.19432997555792657e-2, (4, 1) = .18364009123554187, (4, 2) = -.18366746271748552, (4, 3) = .18365694847414207, (4, 4) = -.17769871258268596, (4, 5) = .17370545720295322, (4, 6) = -.10738174334697312, (4, 7) = 0.3993255379732757e-2, (5, 1) = .10305891152073104, (5, 2) = -.10309171674583331, (5, 3) = .10308345765997433, (5, 4) = -.10177344755313196, (5, 5) = 0.9671209565850723e-1, (5, 6) = -.1047307660920922, (5, 7) = 0.5061351894624732e-2, (6, 1) = 0.5734423547221287e-1, (6, 2) = -0.5738120767061603e-1, (6, 3) = 0.5737519554010141e-1, (6, 4) = -0.5902593183029002e-1, (6, 5) = 0.534647271004179e-1, (6, 6) = -.10159771014418705, (6, 7) = 0.55612047298721195e-2, (7, 1) = 0.31700458254958055e-1, (7, 2) = -0.31740414019857124e-1, (7, 3) = 0.31736269827547556e-1, (7, 4) = -0.3518581602607183e-1, (7, 5) = 0.29445196305145183e-1, (7, 6) = -0.982396806025139e-1, (7, 7) = 0.57406197209266445e-2, (8, 1) = 0.17447328478490266e-1, (8, 2) = -0.17489314525260428e-1, (8, 3) = 0.17486568553953172e-1, (8, 4) = -0.21969584798259677e-1, (8, 5) = 0.162244607173887e-1, (8, 6) = -0.9481022006893768e-1, (8, 7) = 0.5745124080870977e-2, (9, 1) = 0.9561413163810085e-2, (9, 2) = -0.9604732476457444e-2, (9, 3) = 0.960296670336161e-2, (9, 4) = -0.14634865389515228e-1, (9, 5) = 0.897792933120832e-2, (9, 6) = -0.9138957455491484e-1, (9, 7) = 0.5656936058306908e-2, (10, 1) = 0.5226092062699899e-2, (10, 2) = -0.5270260936309525e-2, (10, 3) = 0.5269149976898623e-2, (10, 4) = -0.10550276331235979e-1, (10, 5) = 0.5028713734096491e-2, (10, 6) = -0.8803277380022204e-1, (10, 7) = 0.5521562597139488e-2, (11, 1) = 0.28455530828105915e-2, (11, 2) = -0.2890252591206066e-2, (11, 3) = 0.28895655226291134e-2, (11, 4) = -0.8240264424813144e-2, (11, 5) = 0.28767835371146027e-2, (11, 6) = -0.8476178952416168e-1, (11, 7) = 0.5363480887698541e-2, (12, 1) = 0.15396559050107964e-2, (12, 2) = -0.158468154775915e-2, (12, 3) = 0.15842625060428e-2, (12, 4) = -0.689907138366603e-2, (12, 5) = 0.17033352584074199e-2, (12, 6) = -0.8158788864558544e-1, (12, 7) = 0.519573612525861e-2, (13, 1) = 0.8235700180203321e-3, (13, 2) = -0.8687934884478193e-3, (13, 3) = 0.8685409391185716e-3, (13, 4) = -0.60870811911754984e-2, (13, 5) = 0.10618705947521593e-2, (13, 6) = -0.7851544916736126e-1, (13, 7) = 0.5025210596423339e-2, (14, 1) = 0.43094630617234223e-3, (14, 2) = -0.4762884116093326e-3, (14, 3) = 0.4761378683917228e-3, (14, 4) = -0.5565002313156132e-2, (14, 5) = 0.7095017660538319e-3, (14, 6) = -0.7554509868754672e-1, (14, 7) = 0.48555005471023005e-2, (15, 1) = 0.21569608742561243e-3, (15, 2) = -0.2611085552531902e-3, (15, 3) = 0.26101981730353754e-3, (15, 4) = -0.52027650858171934e-2, (15, 5) = 0.5142775667086744e-3, (15, 6) = -0.7267595146930358e-1, (15, 7) = 0.4688487519108519e-2, (16, 1) = 0.9799600420333745e-4, (16, 2) = -0.14344960056701566e-3, (16, 3) = 0.1433978711570115e-3, (16, 4) = -0.4930492436351609e-2, (16, 5) = 0.40478658120098564e-3, (16, 6) = -0.6991576732196783e-1, (16, 7) = 0.4525705855150624e-2, (17, 1) = 0.3461029279444914e-4, (17, 2) = -0.8008720758115132e-4, (17, 3) = 0.8005711699197796e-4, (17, 4) = -0.4714079315267472e-2, (17, 5) = 0.3428436835141574e-3, (17, 6) = -0.6732215994639175e-1, (17, 7) = 0.4371235631753315e-2, (18, 1) = .0, (18, 2) = -0.454900416212326e-4, (18, 3) = 0.4547267325406388e-4, (18, 4) = -0.4531292061552813e-2, (18, 5) = 0.30604272092487825e-3, (18, 6) = -0.6489026336802801e-1, (18, 7) = 0.4225249340627935e-2}, 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(18, {(1) = .0, (2) = .5600274343870987, (3) = 1.1247730730738694, (4) = 1.6946860875767662, (5) = 2.2722338749422577, (6) = 2.8581908733706656, (7) = 3.4503875303957297, (8) = 4.046474878343585, (9) = 4.645912112388458, (10) = 5.246207324495506, (11) = 5.847078344278084, (12) = 6.448189428827225, (13) = 7.049388603437387, (14) = 7.650651033541072, (15) = 8.251932706844324, (16) = 8.851091084023928, (17) = 9.434168515476642, (18) = 10.0}, datatype = float[8], order = C_order); Y := Matrix(18, 7, {(1, 1) = .0, (1, 2) = .0, (1, 3) = 0.25223009947977965e-10, (1, 4) = .0, (1, 5) = -0.11967498513822233e-8, (1, 6) = 0.3449489387830536e-9, (1, 7) = 0.34494920702809653e-9, (2, 1) = -0.4993969234941121e-6, (2, 2) = 0.4995112075635017e-6, (2, 3) = -0.4993916006322284e-6, (2, 4) = 0.5117473637484416e-6, (2, 5) = -0.52048938492574e-6, (2, 6) = -0.7034266350752575e-8, (2, 7) = 0.7890221049406691e-8, (3, 1) = -0.4087071029041579e-6, (3, 2) = 0.4089476376272352e-6, (3, 3) = -0.40880922481537394e-6, (3, 4) = 0.4141503170988172e-6, (3, 5) = -0.4218405312219467e-6, (3, 6) = -0.6249746855967776e-8, (3, 7) = 0.6838413704940687e-8, (4, 1) = -0.22282509814672855e-6, (4, 2) = 0.22313953540849866e-6, (4, 3) = -0.22306725080521596e-6, (4, 4) = 0.221222398089829e-6, (4, 5) = -0.22591528548843863e-6, (4, 6) = -0.3494928584438339e-8, (4, 7) = 0.384108678916432e-8, (5, 1) = -0.8338115611908853e-7, (5, 2) = 0.8368594329768777e-7, (5, 3) = -0.8373229903565581e-7, (5, 4) = 0.7892623333804591e-7, (5, 5) = -0.8126025029817747e-7, (5, 6) = -0.12517308389794636e-8, (5, 7) = 0.14822165398272088e-8, (6, 1) = -0.6169139652296929e-8, (6, 2) = 0.63719417817350964e-8, (6, 3) = -0.6557257756873992e-8, (6, 4) = 0.1901706263662916e-8, (6, 5) = -0.29207841035074857e-8, (6, 6) = 0.3389928796071862e-10, (6, 7) = 0.1672773738971632e-9, (7, 1) = 0.25560443583714648e-7, (7, 2) = -0.25546856224102337e-7, (7, 3) = 0.2522532190002388e-7, (7, 4) = -0.28479956214451286e-7, (7, 5) = 0.27999255837557755e-7, (7, 6) = 0.5767639315411584e-9, (7, 7) = -0.3711001020264522e-9, (8, 1) = 0.3147490337648074e-7, (8, 2) = -0.317255203521482e-7, (8, 3) = 0.31283369016963e-7, (8, 4) = -0.3312032942485974e-7, (8, 5) = 0.32747509393246946e-7, (8, 6) = 0.6919401607952563e-9, (8, 7) = -0.4789804321294085e-9, (9, 1) = 0.2607570505985314e-7, (9, 2) = -0.26652065750723058e-7, (9, 3) = 0.26109840339196685e-7, (9, 4) = -0.26998992136637128e-7, (9, 5) = 0.26554065996527855e-7, (9, 6) = 0.618865743869508e-9, (9, 7) = -0.40687429404199324e-9, (10, 1) = 0.176467054792625e-7, (10, 2) = -0.18596076630334488e-7, (10, 3) = 0.17974971257818186e-7, (10, 4) = -0.18410152038761607e-7, (10, 5) = 0.1784941497935491e-7, (10, 6) = 0.4924988667395001e-9, (10, 7) = -0.2910632971047673e-9, (11, 1) = 0.10004290644507513e-7, (11, 2) = -0.11362496289477218e-7, (11, 3) = 0.10681486842003664e-7, (11, 4) = -0.11003693622775692e-7, (11, 5) = 0.10342038241393653e-7, (11, 6) = 0.3734242672919821e-9, (11, 7) = -0.190145050152404e-9, (12, 1) = 0.4328489466340109e-8, (12, 2) = -0.6121895323406549e-8, (12, 3) = 0.5396765471306525e-8, (12, 4) = -0.5782047646051915e-8, (12, 5) = 0.5050292183028202e-8, (12, 6) = 0.27957854517453734e-9, (12, 7) = -0.12004498110431126e-9, (13, 1) = 0.5743256317118195e-9, (13, 2) = -0.28219252766523526e-8, (13, 3) = 0.2065129371636142e-8, (13, 4) = -0.25733012593275456e-8, (13, 5) = 0.18000492408274837e-8, (13, 6) = 0.20997132714769276e-9, (13, 7) = -0.7854842380837435e-10, (14, 1) = -0.17212493736817878e-8, (14, 2) = -0.9939897829103058e-9, (14, 3) = 0.21497675304576743e-9, (14, 4) = -0.8426202041546618e-9, (14, 5) = 0.48948066900947996e-10, (14, 6) = 0.15753921587776751e-9, (14, 7) = -0.5812827183075867e-10, (15, 1) = -0.30573546219058857e-8, (15, 2) = -0.13483432450291834e-9, (15, 3) = -0.6594414391006312e-9, (15, 4) = -0.5884218094733528e-10, (15, 5) = -0.7415422032688685e-9, (15, 6) = 0.11487907770411647e-9, (15, 7) = -0.5141603227752402e-10, (16, 1) = -0.3827062003995019e-8, (16, 2) = 0.1533284684965952e-9, (16, 3) = -0.9578504017077116e-9, (16, 4) = 0.1819535583971622e-9, (16, 5) = -0.9808707767300642e-9, (16, 6) = 0.7629678632634107e-10, (16, 7) = -0.52883274431226565e-10, (17, 1) = -0.4285519488976297e-8, (17, 2) = 0.13918457047418852e-9, (17, 3) = -0.9503395923168821e-9, (17, 4) = 0.14490223058840753e-9, (17, 5) = -0.937908008732926e-9, (17, 6) = 0.3874518601041551e-10, (17, 7) = -0.5879467195192433e-10, (18, 1) = -0.4607447067280032e-8, (18, 2) = .0, (18, 3) = -0.8153633363548579e-9, (18, 4) = .0, (18, 5) = -0.7850479273694045e-9, (18, 6) = .0, (18, 7) = -0.6675253945604348e-10}, 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[18] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(5.2048938492574e-7) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [7, 18, [f(eta), diff(f(eta), eta), diff(diff(f(eta), eta), eta), phi(eta), diff(phi(eta), eta), theta(eta), diff(theta(eta), eta)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[18] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[18] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(7, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(18, 7, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(7, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(18, 7, X, Y, outpoint, yout, L, V) end if; [eta = outpoint, seq('[f(eta), diff(f(eta), eta), diff(diff(f(eta), eta), eta), phi(eta), diff(phi(eta), eta), theta(eta), diff(theta(eta), eta)]'[i] = yout[i], i = 1 .. 7)] 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[18] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(5.2048938492574e-7) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [7, 18, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[18] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[18] 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(7, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(18, 7, 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(7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}); `dsolve/numeric/hermite`(18, 7, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 7)] end proc, (2) = Array(0..0, {}), (3) = [eta, f(eta), diff(f(eta), eta), diff(diff(f(eta), eta), eta), phi(eta), diff(phi(eta), eta), theta(eta), diff(theta(eta), eta)], (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); [eta = res[1], seq('[f(eta), diff(f(eta), eta), diff(diff(f(eta), eta), eta), phi(eta), diff(phi(eta), eta), theta(eta), diff(theta(eta), eta)]'[i] = res[i+1], i = 1 .. 7)] catch: error  end try end proc

(9)

 

Download ODEprobz_mmcdara.mw

I guess that :

  1. You want to built a linear model which relates the "Thoracic IDEM" to "First" and "Min"?
  2. Plot this model and the experimental points on the same plot?

Please let me know if I'm mistaken and still want to draw a curve and not a plane. 

Based on the worsheet corresponding to your second question "Thanks an ocean, could you please help me about...", here is the way I'd do this

# Step 1: extract the coordinates of the pointt and arrange them as a matrix

pts := `<,>`(op~(1, [L])[]);

# Step 2: Build a linear model in the least square sense.
# Notations: x=First, y=Min, and dependent variable=Predicted
 
fit := LinearFit([1, x, y], pts, [x, y]);

#  Step 3: plotting

display(
  L, 
  plot3d(fit, x=(min..max)(pts[..,1]), y=(min..max)(pts[..,2]), style=wireframe, color="Gray"),
  axes = boxed, 
  view = [-800 .. 800, -800 .. 800, -800 .. 800], 
  orientation = [125, 65], 
  title = `Thoracic IDEM`, 
  labels = [First, Min, Predicted], 
  labelfont = ["HELVETICA", 20], 
  titlefont = ["ROMAN", 30]
)


... burt not the only one

restart:
expr := f(2)+f(3)+f(4);
nrew_expr := eval(expr, f=h)
                       h(2) + h(3) + h(4)

expr := F(f(2))+F(f(3))+F(f(4));
nrew_expr := eval(expr, [F=H, f=h])
                  F(f(2)) + F(f(3)) + F(f(4))
                  H(h(2)) + H(h(3)) + H(h(4))

BTW, what do you mean by "where f(x) is really 'anything'? "

@tomleslie @lcz

Unless the graphs are ordered in some way the proportion of graphs whose vertex connectivity equals 6 is about 1/3 :

r := rand(1..numelems(L)):
s := map(n -> VertexConnectivity(L[r()]), [$1..100]):
Statistics:-Tally(s)
                        [4 = 67, 6 = 33]

I do believe you're right @lcz saying that Maple is (EXTREMELY) slow in computing the vertex connectivity.

PS : 
I'm interested in your problem.
I use to use R and it looks like a white elephant to read graph6 format graphs ; so I exported the graphs from Maple into (only) 3 formats that are easily readable from R : edge and pajek.
It takes about 104s to comute the vertex connectivity of the graphs in pajek format, 
but only 3s if they are in edge format.
As you see the computation time strongly depends on the format of the graph.

This suggest that a significant part of the time Maple takes to compute the vertex connectivities could come from the conversion from graph6 format into a mor suitable one for this computation.

But more probably, as @vv wrote, this is a compilation issue. In R the inner procedure which does the computation is a compiled C procedure whereas MaxFlow (Maple) is not.

Try surd instead:
 

is(surd(257, 2) < -79999999/10000000)
                             false
is(-surd(257, 2) < -79999999/10000000)
                              true

 

to @Kitonum's answer
 

restart:
expr := convert(-24.*y^6*(y-1.)^7*(y+1.)^7*(4.+6.*y^8-22.*y^6+30.*y^4-18.*y^2)/(4.*y^18-28.*y^16+84.*y^14+4.-136.*y^12+116.*y^10-24.*y^8-52.*y^6+56.*y^4-24.*y^2)^2, fraction);

simplify(expr);
eval(%, y=1.00001);
                                       9
                        -7.500675015 10 

 

The method is described in the help pages, please look to the attached file (the green texts are clickable) for an exampleDownload hyperlink.mw

Even if I'm not familiar with this package, the Physics[Setup] help page says that vectordisplay should do the job:

vectordisplay   none, arrow, bold, or halfarrow.
When mathematicalnotation is set to true, the vectordisplay setting causes the Maple Standard GUI to display non-projected vectors with an arrow or halfarrow on top, or in bold, as specified.

An example (Maple 2015)

restart:
CountPrimes := proc(p::integer, q::integer)
  local k := 0:
  local i := nextprime(p):
  while i < q do
    k := k+1:
    i := nextprime(i):
  end do:
  return k
end proc:
      
start := 1:
for p in [seq(1+1000*k, k=0..9)] do
  printf("range %4d..%5d : nb of primes = %d\n", p, p+999, CountPrimes(p, p+999))
end do:

range    1.. 1000 : nb of primes = 168
range 1001.. 2000 : nb of primes = 135
range 2001.. 3000 : nb of primes = 127
range 3001.. 4000 : nb of primes = 119
range 4001.. 5000 : nb of primes = 118
range 5001.. 6000 : nb of primes = 114
range 6001.. 7000 : nb of primes = 117
range 7001.. 8000 : nb of primes = 106
range 8001.. 9000 : nb of primes = 110
range 9001..10000 : nb of primes = 111

Concerning the plot, here is a suggestion 

res := NULL:
start := 1:
for p in [seq(1+1000*k, k=0..9)] do
  res := res, plottools:-rectangle([p, 0], [p+999, CountPrimes(p, p+999)], transparency=0.7)
end do:
plots:-display(res)

To conclude:
"Can i make a procedure what calculates the latest mersenne prime number ?"  what does "latest" mean?
Advice: look at numtheory[mersenne] (Maple 2015, think it is numbertheory[mersenne] in more recent versions)

I believe you misinterpreted the phrase "This routine returns the "normalized" form of a linear differential equation, a differential operator list,...".

As written below it a differential operator list is not a list of odes but the list of the coefficients of the successive derivatives of the dependent variable of an ode.

As written in the DEnormal help page this list can be provided directly from the user, or derived from the ode by using convertAlg.
See the code bellow which is just a a commented version of the one given in this help page

restart:
with(DEtools):

# case of an ode
DE := 21*(-2*x^3)/(3*x^2-5*x+2)*y(x) + 42*(x^2)/(x+1)*x*(x-1)*D(y)(x) +
50*x^3/(x-1)^3*(D@@2)(y)(x) = x*sin(x);
DEnormal(DE,x,y(x));


# case of an operator list (here the operator list which corresponds to DE)
DE2 := convertAlg(DE,y(x));
DEnormal(DE2,x);

In the  convertAlg help page it's said that it "returns the coefficient list form for a linear ODE" (not of system of linear odes).
You can apply convertAlg and DEnormal for each ode in L this way

L := [diff(z(t), t, t)*m = 0, diff(x(t), t, t)*m - B*diff(y(t), t)*q = 0, diff(y(t), t, t)*m + B*diff(x(t), t)*q = 0] ;
V := [z(t), x(t), y(t)];
A := [seq(convertAlg(L[i], V[i]), i=1..3)];
N := DEnormal~(A, t);

and finally obtain the normal form of each ode this way

map(i -> add(N[i][1][j]*~(D@@(j-1))(op(0, V[i]))(t), j=1..nops(N[i][1])) = N[i][2], [$1..3]):
convert~(%, diff)
     [                                       / d      \    
     [                                     B |--- y(t)| q  
     [ d  / d      \       d  / d      \     \ dt     /    
     [--- |--- z(t)| = 0, --- |--- x(t)| = --------------, 
     [ dt \ dt     /       dt \ dt     /         m         

                            / d      \  ]
                          B |--- x(t)| q]
        d  / d      \       \ dt     /  ]
       --- |--- y(t)| = - --------------]
        dt \ dt     /           m       ]


But it's much simpler to do this

`Normal form of L`:= DEnormal~(L, t, V);

DEnormal.mw

2 3 4 5 6 7 8 Last Page 4 of 30