MaplePrimes Questions


I was wondering whether anyone could help me. I am trying to plot a large number of functions on the same graph and am struggling with a way of inputting this without having to manually enter each.


Basically, I have a for do loop that runs from i being 0 to n. Within the loop, it takes a[i] = some function of my variables so in essence I have n functions that I would like to plot on the same graph. Currently I'm working with a low number for n to make sure that the code is running how I want it to, however I'm looking to increase my n number significantly which will obviously mean I have a significant number of functions.

I am using:

plot3d({a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], a[16], a[17], a[18], a[19], a[20]}, z = 0 .. m, x = -M .. M, lightmodel = none, orientation = [180, 0, 180], style = surfacecontour, shading = zhue)

to plot my functions however I don't want to have write out each of the a[ ] when increasing this n value. So I was wondering whether anyone has any ideas how to write this in a shorter form?

I hope that makes sense and any help would be greatly appreciated.

So I have two differently parametrised plots:

p1 := plot([2^(1/3)*Pi*AiryAi(x)/(Q*(P*AiryAi(x) + Q*AiryBi(x))), -2*(-0.0008397983056*2^(1/6)*AiryAi(1, x) + 0.004845212367*2^(1/6)*AiryBi(1, x))/((-0.0008397983056*2^(1/6)*AiryAi(x) + 0.004845212367*2^(1/6)*AiryBi(x))^3*(648.3911162*2^(1/6)*AiryAi(1, x)/(-0.0008397983056*2^(1/6)*AiryAi(x) + 0.004845212367*2^(1/6)*AiryBi(x)) - 648.3911162*2^(1/6)*AiryAi(x)*(-0.0008397983056*2^(1/6)*AiryAi(1, x) + 0.004845212367*2^(1/6)*AiryBi(1, x))/(-0.0008397983056*2^(1/6)*AiryAi(x) + 0.004845212367*2^(1/6)*AiryBi(x))^2)), x = -1 .. 5])


p2 := plot([(sin(x) - sin(ap))/K, abs(sin(x)/cos(x)), x = 0 .. 2])


I would like to show the sum of these two plots. How would I go about doing this?


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

When was the Mathematical formula question introduced in Maple TA?

From a book, it shows the following

Verified by hand the last result  above x^(2/3)+y^(2/3)-a^(2/3)=0 is correct. The input is always 2 equations in x and y as shown above, and there is always one constant C in both that needs to be eliminated to obtain a solution (one equation) that contains y,x and any other parameters, but without c.

have been trying to use eliminate command to do the same as above. I assume eliminate is the right command for this. But not able to get close to what the book shows above for final result. 

Does any one knows how obtain same result as above using Maple's eliminate?  (I can't follow the same steps as hand solution, since that would apply only to the above example. I need to use a generic approach). 

Sometimes it is hard to obtain same result using computer as one can do by "hand".

Here is some of my attempts



x = -a/(c^2+1)^(3/2)

y = a*c^3/(c^2+1)^(3/2)


[{c = RootOf(_Z^2-RootOf(_Z^3*x+a)^2+1)}, {y*(RootOf(_Z^3*x+a)^2)^(3/2)-RootOf(_Z^2-RootOf(_Z^3*x+a)^2+1)*RootOf(_Z^3*x+a)^2*a+a*RootOf(_Z^2-RootOf(_Z^3*x+a)^2+1)}]

x*((a^2-y^2)*(a*y^2)^(1/3)*a*((a*y^2)^(2/3)+a*(a*y^2)^(1/3)+y^2))^(3/2)/(a*y^2*(a^2-y^2)^3)+a = 0

a*((y^(2/3)*a^(2/3)+a^(4/3)+y^(4/3))^(3/2)*x+(a^2-y^2)^(3/2))/(a^2-y^2)^(3/2) = 0

x*a*(y^(2/3)*a^(2/3)+a^(4/3)+y^(4/3))^(3/2)/(a^2-y^2)^(3/2)+a = 0



Notice: The reason I am asking the above, is becuase I was doing it this way: I first solve for from one equation, then use this result in the second equation (this is what one would do normally by hand). but this could result in many solutions and hard to know which to pick to match the book result. That is why I am thinking of using Elminate instead:


assume(x::real, y::real,a::real);

x = -a/(c^2+1)^(3/2)

y = a*c^3/(c^2+1)^(3/2)

#brute force method

Vector(6, {(1) = sqrt((-a*x^2)^(2/3)-x^2)/x, (2) = -sqrt((-a*x^2)^(2/3)-x^2)/x, (3) = (1/2)*sqrt(2)*sqrt(I*sqrt(3)*(-a*x^2)^(2/3)-(-a*x^2)^(2/3)-2*x^2)/x, (4) = -(1/2)*sqrt(2)*sqrt(I*sqrt(3)*(-a*x^2)^(2/3)-(-a*x^2)^(2/3)-2*x^2)/x, (5) = (1/2)*sqrt(-(2*I)*sqrt(3)*(-a*x^2)^(2/3)-2*(-a*x^2)^(2/3)-4*x^2)/x, (6) = -(1/2)*sqrt(-(2*I)*sqrt(3)*(-a*x^2)^(2/3)-2*(-a*x^2)^(2/3)-4*x^2)/x})


Vector(6, {(1) = y = -(1/4)*sqrt(2)*(I*a^(2/3)*sqrt(3)-a^(2/3)-2*x^(2/3))^(3/2), (2) = y = (1/4)*sqrt(2)*(I*a^(2/3)*sqrt(3)-a^(2/3)-2*x^(2/3))^(3/2), (3) = y = -((1/4)*I)*sqrt(2)*(I*a^(2/3)*sqrt(3)+a^(2/3)+2*x^(2/3))^(3/2), (4) = y = ((1/4)*I)*sqrt(2)*(I*a^(2/3)*sqrt(3)+a^(2/3)+2*x^(2/3))^(3/2), (5) = y = -(a^(2/3)-x^(2/3))^(3/2), (6) = y = (a^(2/3)-x^(2/3))^(3/2)})



Looking at result above, I think I can safely eliminate all y solutions with complex number I in them. This leaves the last two listed above (real y). Which is a little better than before.






display(line([.8, 0], [1, .2], color = red), line([.6, 0], [1, .4], color = red), line([.4, 0], [1, .6], color = red), line([.2, 0], [1, .8], color = red), line([0, 0], [1, 1], color = red), line([0, .2], [.8, 1], color = red), line([0, .4], [.6, 1], color = red), line([0, .6], [.4, 1], color = red), line([0, .8], [.2, 1], color = red), rectangle([0, 1], [1, 0], color = red, transparency = .5, thickness = 1), axes = none)

how can type print display by for ?

Please help me






I'm trying to solve the following linear system

eq1 := -t*x + y*z = j;
eq2 := t*x + y*z = -m;
eq3 := t*z - x*y = -b;
eq4 := t*z + x*y = a;

I have made many unsuccessful attempts.

Would anyone have the solution to the problem?



The following maple command returns an error in Maple 14 (internal error in Typesetting ... "invalid subscript selector") but not in Maple 2017.   

f:=(l::list)-> eval([y,y*z-x,-15*x*y-x*z-x],[x,y,z]=~l):

What did I miss?


Many thanks









Hello. I want to solve a differential equation on a thickening grid. That is, to be solved first at N=10, then N=20, then N=40 and so on.
Tried the design
for N from 10 to 160 by 2*N do
but for Maple it is difficult. Do you have any ideas how to implement this type of cycle?

I do not understand why Maple sometimes shows singular solution to Clairaut ODE and sometimes not.

Clairaut ODE has the form y(x) = x y'(x) + G(x, y')

In the following ODE when I ask Maple to dsolve it as is, it does give singular solution. Next, when solving explicity for y(x) first, which will generate 2 ODE's, each is Clairaut ODE, then ask Maple to dsolve each, now Maple no longer gives the singular solution. But when I solve each one of these ODE's, I see that there is the singular solution there. It must be there, since this is Clairaut ODE and it has singular solution.

When I do PDEtools:-casesplit on each of the two ODE's generated by solving for y(x) first, I see the singular solution there.

The question is, why Maple dsolve does not show the singular solution in the second case? And how to make it show it? Or did I do something wrong?



ode:=x^2*diff(y(x),x)^2-(1+2*x*y(x))*diff(y(x),x)+1+y(x)^2 = 0;

x^2*(diff(y(x), x))^2-(1+2*x*y(x))*(diff(y(x), x))+1+y(x)^2 = 0


[[_1st_order, _with_linear_symmetries], _rational, _Clairaut]

Vector([dsolve(ode,y(x))]); #now it shows singular solution (first one below)

Vector(3, {(1) = y(x) = (1/4)*(4*x^2-1)/x, (2) = y(x) = _C1*x-sqrt(_C1-1), (3) = y(x) = _C1*x+sqrt(_C1-1)})


`casesplit/ans`([(diff(y(x), x))^2 = (2*y(x)*(diff(y(x), x))*x+diff(y(x), x)-y(x)^2-1)/x^2], [2*(diff(y(x), x))*x^2-2*x*y(x)-1 <> 0]), `casesplit/ans`([y(x) = (1/4)*(4*x^2-1)/x], [])

ode:=convert(ode,D): #solve for y(x) first, this will generate 2 ODE's

Vector(2, {(1) = y(x) = (diff(y(x), x))*x+sqrt(diff(y(x), x)-1), (2) = y(x) = (diff(y(x), x))*x-sqrt(diff(y(x), x)-1)})


[[_1st_order, _with_linear_symmetries], _rational, _Clairaut]

[[_1st_order, _with_linear_symmetries], _rational, _Clairaut]

dsolve(odes[1],y(x)); #where is singular solution?

y(x) = _C1*x+(_C1-1)^(1/2)

dsolve(odes[2],y(x)); #where is singular solution?

y(x) = _C1*x-(_C1-1)^(1/2)


`casesplit/ans`([diff(y(x), x)-1 = (-(diff(y(x), x)-1)^(1/2)+y(x)-x)/x, diff(y(x), x) = (-(diff(y(x), x)-1)^(1/2)+y(x))/x], [1+2*x*(diff(y(x), x)-1)^(1/2) <> 0]), `casesplit/ans`([y(x) = (1/4)*(4*x^2-1)/x], [])


`casesplit/ans`([diff(y(x), x)-1 = ((diff(y(x), x)-1)^(1/2)+y(x)-x)/x, diff(y(x), x) = ((diff(y(x), x)-1)^(1/2)+y(x))/x], [2*x*(diff(y(x), x)-1)^(1/2)-1 <> 0]), `casesplit/ans`([y(x) = (1/4)*(4*x^2-1)/x], [])




I would like to draw an ellipse by orthonal affinity of a circle. Thank you.

Dear Maple users

I wanted to export two long lists X and Y of data into two columns in Excel by using the Export command from the ExcelTools package. Data was however exported into rows! I converted the lists into vectors and I succeeded in doing it the way I wanted:

X1 := convert(X, Vector);
Y1 := convert(Y, Vector);
Export(X1, "data1.xlsx", 1, "A1");
Export(Y1, "data1.xlsx", 1, "B1");

But is it really necessary to convert to vectors in order to accomplish this task? 





This is a problem that intrigues me.

I have been thinking about the distribution of n points, p[1], p[2], ..., p[n] in a scatterplot and I am interested in finding the location of a focal point, A, such that the distance from A to each neighboring point is a minimum. I have worked on a routine and this is given in the attached worksheet. In this example, n=20 and the position of A is determined to be [-3.25, 0.99].

Now - here's my question. Suppose I am interested in n-large and, instead of locating one focal point, A, I wish to obtain several,i.e. A, B, C, etc. such that the distances from each of these to their respective neighboring points is also a minimum.

Does any interested party know if this is possible to do and if so, can anyone suggest an approach or routine? If so, I'd be delighted to understand how to solve for this.

Thank you for reading!



The commands


give the output

Matrix(2, 2, {(1, 1) = 1, (1, 2) = 1, (2, 1) = 4, (2, 2) = 5}, datatype = anything, storage = rectangular, order = Fortran_order, shape = [])


Why won't it display properly?


First 401 402 403 404 405 406 407 Last Page 403 of 2176