Maple Questions and Posts

These are Posts and Questions associated with the product, Maple
I want to solve an ODE system numerically, but maple show not converge for iteration, can you give a solution

pi := 4; eta := 6; mh := .1; mv := .3; bh := .15; Nh := 400; Nv := 200; bv := .25; b := .8; d := .1; p := .5; B := 10; A := 1; alpha := .25; beta := .7; K := 400; r := .5; c := .9; q := .8; Sh0 := 225; Sv0 := 100; Ih0 := 175; Iv0 := 600; P0 := 50; T := 35; B := 10;

eq1 := diff(L1(t), t) = -L1(t)*(-bh*b*Iv(t)/Nh-mh)-L2(t)*bh*b*Iv(t)/Nh; eq2 := diff(L2(t), t) = -L2(t)*(-mh-d)+L3(t)*bv*b*Sv(t)/Nv-L4(t)*bv*b*Sv(t)/Nv; eq3 := diff(L3(t), t) = -(L4(t)*Iv(t)+L3(t)*Sv(t))*L3(t)/(2*B^2)-L3(t)*(-bv*b*Ih(t)/Nv-mv-L3(t)*Sv(t)/(2*B^2)-(L4(t)*Iv(t)+L3(t)*Sv(t))/(2*B^2)-P(t)*alpha)-L4(t)*(bv*b*Ih(t)/Nv-L3(t)*Iv(t)/(2*B^2))-L5(t)*P(t)*alpha; eq4 := diff(L4(t), t) = -A-(L4(t)*Iv(t)+L3(t)*Sv(t))*L4(t)/(2*B^2)+L1(t)*bh*b*Sh(t)/Nh-L2(t)*bh*b*Sh(t)/Nh+L3(t)*L4(t)*Sv(t)/(2*B^2)-L4(t)*(-mv-L4(t)*Iv(t)/(2*B^2)-(L4(t)*Iv(t)+L3(t)*Sv(t))/(2*B^2)-P(t)*alpha)-L5(t)*P(t)*alpha; eq5 := diff(L5(t), t) = L3(t)*Sv(t)*alpha+L4(t)*Iv(t)*alpha-L5(t)*(r*(1-P(t)/Nv)-P(t)*r/Nv+alpha*(Sv(t)+Iv(t))-q*c); eq6 := diff(Sh(t), t) = pi-bh*b*Sh(t)*Iv(t)/Nh-mh*Sh(t); eq7 := diff(Ih(t), t) = bh*b*Sh(t)*Iv(t)/Nh-mh*Ih(t)-d*Ih(t); eq8 := diff(Sv(t), t) = eta-bv*b*Sv(t)*Ih(t)/Nv-mv*Sv(t)-P(t)*Sv(t)*alpha-L3(t)*Sv(t)^2/(2*B^2)-L4(t)*Sv(t)*Iv(t)/(2*B^2); eq9 := diff(Iv(t), t) = -L3(t)*Sv(t)*Iv(t)/(2*B^2)+bv*b*Sv(t)*Ih(t)/Nv-mv*Iv(t)-P(t)*Iv(t)*alpha-L4(t)*Iv(t)^2/(2*B^2); eq10 := diff(P(t), t) = P(t)*r*(1-P(t)/Nh)+P(t)*alpha*(Sv(t)+Iv(t))-q*P(t)*c

fcns := {Ih(t), Iv(t), L1(t), L2(t), L3(t), L4(t), L5(t), P(t), Sh(t), Sv(t)}; a := dsolve({eq1, eq10, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, Ih(0) = Ih0, Iv(0) = Iv0, L1(T) = 0, L2(T) = 0, L3(T) = 0, L4(T) = 0, L5(T) = 0, P(0) = P0, Sh(0) = Sh0, Sv(0) = Sv0}, fcns, type = numeric);
fcns := {Ih(t), Iv(t), L1(t), L2(t), L3(t), L4(t), L5(t), P(t), 

  Sh(t), Sv(t)}
Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging


Does maple provide any platform for running calculation something like cloud facility

Dear Maple users

Some students have come to us to report, that something doesn't seem to work properly in Maple 2019.1 in Document Mode. And they seem to be right: writing an passive math formula by using Shift+F5 (the formula is gray, not blue), then using F5 to get out of that Math field and back into Text Mode. Using the Enter key to go to the next line: It doesn't work! The cursor stays in the same line. This behavior is new in Maple 2019. It worked properly in Maple 2018 and earlier. I assume it is not the intention? 

I know it can easily be dealt with by making a new Paragraph by using the shortcut Ctrl+Shift+J. I call the assumed bug 'severe' though, because it will severely delay the workflow for many students. They are used to deliver a document mixed with formulas (active or passive) and text. 

NB! I have tested it on several computers (Mac and Windows), and it doesn't work on any of them.


Erik V.

i have a question about sets. how can i keep set members in order of addition not the defualt maple ordering.
in maple help, i saw the command setsort=0..8 but i do not know how to use it.
consider exmaple below:




for j in [3,5,6,1] do
L:=`union`(L ,{j});







{3, 5}




{3, 5, 6}




{1, 3, 5, 6}



how can i keep L as order of addition? L={3,5,6,1}. thanks in advance


I've recently changed to maple 2019, from the 2016 version as my license for that product had expired. 
However I find it really frustrating that often upon evaluating an expression I can't convert the units. 

For instance I had a calculation that evaluated to: 

2.114163508*10^7 [kg/s^2]

When I try to directly replace the units within maple to instead be [J/m^2] I recieve the following error message: 

"Error, (in  Units:-TestDimensions) 'op(3, i) does not  evaluate to module" 

There is no explanation for this error when I try to look it up. However if I once again manually write the answer: 
2.114163508*10^7 [kg/s^2] and use the replace units function. 
No problem. 
I find this quite annoying and frustrating and I hope you can help.

Best regards 

Anders Alexander Wagenblast 

This is may be a philosophical question. But sometimes Maple suprises me when telling it to "simplify" expression. As in this example.




y*hypergeom([1/3, 2/3], [4/3], -y^3)


(2/9)*y*Pi*3^(1/2)*LegendreP(-1/3, -1/3, (-y^3+1)/(y^3+1))/((-y^3)^(1/6)*(y^3+1)^(1/3)*GAMMA(2/3))


For me, the original result is "simpler". (Not only smaller leaf count, but it has one special function, vs. two: Legendre and Gamma). But may be Maple considers hypergeom always more "complex" than any other?

That is why I use simplify(expr,size) because I am scared of simplify without any option, as I have little idea how it decides which is simpler.

Any thoughts from the experts on how Maple decided to simplify something when no option is used? What kinds of rules it uses to decide how to transform the expression?

Maple 2019.1



The video component is going to save me alot of hassle in that I was previously building external java applications for audio visual analysis purposes, with the downside of course being that I didnt have maple code at my disposal. 

I read in the manual for the video component that I can provide a HTTP address for which a video is located, which would mean i could probably stream an IP camera, but I can I use the localhost IP address with some sort of extension that directs to the I/O of a webcamera connected to my local machine?

Hi all, how to write description, suggestions for method (procedure) like image below. I tried searching for a solution but can't. Thank you very much

Is there extendable combinatorics experiment architect system design

such as new method can combine or use with old method and find relationship between them , these kind of big data system design in combinatorics experiment design?

How can I fix the error of ChangeOfVariables: Error, (in Student:-MultivariateCalculus:-ChangeOfVariables) unable to solve the change-of-variables equations for the original variables ?



I have trouble with solving this ODE system using dsolve command:



This system have following solutions:



C's and A are constants of integration.


They're equations from this paper (45 and 47). 

However, my solution differs from correct one - in output there are hypergeometric functions everywhere.

Is there any way to fix/convert this solution? Or to get rid of these functions (my f1 solution looks very close to original one but with coupled hypergeometric function). 

`` ``





sysode := 2*q*(3*q-1)*f1(tau)/tau^2+2*q*(diff(f1(tau), tau))/tau+diff(f1(tau), tau, tau)+(kappa^2+f2(tau))*(1+omega)*(tau/t0)^(-(3*(3+omega))*q) = 0, (54*q^3-30*q^2+4*q)*f1(tau)/tau^3+(24*q^2-4*q)*(diff(f1(tau), tau))/tau^2+11*q*(diff(f1(tau), tau, tau))/tau+diff(f1(tau), tau, tau, tau)-3*omega*(1+omega)*(kappa^2+f2(tau))*q*(tau/t0)^(-(3*(1+omega))*q)/tau = 0;

2*q*(3*q-1)*f1(tau)/tau^2+2*q*(diff(f1(tau), tau))/tau+diff(diff(f1(tau), tau), tau)+(kappa^2+f2(tau))*(1+omega)*(tau/t0)^(-3*(3+omega)*q) = 0, (54*q^3-30*q^2+4*q)*f1(tau)/tau^3+(24*q^2-4*q)*(diff(f1(tau), tau))/tau^2+11*q*(diff(diff(f1(tau), tau), tau))/tau+diff(diff(diff(f1(tau), tau), tau), tau)-3*omega*(1+omega)*(kappa^2+f2(tau))*q*(tau/t0)^(-3*(1+omega)*q)/tau = 0




simplify(dsolve([sysode], build));

{f1(tau) = _C1*tau^(-q+1/2-(1/2)*(-20*q^2+4*q+1)^(1/2))+_C2*tau^(-q+1/2+(1/2)*(-20*q^2+4*q+1)^(1/2))+_C3*tau^(-9*q+2)*hypergeom([-(1/12)*(16*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(-16*q+(-20*q^2+4*q+1)^(1/2)+3)/q], [-(1/12)*(4*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(-4*q+(-20*q^2+4*q+1)^(1/2)+3)/q], -(1/2)*(tau/t0)^(6*q)*omega), f2(tau) = (-695520*(q^2+(11/21)*q+2/21)*(tau/t0)^(3*q*(omega+5))*_C3*(q-3/10)*omega*q*(q^2-(25/69)*q+2/69)*tau^(-9*q)*hypergeom([-(1/12)*(4*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(-4*q+(-20*q^2+4*q+1)^(1/2)+3)/q], [-(1/12)*(-8*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(8*q+(-20*q^2+4*q+1)^(1/2)+3)/q], -(1/2)*(tau/t0)^(6*q)*omega)-89424*(q^2*(tau/t0)^(3*q*(omega+7))*omega^2*tau^(-9*q)*_C3*(q^2-(25/69)*q+2/69)*hypergeom([-(1/12)*(-8*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(8*q+(-20*q^2+4*q+1)^(1/2)+3)/q], [-(1/12)*(-20*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(20*q+(-20*q^2+4*q+1)^(1/2)+3)/q], -(1/2)*(tau/t0)^(6*q)*omega)+(7/3)*(q^2+(11/21)*q+2/21)*(hypergeom([-(1/12)*(16*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(-16*q+(-20*q^2+4*q+1)^(1/2)+3)/q], [-(1/12)*(4*q+(-20*q^2+4*q+1)^(1/2)-3)/q, (1/12)*(-4*q+(-20*q^2+4*q+1)^(1/2)+3)/q], -(1/2)*(tau/t0)^(6*q)*omega)*_C3*(tau/t0)^(3*(3+omega)*q)*(q^2-(25/69)*q+2/69)*tau^(-9*q)+(1/69)*kappa^2*(1+omega)))*(q^2-(7/9)*q+2/9))/((1+omega)*(4*q-(-20*q^2+4*q+1)^(1/2)-3)*(8*q-(-20*q^2+4*q+1)^(1/2)+3)*(8*q+(-20*q^2+4*q+1)^(1/2)+3)*(4*q+(-20*q^2+4*q+1)^(1/2)-3))}













I know you can call python from Maple, I am thinking if there is the other way around. That is use Maple (and its toolbox) as backend engine to do calculations (e.g. Global Optimization), and say manipulate the data in Python as the front-end.


My question is mathematical in nature, so it might be a little out of place but I though I would give it a shot. 

You have a series of chebyshev coefficients in two connecting subdomains lets say S1 = [0,0.5] and S2=[0.5,1]. So far you are still in the spectral space. If you want to compute the solution in real space you can sum the coefficients with the Chebyshev polynomials. 

Now imagine you change the interval to S1 = [0,0.6] and S2 = [0.6,1]. Is there a way to manipulate the Chebyshev coefficients from both initial subdomains to create a new set of Chebyshev coefficients that fit the solution in the new subdomains. 

The brute force method would be to create the real solution of Chebyshev polynomials and then use that to form a new set of Chebyshev coefficients. Or you can use Clenshaw to compute the solution at several points, and then use the points to create new Chebyshev coefficients.

But what if we can stay in spectral space and create the new chebyshev coefficients. Is that possible? If so, how?


When creating a user random variable, I would like to instanciate some of its attributes, for instance ParentName.
But it seems that it's not always possible.

​​​​​​​Is it a Maple's limitation or am I not doing the things correctly ?



U := RandomVariable(Uniform(0, 1)):


A := attributes(U)[3]



AllAttributes := with(A);

[CDF, Conditions, HodgesLehmann, InverseSurvivalFunction, MGF, MaximumLikelihoodEstimate, Mean, Median, Mode, PDF, Parameters, ParentName, Quantile, RandomSample, RandomSampleSetup, RandomVariate, RousseeuwCrouxSn, Support, Variance]





# Define a user random variable

v := Distribution(PDF = (z -> piecewise(0 <= t and t < 1, 1, 0))):
V := RandomVariable(v):
A := attributes(V)[3];
AllAttributes := with(A);



[Conditions, PDF]




# its definition can be augmented by adding some recognized attributes...
# even if the result returned by Mean is strange

v := Distribution(PDF = (z -> piecewise(0 <= t and t < 1, 1, 0)), 'Mean'=1/Pi, 'Median'=exp(-1)):
V := RandomVariable(v):
A := attributes(V)[3];
AllAttributes := with(A);
[Median, Mean](V)



[Conditions, Mean, Median, PDF]


[exp(-1), 1/Pi(_R1)]


# but not all the recognized attributes seem to be able to be instanciated:

v := Distribution(PDF = (z -> piecewise(a <= t and t < b, 1/(b-a), 0)), 'Parameters'=[a, b]);
v := Distribution(PDF = (z -> piecewise(a <= t and t < b, 1/(b-a), 0)), 'ParentNames'=MyDistribution);

Error, (in Statistics:-Distribution) invalid input: too many and/or wrong type of arguments passed to NewDistribution; first unused argument is Parameters = [a, b]


Error, (in Statistics:-Distribution) invalid input: too many and/or wrong type of arguments passed to NewDistribution; first unused argument is ParentNames = MyDistribution






I'm new to Maple.

My problem is that if I input the command sqrt(3.0), for example, I get this strange result:

1.81847767202745*10^(-58) + (7.53238114626421*10^(-59))*I

The results is the same, no matter the argument of sqrt.

Also, when using ln, I get this:

-265.745524189222 + 0.785398163397448*I

Again, no matter the argument of ln, the result is the same.

What is happening?

First 9 10 11 12 13 14 15 Last Page 11 of 1637