Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

How do I write plot ceil(x) mod 2 properly?

If I write: 

plot(ceil(x) mod 2, x = 0 .. 4)

it produces a step pattern and not a square wave. (Only 0 and 1 should be plotted.) 

Can i use the file tools package to change the file extension of a file or open up a powershell terminal to do so from within the maple interface via command line?

I need to solve a system of differential equations, which have been obtained from the method of multiple scales. However, for some reason Maple returns an error and will not give a solution. Could someone help me find a solution? The associated filed is attached.

So, basically i plan to define procedures based on if conditions that will assume arbitarily large float approximations as being infinity, as with the example i have uploaded, but i feel that i need some people from here that are smarter than me to tell me why this is going to be terrible or what i need to consider. 

I am willing to consider my current view naive and or inept, however i feel as if computer algebra systems will eventually develop means of reducing the need for floating point results by making concise implicit steps of manipulation on floating point computations, naturally i feel as if these routines are evidence that maybe some of the maple programmers have such an objective, but i do tend to misinterpret everything all the time.



convert(evalf[100](1/RootOf(floor(_Z))), 'rational', 'exact')






Please may I know if you can offer ma student's discount ob the seleted version.

Thank you.


How can I apply differential transformation method in differential equations with maple commands .DE is y'''(x)+xy''(x)-y(x)=0;

I solve a boundary value problem for a linear system of first order PDEs
in the unknowns u(x, t) and "v(x,t)."  Ultimately, I am interested in the graph
of the function v(0, t) but numerical artifacts distort that graph badly by
imposing spurious oscillation.

Is there a way to maneuver the calculations to obtain the graph of v(0, t)
without the oscillation?


pde1 := diff(u(x,t),t)=diff(v(x,t),x);

diff(u(x, t), t) = diff(v(x, t), x)

pde2 := diff(u(x,t),x)=v(x,t);

diff(u(x, t), x) = v(x, t)

ibc := u(x,0)=1, u(0,t)=0, u(1,t)=0;

u(x, 0) = 1, u(0, t) = 0, u(1, t) = 0

dsol := pdsolve({pde1,pde2}, {ibc}, numeric, spacestep=0.01, timestep=0.01);


my_u := eval(u(x,t), %):
my_v := eval(v(x,t), %%):

plot3d(my_u(x,t), x=0..1, t=0..0.5);

plot3d(my_v(x,t), x=0..1, t=0..0.5);

The oscillations are numerical artifacts.  Can they be avoided?

plot(my_v(0,t), t=0..0.5);

A side comment: By eliminating vbetween the two PDEs we see that u
satisfies the standard heat equation, thus vis the flux.  The expression
v(0, t) expresses the heat flux at the boundary, and that's what I am after.



I open a completely new document, type in a few simple expressions and get this weird complex number out. Can someone pleas help me fix this?

In this question at here
The points A and B lie on the circle is intersection of the sphere x^2 + y^2 + (z-3)^2 = 25 and the plane z = 0. 
How can I find coordinates of the points A and B by Maple?


searchtext and SearchText do not work well with non-ASCII characters.
Strangely, StringTools:-Search is OK.

m:=convert([77,97,116,104,195,169,109,97,116,105,113,117,101], bytes);
                      m := "Mathématique"
seq(searchtext(m[i..7], m), i=1..7);
                      1, 0, 0, 4, 0, 0, 1
seq(SearchText(m[i..7], m), i=1..7);
                      1, 0, 0, 4, 0, 0, 7
seq(StringTools:-Search(m[i..7], m), i=1..7);
                      1, 2, 3, 4, 5, 6, 7


I'm a Maple novice.  I have two questions.  (1) I'm trying to use Maple to confirm some Fourier transforms of selected probability density functions.  In general I've succeeded, but Maple fails to find the Fourier transform of the pdf of a logistic random variable with mean 0.  Please explain how I can get Maple to carry out this request.  I've attached a Maple file with my work to this question.  (2) At several points in my computations, I wish to substitute 2*Pi*xi for omega.  I have an expression containing two omegas.  If I use algsubs(), only one of the two omegas is replaced.  I have to use subs() to replace both omegas.  Why is this?

Use Maple to confirm selected Fourier transform of logistic random variable


[addtable, fourier, fouriercos, fouriersin, hankel, hilbert, invfourier, invhilbert, invlaplace, invmellin, laplace, mellin, savetable]


assume(a > 0)



proc (x) options operator, arrow, function_assign; exp(x/a)/(a*(1+exp(x/a))^2) end proc


int(f(x), x = -infinity .. infinity)



fourier(f(x), x, omega)

fourier(exp(x/a)/(1+exp(x/a))^2, x, omega)/a


"f(x) := 1/(4*a*(cosh(x/(2*a)))^(2))"

proc (x) options operator, arrow, function_assign; (1/4)/(a*cosh((1/2)*x/a)^2) end proc


int(f(x), x = -infinity .. infinity)



fourier(f(x), x, omega)

fourier(1/(exp((1/2)*x/a)+exp(-(1/2)*x/a))^2, x, omega)/a


Wikipedia's article on "Logistic distribution" gives a characteristic function that implies that the Fourier transform of this pdf should equal Pi*a*omega/sinh(Pi*a*omega).

Unit rectangular function

rect := proc (x) options operator, arrow; Heaviside(x+1/2)-Heaviside(x-1/2) end proc

proc (x) options operator, arrow; Heaviside(x+1/2)-Heaviside(x-1/2) end proc


fourier(rect(a*x), x, omega)



algsubs(omega = 2*Pi*xi, 2*sin((1/2)*omega/a)/omega)



subs(omega = 2*Pi*xi, 2*sin(Pi*xi/a)/omega)









K := -3;
m := 1;
w := -4*K;
alpha[0] := -2;
alpha[1] := 0;
a := 2;
b := 3;
beta[1] := (12*(m^2+K))/(a+b);
xi := -t*w+x+y;
                         -12 t + x + y

F := -sqrt(-K)*tanh(sqrt(-K)*xi);
                (1/2)     / (1/2)                \
              -3      tanh\3      (-12 t + x + y)/
U := alpha[0]+alpha[1]*(m+F)+beta[1]/(m+F);
        -2 - -------------------------------------------
               /     (1/2)     / (1/2)                \\
             5 \1 - 3      tanh\3      (-12 t + x + y)//
y := 0;

plot3d(U, x = -10 .. -10, t = -10 .. 10);

t := 0;
plot(U, x = -10 .. 10);

How can find order of convergence  for multiple roots for example x-2*f(x)/Df(x)

WHICH have quadratic  order of convergence how find out in maple software????


How do I calculate the intersection curve between a plane and a drop?
The "drop" is defined in the following way:

R1 := 3.;R2 := 1.0;DR := 4;g := R2 + DR;

f1 := h -> sqrt(R1^2 - h^2);
f2 := h -> sqrt(g^2 - h^2);
f3 := h -> (1 - h/g)*f1(h*R1/g) + h*f2(h)/g;
f4 := h -> sqrt(1/2*g - 1/2*h);
f5 := h -> (1 - h/g)*f3(h) + h*f4(h)/g;
gg := h -> piecewise(h < 0, f1(h), 0 <= h, f5(h));#Radius depending on the z-position h
cir := (h, phi, R) -> <sin(phi)*R, cos(phi)*R, h>; # a circle at the hight h with radius R
#The plane is placed inside the drop.
n := (x, y, z) -> <x, y, z>/sqrt(x^2 + y^2 + z^2);

# the following lines show, how it looks like:
dro1 := plot3d(cir(h, phi, gg(h)), h = -R1 .. g, phi = 0 .. 2*Pi, scaling = constrained, orientation = [-60, 72, 0]);
plotDropWithPlane := (x, y, z) -> display(dro1, arrow(Vector([0, 0, 0]), 2*R1*n(x, y, z), 0.2, 0.4, 0.1, cylindrical_arrow, fringe = blue, color = "Green"), implicitplot3d(x*x1 + y*y1 + z*z1 = 0, x1 = -R1 .. R1, y1 = -R1 .. R1, z1 = -R1 .. g, color = blue));
plotDropWithPlane(3, 1, 2);

#I'm searching a function like

Any idea how to solve?

Best regards,


5 6 7 8 9 10 11 Last Page 7 of 1584