Maple 2018 Questions and Posts

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

how this integration can be computed and plotted? tnx in advance



T := 10^(-6);
delta := 10;
m := 1;
alpha:= 75/10;
v := 65;
mu := 8;













z := sqrt((omega^2 - 4*m^2)/alpha^2 - v^2/alpha^2*(4 *delta/alpha*tan(theta)^2 - v^4/alpha^4*tan(theta)^4))



a := sec(theta)/sqrt(2)*sqrt((2 *delta)/alpha - v^2/alpha^2*tan(theta)^2 + z)



f1 := 1/(exp(( omega/2 - mu)/T) + 1);
f2 := 1/(exp((- (omega/2) - mu)/T) + 1);





A1 := evalf(-(f1 - f2)*abs(omega/(4*a*alpha*cos(theta)^2*(-delta+ a^2 *alpha* cos(theta)^2) + 2*a*v^2*sin(theta)^2 + 1/10000)))



b := sec(theta)/sqrt(2)*sqrt((2*delta)/alpha - v^2/alpha^2*tan(theta)^2 - z)



f3 := 1/(exp(( omega/2 - mu)/T) + 1);
f4 := 1/(exp((- (omega/2) - mu)/T) + 1);





A2 := evalf(-(f3 - f2)*abs(omega/(4*b*alpha*cos(theta)^2*(-delta+ b^2 *alpha* cos(theta)^2) + 2*b*v^2*sin(theta)^2 + 1/10000)))




Warning,  computation interrupted





I would like to show : in a quadrilateral circumscribed to an ellipse, the line passing through the middle of the diagonals passes through the centre of the ellipse.
My code is :

restart; with(geometry): with(plots): `local`(O):
_EnvHorizontalName := x: _EnvVerticalName := y:

alias(coor = coordinates):
ell := x^2/a^2+y^2/b^2 = 1:
point(P1,a*cos(omega), b*sin(omega)):
point(P2,a*cos(omega-(1/2)*Pi), b*sin(omega-(1/2)*Pi)): 
point(P3,a*cos(omega+(8/7)*Pi), b*sin(omega+(8/7)*Pi)):
point(P4,a*cos(omega+5*Pi*(1/2)), b*sin(omega+5*Pi*(1/2))):
a := 5: b := 3: omega := (1/5)*Pi:
Ell := implicitplot(ell, x = -a .. a, y = -b .. b, color = red): 
dr := draw([seq(P || k, k = 1 .. 4)], axes = normal, printtext = true):

for i from 1 to 4 do tgP||i := x*coor(P||i)[1]/a^2+y*coor(P||i)[2]/b^2 = 1 od:
poly := Matrix([coor(P1), coor(P2), coor(P3), coor(P4)]):
Quadri := polygonplot(poly, axes = normal, color = "DarkGreen", transparency = .8):

with(combinat): with(ListTools):
L := [1, 2, 3, 4]:
for i from 1 to 4 do Rotate(L, i)[1] od:
for i to 4 do solve({(tgP || Rotate)(L, i)[1], tgP || i}, {x, y}); point(S || i, subs(%, x), subs(%, y)); coor(S || i) end do;
Error, invalid input: subs received 1, which is not valid for its 1st argument
solve({tgP1, tgP2}, {x, y}): point(S1, subs(%, x), subs(%, y)); coor(S1):
solve({tgP2, tgP3}, {x, y}): point(S2, subs(%, x), subs(%, y)); coor(S2):
solve({tgP3, tgP4}, {x, y}): point(S3, subs(%, x), subs(%, y)); coor(S3):
solve({tgP1, tgP4}, {x, y}): point(S4, subs(%, x), subs(%, y)); coor(S4):

poly := Matrix([coor(S1), coor(S2), coor(S3), coor(S4)]):
Quadri2 := polygonplot(poly, axes = normal, color = "DarkGreen", transparency = .9):
#dr2:=draw(seq(S||k,k =1..4), axes = normal, printtext = true):
line(diag13, [S1, S3]): line(diag24, [S2, S4]): midpoint(M1, S1, S3): midpoint(M2, S4, S2): 
line(Lm, [M1, M2]):
dr2 := draw([S1, S2, S3, S4, M1, M2, Lm(color = black), diag13, diag24], axes = normal, printtext = true):
for i from 1 to 4 do
TgP||i := implicitplot(tgP||i, x = -a-5 .. a+5, y = -b-5 .. b+5, color = blue) od:
display([Ell, seq(TgP||i,i=1..4), Quadri, Quadri2,dr,dr2], view = [-a-5 .. a+3, -b-2 .. b+2], 
scaling = constrained, size = [700, 700]); Thank you for your answere.

Hello. Plotting a graph in the polar coordinate system using polar plot (example). Is it possible to make it display 90 degrees instead of Pi/2, 45 degrees instead of Pi/4, and so on. Thanks

hello guys,

I want to plot the phase plane between F and m when:

F := 736*R^4/sqrt((-1380*Pi*R*m(r)^3 + 368*R^4 - 1587*m(r)^2*R^2 + 1280*m(r)^2*a)^2);
R := X^(1/3)/(-l^2 + 4*a) - 3*l^2*m(r)^2/X^(1/3);
X := m(r)*l^2*(sqrt((27*l^2*m(r)^4 - 16*a^2*l^2 + 64*a^3)/(-l^2 + 4*a)) + 4*a)*(-l^2 + 4*a)^2;


m := (l^2*r^2 + r^4 + a*l^2)/(2*l^2*r)

for positive constant a and l

please guide me,


How to find the location of the poles of a normal chord in an ellipse ?
Here is my code :

restart; with(geometry); with(plots); `local`(O);
_EnvHorizontalName := x; _EnvVerticalName := y;
corde := a*x/cos(theta)-b*y/sin(theta) = a^2-b^2;
isolate(corde, a/cos(theta));
Error, (in isolate) a*x/cos(theta)-b*y/sin(theta) = a^2-b^2 does not contain a/cos(theta)
eq1 := (a^2-b^2)*X/a^2 = a/cos(theta);
c := solve(eq1, cos(theta));
eq2 := (a^2-b^2)*Y/b^2 = -b/sin(theta);
s := solve(eq2, sin(theta));
lieu := simplify(expand((a^2-b^2)^2*X^2*Y^2*(c^2+s^2 = 1)));
allvalues(eliminate({eq1, eq2}, theta))[1][2];
ell := x^2/a^2+y^2/b^2 = 1;
P := [a*cos(theta), b*sin(theta)];
tgP := x*P[1]/a^2+y*P[2]/b^2 = 1;

sol := solve({corde, ell}, {x, y});
tgP1 := simplify(x*rhs(sol[2][1])/a^2+y*rhs(sol[2][2])/b^2 = 1);

Drawing in a case
a := 5; b := 3; theta := (1/6)*Pi;

line(l1, corde); conic(co, ell);
Pole(P1, l1, co); coordinates(P1);
a := 5; b := 3; theta := (1/6)*Pi;
Ell := implicitplot(ell, x = -a .. a, y = -b .. b, color = red);
Cor := implicitplot(corde, x = -a-1 .. a, y = -b-1 .. b, color = blue);
TgP := implicitplot(tgP, x = 0 .. 10, y = -5 .. 10, color = magenta);
TgP1 := implicitplot(tgP1, x = -5 .. 10, y = -5 .. 10, color = magenta);
lieu := subs(X = x, Y = y, lieu);
subs(x = 125*sqrt(3)*(1/24), y = -27/8, lieu);
Lieu := implicitplot(lieu, x = -a .. a, y = -b .. b, color = green);
dr := draw(P1);
display([Ell, Cor, Lieu, TgP, TgP1, dr], axes = normal, view = [-10 .. 10, -10 .. 10], scaling = constrained);

Why the drawin of the location (lieu) does not appear ? Thank you.


I have two coupled algebraic equations (not differential equations; but only simple algebraic equations; call them "equ1" and "equ2") in which there are three parameters: "x", "y", and "z".

I want to use "fsolve" (Numerical solve) for solving them and then plotting. But since there are three parameters and two equations hence one of the parameters must be given. I want to give a range for "z", for example [2..9], and step size, for example "0.5", such that maple first puts "2" in both equations and solve them numerically and get the values of "x" and "y" and then record them, and then set the value "2.5" for "z" and again repeat the above cycle until the value "z=9". Finally plot both "x" and "y" in terms of "z".

How do I write this?

Thanks in advance

Hi everyone

I wonder if the following elliptic PDEs system can be caculated by Maple 2018.

The PDEs system is


Maple sketched solutions of the above system, but unfortunately main portions (sine portion) of all the solutions seemed to overlap together.

Is it possible to output all the solutions filling the target region (or at least not overlapping) by revising the code?

I am not the sure if the overlap is caused by the boundary conditions(BC) or caused by the elliptic PDEs system??

Particularly, I do not understand how (D[2](x))(xi, 0) = 0 and (D[2](y))(xi, 0) = 0  work in the BCs. Is there any paper or textbook explaining this setup??

Thanks in advance.

The code is as follows (or the code can be downloaded from attatched mw


alpha04 := (diff(x(xi, eta), eta))^2+(diff(y(xi, eta), eta))^2;

beta04 := (diff(x(xi, eta), xi))*(diff(x(xi, eta), eta))+(diff(y(xi, eta), xi))*(diff(y(xi, eta), eta));

gamma04 := (diff(x(xi, eta), xi))^2+(diff(y(xi, eta), xi))^2;

PDE04 := {alpha04*(diff(x(xi, eta), xi, xi))-2*beta04*(diff(x(xi, eta), xi, eta))+gamma04*(diff(x(xi, eta), eta, eta)) = 0, alpha04*(diff(y(xi, eta), xi, xi))-2*beta04*(diff(y(xi, eta), xi, eta))+gamma04*(diff(y(xi, eta), eta, eta)) = 0};

IBC04 := {x(0, eta) = eta, x(1, eta) = eta, x(xi, 0) = sin((2.0*Pi)*xi), y(0, eta) = eta, y(1, eta) = eta, y(xi, 0) = 100*xi, (D[2](x))(xi, 0) = 0, (D[2](y))(xi, 0) = 0};

pds04 := pdsolve(PDE04, IBC04, numeric, spacestep = 1/50);

xCurve04 := plots[display]([seq(pds04:-plot(x, eta = i), i = 0 .. 10)]);

yCurve04 := plots[display]([seq(pds04:-plot(y, eta = (1/10)*i), i = 0 .. 10)]);


We give a line (D) and a point A located at a distance AH=h from D. A constant angle of magnitude alpha pivots to its apex A and we call B and C the points where its sides cut the line D. Let O be the center of the circle circumscribed to the triangle ABC.
Demonstrate that the B and C tangents to the O circle keep a fixed direction. 
Here is my code which don't work for slopes are not equal.

restart; with(plots): with(geometry):unprotect(D):
_EnvHorizontalName := 'x':_EnvVerticalName := 'y':
line(D, y = (1/2)*x-1); point(A, 5, 5); PerpendicularLine(lp, A, D); h := distance(A, D); intersection(H, D, lp);
alpha := (1/16)*Pi;
rotation(lp1, lp, (1/6)*Pi, 'clockwise', A); rotation(lp2, lp1, (1/6)*Pi-alpha, 'clockwise', A); FindAngle(lp1, lp2); evalf(%);
intersection(B, D, lp1); intersection(C, D, lp2);
triangle(T, [A, B, C]);
circumcircle(Elc, T, 'centername' = OO);
TangentLine(tgB, B, Elc); TangentLine(tgC, C, Elc);
evalf(slope(tgB)); evalf(slope(tgC));
dr := draw([D(color = blue), lp(color = red), Elc(color = green), A, B, C, T(color = black), H, tgB, tgC], printtext = true);

display([dr], axes = none, scaling = constrained);
Fig := proc (k) local dr, Elc, B, C, lp1, lp2; global D, A, lp, H, alpha; geometry:-rotation(lp1, lp, (1/6)*Pi+k, 'clockwise', A); geometry:-rotation(lp2, lp1, (1/6)*Pi-alpha+k, 'clockwise', A); geometry:-intersection(B, D, lp1); geometry:-intersection(C, D, lp2); geometry:-triangle(T, [A, B, C]); geometry:-circumcircle(Elc, T, 'centername' = OO); geometry:-TangentLine(tgB, B, Elc); geometry:-TangentLine(tgC, C, Elc); dr := geometry:-draw([D(color = blue), lp(color = red), Elc(color = green), A, B, C, T(color = black), H, tgB, tgC], printtext = true); plots:-display([dr], axes = none, scaling = constrained) end proc;
iframes := 10;

display([seq(Fig((1/12)*Pi+i/(10*iframes)), i = 1 .. iframes)], insequence, scaling = constrained);
How to improve this code ? Thank you.

I have a complicated expression which involves RootOf. How to get rid of and simpliy the equation?

I am looking for an expression for eta(H) not a numerical value.  



I am working on a project to code a conjecture in Maple and I am stuck.  It is as follows:

"Someone had a conjecture that any odd number greater than one can be written as the sum of a prime number and twice a perfect square.  (ie 3=3+2*02, 15 = 7+2*22)  I would like to know if this holds for all the numbers from 3 to 9,000 and if not, which odd numbers fail this criteria."

I have very little coding experience so I am looking to see if anyone has an idea where I can go with this.  I tried the following:

X=P+2*N where

X:=seq(3+2i, i=0..4499);

P:={seq(ithprime(i), i=1..1250)};

N:=seq(i^2, i=0..100);

Once I get this far, however, I don't know where to go.  I would like the left side of the equation to run from 0 through 4499 (giving me a value of over 9000) while the right side does the same thing.  If there are any situations where the left side and right side do not equal each other, I want it to tell me.

My apologies if this is too wordy or confusing.  Thank you.

I  am trying to find the integer numbers a, b, c, d, m so that the equation


where a+d=b+c  and m≠0 has four integer solutions.

I found this equation randomly
solve((x-5) (x-3) (x+6) (x+8)=504, x);
How to find number a, b, c, d, m so that the equation
has four integer solutions?

I am still a novice of Maple, but I want to carry out recurvive applications of some formula that involves non-commutative operators X and Y ([X,Y] = XY-YX). I used the following code, but I do not know how to tell Maple a rule that [X,X] = [Y,Y] = 0:

Setup(mathematicalnotation = true);
Setup(noncommutativeprefix = {X, Y});

Z := X + Y + (1/2)*Commutator(X,Y);

The output is like this:

> Z := X + Y + (1/2)*Commutator(X,Y);
                          Z := X + Y + 1/2 [X, Y][-]

> subs(X=Y,Z);
                              2 Y + 1/2 [Y, Y][-]

The above [Y,Y] must be interpreted as zero, of course.

Thank you very much.


How I can Plot this structure using define new coordinate such as cylinderical om\ne or addcoords?

The solution I'm getting here for v(y), doesn't satisfy my original two equations. Like for example if I choose u(y)=y, for easy check it can be seen that my de2 equation doesn't satisfy that value.

Can anyone help me out?

I see this question at here

How to solve this problem by Maple?

First 7 8 9 10 11 12 13 Last Page 9 of 61