Maple 2016 Questions and Posts

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

Why GenerateMatrix produces wrong results?

``

restart

N := 2:

a := 1:

with(ArrayTools):

``

Qa := [-0.5379667864e-1*(diff(tau[1, 1](t), t, t))+7.862351349*10^(-11)*tau[2, 1](t)-8.050993899*10^(-12)*(diff(tau[2, 1](t), t, t))+.1166068042*(diff(tau[1, 2](t), t))+2.181309895*10^(-11)*(diff(tau[2, 2](t), t))+.5309519363*tau[1, 1](t) = 0, -1.265965258*10^(-11)*(diff(tau[1, 1](t), t, t))+.4884414390*tau[2, 1](t)-0.4948946475e-1*(diff(tau[2, 1](t), t, t))+2.738892495*10^(-11)*(diff(tau[1, 2](t), t))+.1340883970*(diff(tau[2, 2](t), t))+1.246469610*10^(-10)*tau[1, 1](t) = 0, 3.649366137*10^(-10)*tau[2, 2](t)-9.135908950*10^(-12)*(diff(tau[2, 2](t), t, t))-5.160677740*10^(-11)*(diff(tau[2, 1](t), t))+1.953765755*tau[1, 2](t)-0.4948946473e-1*(diff(tau[1, 2](t), t, t))-.3476543209*(diff(tau[1, 1](t), t)) = 0, 2.246672656*tau[2, 2](t)-0.5690888318e-1*(diff(tau[2, 2](t), t, t))-.3198194887*(diff(tau[2, 1](t), t))+4.602903411*10^(-10)*tau[1, 2](t)-1.159417294*10^(-11)*(diff(tau[1, 2](t), t, t))-8.175817372*10^(-11)*(diff(tau[1, 1](t), t)) = 0]

Q1 := [seq(seq(diff(tau[i, j](t), t), i = 1 .. M), j = 1 .. N)]

[diff(tau[1, 1](t), t), diff(tau[2, 1](t), t), diff(tau[1, 2](t), t), diff(tau[2, 2](t), t)]

(1)

with(LinearAlgebra):

CR := GenerateMatrix(simplify(Qa), Q1)

CR := Matrix(4, 4, {(1, 1) = 0, (1, 2) = 0, (1, 3) = .1166068042, (1, 4) = 0.2181309895e-10, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0.2738892495e-10, (2, 4) = .1340883970, (3, 1) = -.3476543209, (3, 2) = -0.5160677740e-10, (3, 3) = 0, (3, 4) = 0, (4, 1) = -0.8175817372e-10, (4, 2) = -.3198194887, (4, 3) = 0, (4, 4) = 0}), Vector(4, {(1) = 0.5379667864e-1*(diff(diff(tau[1, 1](t), t), t))-0.7862351349e-10*tau[2, 1](t)+0.8050993899e-11*(diff(diff(tau[2, 1](t), t), t))-.5309519363*tau[1, 1](t), (2) = 0.1265965258e-10*(diff(diff(tau[1, 1](t), t), t))-.4884414390*tau[2, 1](t)+0.4948946475e-1*(diff(diff(tau[2, 1](t), t), t))-0.1246469610e-9*tau[1, 1](t), (3) = -0.3649366137e-9*tau[2, 2](t)+0.9135908950e-11*(diff(diff(tau[2, 2](t), t), t))-1.953765755*tau[1, 2](t)+0.4948946473e-1*(diff(diff(tau[1, 2](t), t), t)), (4) = -2.246672656*tau[2, 2](t)+0.5690888318e-1*(diff(diff(tau[2, 2](t), t), t))-0.4602903411e-9*tau[1, 2](t)+0.1159417294e-10*(diff(diff(tau[1, 2](t), t), t))})

(2)

``

``

``

Download GenMatrix.mw

Do you know why increasing the number of applications of trapezoidal rule results infinity and imaginary part?

I want get result for Romberg Integration Method with 6 Applications of Trapezoidal Rule.

restart

with(Student[NumericalAnalysis]):

``

fff := (eta__1^2-1.)^2*(zeta__1^2-1.)^2*(-5.6584306313*10^(-8)*eta__1^4*zeta__1^4-1.0454641424*10^(-8)*eta__1*zeta__1^4+5.6161016651*10^(-9)*eta__1^3*zeta__1^4+1.0615594865*10^(-8)*eta__1^5*zeta__1^4+5.4851856568*10^(-9)*eta__1^3*zeta__1^2-1.4132765167*10^(-8)*eta__1^5*zeta__1^2-7.8157365683*10^(-7)*zeta__1*eta__1^4+2.9373057668*10^(-8)*eta__1^5*zeta__1^5-7.032574429*10^(-8)*eta__1^3*zeta__1^5-5.2577413654*10^(-8)*eta__1^5*zeta__1^3+2.3272955826*10^(-8)*eta__1^5*zeta__1+1.5782217112*10^(-7)*eta__1^3*zeta__1^3+2.1771522925*10^(-8)*eta__1*zeta__1^5-8.3051507888*10^(-8)*eta__1^3*zeta__1-2.2997952126*10^(-8)*eta__1*zeta__1^3+0.22608138853e-5*eta__1^4-0.53519692056e-5*eta__1^2+0.62041471332e-4+0.54946587424e-4*zeta__1^2-0.10412827312e-5*zeta__1^4-0.53422910417e-5*zeta__1^3+0.12053033309e-3*zeta__1-4.5961086182*10^(-8)*eta__1^2*zeta__1^4-1.6404108106*10^(-7)*zeta__1^2*eta__1-1.5606093643*10^(-7)*zeta__1*eta__1^2-4.168658171*10^(-7)*zeta__1*eta__1-0.5430102455e-5*eta__1^2*zeta__1^5+0.87015148204e-5*eta__1^2*zeta__1^3+0.25592467903e-5*eta__1^4*zeta__1^5-0.4071733639e-5*eta__1^4*zeta__1^3-0.44664222239e-5*eta__1^4*zeta__1^2+0.84495460425e-5*eta__1^2*zeta__1^2+7.5007400675*10^(-7)*zeta__1^5-6.6427826628*10^(-9)*eta__1^3+3.5821686059*10^(-9)*eta__1^5-2.4361928132*10^(-7)*eta__1)/(-0.32350168299e-2*eta__1^5-0.40854298828e-3*zeta__1^8-0.57170204466e-1*eta__1^8+.26989142602*zeta__1^7+.34307133883*eta__1^6+.14111119517*eta__1^4-0.48267577378e-1*zeta__1^9-1.082755589*eta__1^2-1.3163499567*zeta__1^2+0.75042415188e-3*eta__1^7-0.40463518464e-2*zeta__1^6+.66506159208*zeta__1^4+.58641863992*zeta__1^3-0.18089939414e-3*eta__1^9-.60151130424*zeta__1^5+0.49423587807e-2*eta__1^3-0.22768667085e-2*eta__1-.20653118433*zeta__1-.15635457174*eta__1^8*zeta__1+.64029273264*eta__1^8*zeta__1^3-1.8403657443*eta__1^6*zeta__1^7-0.48478855017e-1*eta__1^8*zeta__1^4-0.22007436935e-2*eta__1^2*zeta__1^8+0.56271163518e-2*eta__1^4*zeta__1^8-.22701198791*eta__1^6*zeta__1^6-0.18753531811e-2*eta__1*zeta__1^9+0.63616448215e-2*eta__1^3*zeta__1^9-0.70972300998e-2*eta__1^5*zeta__1^9+0.26109384594e-2*eta__1^7*zeta__1^9+0.37597513815e-2*eta__1^9*zeta__1^7-.81152175007*eta__1^8*zeta__1^5+.32758358916*eta__1^8*zeta__1^7+.60516338422*eta__1^6*zeta__1-2.7777061884*eta__1^6*zeta__1^3+3.8764153863*eta__1^6*zeta__1^5+0.14976271107e-3*eta__1*zeta__1^8+0.64408301026e-3*eta__1^3*zeta__1^8-0.17374541537e-2*eta__1^5*zeta__1^8+0.9436084324e-3*eta__1^7*zeta__1^8-0.95617026598e-3*eta__1*zeta__1^6-0.79980551762e-3*eta__1^3*zeta__1^6-0.43427014208e-2*eta__1^7*zeta__1^6+0.52833995188e-2*eta__1^5*zeta__1^6-0.39563328597e-2*eta__1^7*zeta__1^2-0.30978282387e-2*zeta__1*eta__1+3.4563944947*eta__1^2*zeta__1^5-2.669958003*eta__1^2*zeta__1^3-5.9197768267*eta__1^4*zeta__1^5+4.2209528188*eta__1^4*zeta__1^3+.1920464905*eta__1^4*zeta__1^2+1.9334990569*eta__1^2*zeta__1^2+0.66050016962e-2*eta__1^7*zeta__1^4+.80614880365*eta__1^6*zeta__1^4-.9191903249*eta__1^6*zeta__1^2-1.724981418*zeta__1^7*eta__1^2+2.9678721471*zeta__1^7*eta__1^4-.94779423754*zeta__1*eta__1^4+.46301464814*zeta__1^6*eta__1^4-.22761063366*zeta__1^6*eta__1^2-0.85894534062e-2*eta__1^5*zeta__1^4+0.8278524871e-2*eta__1^5*zeta__1^2+0.46097207851e-2*eta__1^3*zeta__1^4-0.93963570584e-2*eta__1^3*zeta__1^2-0.81381430978e-3*eta__1*zeta__1^4-.62093209055*eta__1^2*zeta__1^4-.80179945016*eta__1^4*zeta__1^4+.70551660939*zeta__1*eta__1^2+0.38970885732e-2*zeta__1^2*eta__1+0.10746052526e-1*eta__1*zeta__1^7-0.40389225121e-1*eta__1^3*zeta__1^7+0.52300044044e-1*eta__1^5*zeta__1^7+.10999473421*eta__1^8*zeta__1^2-0.45528793761e-1*eta__1^7*zeta__1^3+0.57167454208e-1*eta__1^7*zeta__1^5+0.11770764739e-2*eta__1^9*zeta__1^2-0.18114547653e-2*eta__1^9*zeta__1^4+0.81527768559e-3*eta__1^9*zeta__1^6+0.13191002642e-1*eta__1*zeta__1^3+0.14324735033e-1*eta__1^3*zeta__1-0.18963873748e-1*eta__1*zeta__1^5-0.56315405543e-1*eta__1^3*zeta__1^3-0.21374958034e-1*eta__1^5*zeta__1+0.7601825081e-1*eta__1^3*zeta__1^5+.65574325943+0.80855499912e-1*eta__1^5*zeta__1^3-.10468335582*eta__1^5*zeta__1^5-0.26416622831e-1*eta__1^7*zeta__1^7-0.20189726843e-2*eta__1^9*zeta__1+0.77976967502e-2*eta__1^9*zeta__1^3-0.95384754473e-2*eta__1^9*zeta__1^5+.13649316215*eta__1^6*zeta__1^9+.23302831691*eta__1^2*zeta__1^9-.32125390168*eta__1^4*zeta__1^9+0.12167023924e-1*eta__1^7*zeta__1-0.301782967e-2*eta__1^6*zeta__1^8-0.43456747248e-2*eta__1^8*zeta__1^6):

plot3d(sqrt(fff), zeta__1 = -1 .. 1, eta__1 = -1 .. 1, color = green)

 

``

Quadrature(Quadrature(sqrt(fff), zeta__1 = -1 .. 1, method = romberg[3]), eta__1 = -1 .. 1, method = romberg[3])

0.2745463666e-1+0.*I

(1)

Student:-NumericalAnalysis:-Quadrature(Student:-NumericalAnalysis:-Quadrature(sqrt(fff), zeta__1 = -1 .. 1, method = romberg[4]), eta__1 = -1 .. 1, method = romberg[4])

0.3314502549e-1+0.*I

(2)

Student:-NumericalAnalysis:-Quadrature(Student:-NumericalAnalysis:-Quadrature(sqrt(fff), zeta__1 = -1 .. 1, method = romberg[5]), eta__1 = -1 .. 1, method = romberg[5])

0.3621732017e-1+0.*I

(3)

Student:-NumericalAnalysis:-Quadrature(Student:-NumericalAnalysis:-Quadrature(sqrt(fff), zeta__1 = -1 .. 1, method = romberg[6]), eta__1 = -1 .. 1, method = romberg[6])

Float(undefined)+Float(undefined)*I

(4)

``

Download question.mw

I want to calculate the double integral of the following expression which includes sum of several Legendre polynomial terms, but the speed is so low. Any suggestion to speed up the calculation?

NULL

Restart:

NULL

II := 9:

JJ := 9:

M := 9:

NULL

`ΔP1` := add(add(add(add(add(add(add(-(LegendreP(i, zeta__1)*LegendreP(j, eta__1)*(diff(diff(tau[r](t), t), t))+LegendreP(m, zeta__1)*LegendreP(j, eta__1)*(diff(tau[r](t), t))+LegendreP(m, zeta__1)*LegendreP(j, eta__1)*tau[r](t))/sqrt(LegendreP(m, zeta__1)*LegendreP(j, eta__1)+LegendreP(i, zeta__1)*LegendreP(l, eta__1)), i = 1 .. II), j = 1 .. JJ), k = 1 .. II), m = 1 .. II), l = 1 .. JJ), n = 1 .. JJ), r = 1 .. M):

A := int(int(`ΔP1`, zeta__1 = -1 .. 1), eta__1 = -1 .. 1):

A

``

Download Soal.mw

The function n->ceil(sqrt(4*n))-floor(sqrt(2*n))-1 counts the number of squares strictly between 2n and 4n.

Maple 2016 gives the same output as what I get when I create a plot here: plot(ceil(sqrt(4*n))-floor(sqrt(2*n))-1,n=10..100)

Note, however, that Maple does not plot at least the point of interest (72.4), which is nevertheless an element of the graph:

[10, 2], [11, 2], [12, 2], [13, 2], [14, 2], [15, 2], [16, 2], [17, 3], [18, 2], [19, 2], [20, 2], [21, 3], [22, 3], [23, 3], [24, 3], [25, 2], [26, 3], [27, 3], [28, 3], [29, 3], [30, 3], [31, 4], [32, 3], [33, 3], [34, 3], [35, 3], [36, 3], [37, 4], [38, 4], [39, 4], [40, 4], [41, 3], [42, 3], [43, 4], [44, 4], [45, 4], [46, 4], [47, 4], [48, 4], [49, 4], [50, 4], [51, 4], [52, 4], [53, 4], [54, 4], [55, 4], [56, 4], [57, 5], [58, 5], [59, 5], [60, 5], [61, 4], [62, 4], [63, 4], [64, 4], [65, 5], [66, 5], [67, 5], [68, 5], [69, 5], [70, 5], [71, 5], [72, 4], [73, 5], [74, 5], [75, 5], [76, 5], [77, 5], [78, 5], [79, 5], [80, 5], [81, 5], [82, 6], [83, 6], [84, 6], [85, 5], [86, 5], [87, 5], [88, 5], [89, 5], [90, 5], [91, 6], [92, 6], [93, 6], [94, 6], [95, 6], [96, 6], [97, 6], [98, 5], [99, 5], [100, 5]

What's going wrong here?
Regards
Prof.G

Dear all,

Please I want to solve the following boundary value problem numerically with the attached code

y''=((y')^2+y^2)/(2*exp(x)),      0<x<1

with boundary conditions as follows

y(0)-y'(0)=0, y(1)+y'(1)=2*exp(1)

The exact solution is y(x)=exp(x).

How do I modify the code to be able to handle it?

Please the delta in the code represents y'.

Thank you for your time and best regards

restart;

 

e1:=y[n+2] = (1/12)*h^2*f(n)+(5/6)*h^2*f(n+1)+(1/12)*h^2*f(n+2)+2*y[n+1]-y[n]:

 

NULL

NULL

     h          Num.y          Num.z            Ex.y           Ex.z        Error y        Error z
0.25000      0.702642933  -11.119327426    0.044732488   -9.516563326       0.65791         1.6028
0.50000     -1.480941776    3.706008390   -0.195836551   -1.080050970        1.2851         4.7861
0.75000      2.177304037    3.857405154    1.966274055   -2.618345553       0.21103         6.4758
1.00000     -0.353401232  -12.899134092   -0.541621655  -16.265122833       0.18822          3.366
1.25000      2.205257809   -0.748313267    1.880461001    0.803458961        0.3248         1.5518
1.50000     -0.457853582   -9.260175135    0.888094914  -17.501091793        1.3459         8.2409
1.75000      2.368665639   -0.220734441    0.227799905   -7.823705892        2.1409          7.603
2.00000     -0.556459764  -11.300336415    2.230324739   -5.428300487        2.7868          5.872
2.25000      2.205494666   -0.953807966   -0.582405956  -17.141951993        2.7879         16.188
2.50000     -0.947043873  -11.871777444    1.457323206    3.126163062        2.4044         14.998
2.75000      1.867780693   -1.104185167    0.366014055  -11.889781987        1.5018         10.786
3.00000     -1.448466064  -12.600325627   -0.692660166   -0.858678078       0.75581         11.742
3.25000      1.408438927   -1.076955833    1.243407129    4.765140072       0.16503         5.8421
3.50000     -1.960671678  -12.838644035   -1.682658102   -6.465546461       0.27801         6.3731
3.75000      0.947838606   -0.761420206    0.210882522   14.697480238       0.73696         15.459
4.00000     -2.352223093  -12.652936159   -0.678627396    0.245000716        1.6736         12.898
4.25000      0.596650899   -0.266003839   -1.802692162    9.387643085        2.3993         9.6536
4.50000     -2.528856863  -12.055589881    0.398695396   14.817725265        2.9276         26.873
4.75000      0.441416507    0.296276900   -2.296698552    0.729525901        2.7381        0.43325
5.00000     -2.446901406  -11.201642111   -0.256333100   19.522565217        2.1906         30.724

 

Download K2_Prob_4_direct_2nd_derivative.mw

Dear Colleagues,

I am trying to solve the following system of ode

odeSystem := {diff(y1(x), x) = -x*y2(x)-(1+x)*y3(x), diff(y2(x), x) = -x*y1(x)-(1+x)*y4(x), diff(y3(x), x) = -x*y1(x)-(1+x)*y4(x)-5*x*cos((1/2)*x^2), diff(y4(x), x) = -x*y2(x)-(1+x)*y3(x)+5*x*sin((1/2)*x^2), y1(0) = 5, y2(0) = 1, y3(0) = -1, y4(0) = 0};
systemSol := dsolve(odeSystem);

However, the result displayed is not explicit and contains integral sign. Please, I need help to obtain explicit result.

Thank you.

I have two surfaces f=f(x,y) and g=g(x,y), is there any way to find the equation of intersection curve of them in maple?

contact.mw

i use dslove command to solve system of differential equations but got an error, i checked the error but i don't know where i went wrong, please help me!

error: Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

HOI.mw

Good day everyone,

I am running a maple code for a pde and is given the error code "Error, (in pdsolve/numeric/process_IBCs) initial/boundary condition must be given in terms of the dependent variables of the problem only ([W]), got ((D@@2)[1](W))(0, tau) = 0". The link is attached below.

pde.mw

Thanks in advance.

Dear esteem Colleagues,

Please how do I modify the following two files (though similar) to get consistent errors? I am not sure where I made the mistake.

Any modifications would be appreciated.

Thank you all for your time and mentorship. Best regard

Biratu_Mapleprimes.mw

DDE_2_Mapleprime.mw

restart:

``

K__vxa[1] := 2.0154553049*10^17

0.2015455305e18

(1)

`#mrow(mi("\`K__vxa\`"),mfenced(mn("1"),open = "&lsqb;",close = "&rsqb;"))`+K__vxa[1]

`#mrow(msub(mi("\`K"),mi("vxa\`")),mfenced(mn("1"),open = "&lsqb;",close = "&rsqb;"))`+0.2015455305e18

(2)

``

Download Prj.mw

I need to calculate the eigenvalues and eigenvectors of a big marix with enough Digits. When i apply the command Eigenvectors(K,M) for this purpose, it takes approximately 40 min to be calculated by maple. Where only 1/4 of cores of my CPU is used in this computation.

How is it possible to use all of my CPU cores to calculate the eigenvalues and eigenvectors of a big matrix faster?

change the txt to m for the following files.

K.txt

M.txt

integration_doubt.mw
Hello all,

I am trying to solve for the first-order derivative of a function f2 w.r.t variable a when it is equated to 0. the function f2 is a summation of two integrals as shown in the file. Kindly help me if there is any way to obtain solutions without numerical settings. Can functionalities like the Leibnitz rule be done in MAPLE? Thanks for your advice/help. 

I have number 0.12

I use convert(0.12,string), result ".12" lost 0. Why?

Please help me @acer

I have a function with 3 variables fr2, fr3, and fr4. I want to find how this function varies with these variables in such a way that fr2+fr3+fr4 = 0.5.  All three variables are non-negatives. Please help me in generating a sensitivity report as fr2, fr3, and fr4 each varies across 0 to 0.5 in increments of 0.01 subject to their sum is equal to 0.5

Thank you.

The function is fn1 = 1.150000000*10^11*fr3 + 1.150000000*10^11*fr4 - 1.374950000*10^10 - 1.549500000*10^10*fr2

sensitivity_help.mw

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