Maple 18 Questions and Posts

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

I was able to fix the problem. But I wanna use if statements to differentiate between complex and real roots in the attached file

I am trying to find the solution (\Psi) as approaches zero. However, after applying the limit the solution becomes zero. See the attached .mw

I have tried a code in python for Francis QR algorithm but didn't desire the result. I don't know if it is possible to code in maple.

Given that A^0 = [[3.0, 1.0, 4.0], [1.0, 2.0, 2.0], [0., 13.0, 2]].

1. Write a little program that computes 1 step of Francis QR and test your program by starting from

A^0 = [[3.0, 1.0, 4.0], [1.0, 2.0, 2.0], [0., 13.0, 2]]  and compute A^1, A^2 ...A^6.

I expected to get:

A^0 = [[3.0, 1.0, 4.0], [1.0, 2.0, 2.0], [0., 13.0, 2]], 

A^1 = [[3.5,  -4.264, 0.2688], [-9.206, 1.577, 9.197], [0., -1.41, 1.923]], 

... A^6 = [[8.056,  1.596, 8.584], [0.3596, -2.01, -7.86], [0., 2.576*10^(-16), 0.9542]]. 

But didn't get the same results.

Here is my python code:

# Import packages
import numpy as np
from numpy.linalg import qr # QR from Linear Algebra Library
import scipy.linalg   # SciPy Linear Algebra Library

A = np.array([[3.0, 1.0, 4.0], [1.0, 2.0, 2.0], [0., 13.0, 2]])
p = [1, 2, 3, 4, 5, 6]
for i in range(30):
    q, r = qr(A)
    a =, q)
    if i+1 in p:
        print("Iteration {i+1}")

I would really appreciate your help.

Thank you.

Please, how can I find all the roots  of: (H/(Hc))^2 -(4*q^2)/Pi^2*((tan(q)- q/(1-alpha))/(tan(q)-q)) with q=(i-1)*Pi+Pi/2..i*Pi+Pi/2 for n=20.

See my attempt below:

a[1] := .1093; k[3] := 7.5*10^(-12); k[2] := 3.8*10^(-12); d := 0.2e-3; eta[1] := 0.240e-1; alpha[2] := -.1104; alpha[3] := -0.1104e-2; eta[2] := .1361; xi := 1.219*10^(-6); alpha := 1-alpha[3]^2/(a[1]*eta[1]); theta[0] := 0.5e-1;
Hc := (Pi/d)*sqrt(k[2]/xi):

H := 5.5*Hc;
lambda := a[1]/(xi*H^2);

RootFinding:-NextZero(proc (q) options operator, arrow; (H/(Hc))^2 -(4*q^2)/Pi^2*((tan(q)- q/(1-alpha))/(tan(q)-q)) end proc, 0);

for j to 9 do RootFinding:-NextZero(proc (q) options operator, arrow; H^2/Hc^2-4*q^2*(tan(q)-q/(1-alpha))/(Pi^2*(tan(q)-q)) end proc, %) end do;

Error, invalid input: RootFinding:-NextZero expects its 2nd argument, zz, to be of type numeric, but received FAIL

hallo every body 

please how i do find a real roots for this equation system

Please see the attached file; I'm attempting to do some calculations with the 'PDETools' package; notice the first term in equation (4), where sqrt(x2+y2) is not canceling in the fraction, despite using the 'simplify' command; why is this happening, and how can I achieve complete simplification?


DepVars := [u(x, y, t), U(xi, eta)]; 1; alias(u = u(x, y, t))

[u(x, y, t), U(xi, eta)]




xi[1] := 1/2*(x^2+y^2); 1; xi[2] := t; 1; u := (h(t)+(x^2+y^2)*(1/2))*arccos(x/sqrt(x^2+y^2))/t+U(xi[1], xi[2])





(h(t)+(1/2)*x^2+(1/2)*y^2)*arccos(x/(x^2+y^2)^(1/2))/t+U((1/2)*x^2+(1/2)*y^2, t)


(diff(u, x))*(diff(u, y))

(x*arccos(x/(x^2+y^2)^(1/2))/t-(h(t)+(1/2)*x^2+(1/2)*y^2)*(1/(x^2+y^2)^(1/2)-x^2/(x^2+y^2)^(3/2))/((1-x^2/(x^2+y^2))^(1/2)*t)+(D[1](U))((1/2)*x^2+(1/2)*y^2, t)*x)*(y*arccos(x/(x^2+y^2)^(1/2))/t+(h(t)+(1/2)*x^2+(1/2)*y^2)*x*y/((x^2+y^2)^(3/2)*(1-x^2/(x^2+y^2))^(1/2)*t)+(D[1](U))((1/2)*x^2+(1/2)*y^2, t)*y)


collect(simplify(subs(1/2*(x^2+y^2) = xi, t = eta, (x*arccos(x/(x^2+y^2)^(1/2))/t-(h(t)+(1/2)*x^2+(1/2)*y^2)*(1/(x^2+y^2)^(1/2)-x^2/(x^2+y^2)^(3/2))/((1-x^2/(x^2+y^2))^(1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(1/2)+2*arccos(x/(x^2+y^2)^(1/2))*x*(x^2+y^2)^(1/2)*(y^2/(x^2+y^2))^(1/2)*y^2-x^2*y^2-y^4-2*h(eta)*y^2)*(2*arccos(x/(x^2+y^2)^(1/2))*x^2*(x^2+y^2)^(1/2)*(y^2/(x^2+y^2))^(1/2)+2*arccos(x/(x^2+y^2)^(1/2))*(x^2+y^2)^(1/2)*(y^2/(x^2+y^2))^(1/2)*y^2+x^3+x*y^2+2*h(eta)*x)/(y*(x^2+y^2)^2*eta^2)




Consider matrices A and B below; how one can plot basis vectors of column space in 2d, and plane or line spanned by basis of row space in 3D?

A := Matrix([[2, 3, 5], [1, 2, 7]]);

B := Matrix([[6, 4, 2], [3, 2, 1]]);

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convODEPlot.mwODEPlot.mwert/ .

Hey everyone!

I have a complex function stored in a file (Comp-func.txt). The function is continues everywhere on the real axis (X-axis.txt). However, its log shows a jump somewhere close to x=-1.5. I would like to understand how Maple interprets this "jump" and how to avoid such numerical artifact.

thank you.



Hi guys,

I can not solve this integral with maple ! I really appreciate if someone can help me! Mathematical gives a solution in terms of hypergeometric function! 

p^2 , m, \epsilon, D > 0 and i is imaginary number 


I was computing an integral (Running Maple 18 on Windows 10):

The classic lenght of arc Integral of sqrt(1+(dy/dx)^2) dx

In this case, the function was a cartesian circle (x-R)^2+y^2=R^2 isolated as y=sqrt(R^2-(x-R)^2)

When I do the integration, the result of the integral is not correct.
But if I change R for a, the result is correct. Why? This does not make any sense.

R wasn't assigned to any variable. The code was:

Good Integral


Wrong Integral


In fact, any UPPERCASE letter used as the radius gives me the wrong answer whereas any LOWERCASE letter gives me the proper result. Why is this?

Thanks and have a nice day
EDIT: I added a Screenshot


 a := x^2;
 b := x[1]^2;


Do you know why cg0 =/= x[0]*x[0]?

Hi everyone, how can i plot nonlinear phase portraithere k,w, alpha,K, k, gamma, beta are arbitrary constants and i have three equilibrium points:

I hope the resulting graphics are as follows :

How can I plot these phase portraits? Thanks in advance.

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