Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I have to do a homework on the euler explicite and when I am trying to test it I get an erreor can someone help me please :)

eulerexp := proc (fin, condin, h, tmax)

local i, n, j, tab, N; N := tmax/h;

for j to 5 do

tab[1, j] := condin[1, j]

end do;

for n from 2 to N do

tab[n, 1] := tab[n-1, 1]+h;

tab[n, 2] = tab[n-1, 2]+h*fin[1](tab[n-1, 1], tab[n-1, 2], tab[n-1, 3], tab[n-1, 4], tab[n-1, 5]);

tab[n, 3] = tab[n-1, 3]+h*fin[2](tab[n-1, 1], tab[n-1, 2], tab[n-1, 3], tab[n-1, 4], tab[n-1, 5]);

tab[n, 4] = tab[n-1, 4]+h*fin[3](tab[n-1, 1], tab[n-1, 2], tab[n-1, 3], tab[n-1, 4], tab[n-1, 5]);

tab[n, 5] = tab[n-1, 5]+h*fin[4](tab[n-1, 1], tab[n-1, 2], tab[n-1, 3], tab[n-1, 4], tab[n-1, 5]);

end do;

return tab end proc;

condin := [25, 1, 2, 3, 4];
                        [25, 1, 2, 3, 4]

fin := proc (t, w, x, y, z) options operator, arrow; [2*t-4*w+5*x-6*y-z, x, z, t] end proc;
(t, w, x, y, z) -> [2 t - 4 w + 5 x - 6 y - z, x, z, t]

h := .1;
tmax := 20;

eulerexp(fin, condin, h, tmax);
Error, (in eulerexp) invalid subscript selector


I've always had this issue. 1. Double click to highlight term to get help on. 2. Hit F1 3. Help pops up and I have to type in that term and find the info.


Why can't maple just combine all these steps? I've tried F2, various alt's, ctrl's, and shift combos and nothing... Surely something as basic as this has a hot key? And ideally I'd like to assign F1 to it!


The  plots help page contains an entry for ternaryplot. But it is empty (Maple 2018&2019) and there is no such command.
Does somebody know about it?

M := 2:
Le := 5:
Lb := 2:
L:= 1:
l := 0.5:
Pr := 1:
Pe := 2:
Nt := 0.5:
Nb := 0.8:
for k from 0 to n do F[k+3]:=-1/(d(k)+(k+1)*(k+2)*F(k+2))*((sum(F[k-m]*(m+1)*(m+2)*F[m+2],m=0..k))-(sum((k-m+1)*(m+1)*F[k-m+1]*F[m+1],m=0..k))-M*(k+1)*F[k+1])*(factorial(k)/factorial(k+3));
T[k+2]:=-1*(Pr/(k+1)*(k+2))*((sum(F[k-m]*(m+1)*T[m+1],m=0..k))+Nt*(sum((k-m+1)*(m+1)*T[k-m+1]*T[m+1],m=0..k))+Nb*(sum((k-m+1)*(m+1)*T[k+1]*F[k-m+1],m=0..k))) end do: 

I'm new to using Maple and am trying to create the procedure above. My code so far:

 local x; local setG; local setG2;
    for x from 1 to n do
        setG:={seq(x+1,x=1..n-1)}; setG2:=choose(setG,3); nops(setG2);
    end do;
end proc; 

Although this doesn't seem to work even though

setG:={seq(x+1,x=1..5)}; setG2:=choose(setG,3); nops(setG2);

Any help would be greatly appreciated!! 


I am studying the motion of a beam coupled to piezoelectric strips. This continuous system is modelled by two DE:

YI*diff(w(x,t), x$4)-N[0]*cos(2*omega*t)*diff(w(x,t), x$2)+c*diff(w(x,t), t)+`&rho;A`*diff(w(x,t), t$2)+C[em,m]*v(t) = 0;


C[p]*diff(v(t), t)+1/R[l]*v(t) = C[em,e]*(D[1,2](w)(0,t)-D[1,2](w)(ell,t));

where "w(x,t)" stands for the beam's vibration and "v(t)" means the electric voltage, which is constant throught the beam. I would like to numerically solve both DE simultaneosly, but maple will not let me do it. I would like to know why. I am getting the following error:

Error, (in pdsolve/numeric/process_PDEs) number of dependent variables and number of PDE must be the same

I suppose it is because "w(x,t)" depends on "x" and "t", while "v(t)" depends solely on time, but I am not sure. Could someone help me out? Here is my current code:

declare(w(x,t), v(t)):

YI*diff(w(x,t), x$4)-N[0]*cos(2*omega*t)*diff(w(x,t), x$2)+c*diff(w(x,t), t)+`&rho;A`*diff(w(x,t), t$2)+C[em,m]*v(t) = 0;
pde1:= subs([YI = 1e4, N[0] = 5e3, c = 300, omega = 3.2233993, C[em,m] = 1], %):
ibc1:= w(0,t) = 0, D[1,1](w)(0,t) = 0, w(ell,t) = 0, D[1,1](w)(ell,t) = 0, D[2](w)(x,0) = 0, w(x,0) = sin(Pi*x/ell):

C[p]*diff(v(t), t)+1/R[l]*v(t) = C[em,e]*(D[1,2](w)(0,t)-D[1,2](w)(ell,t));
pde2:= subs([C[p] = 10, R[l] = 1000, C[em,e] = 1, ell = 5], %):
ibc2:= v(0) = 0:

pdsolve({pde1, pde2}, {ibc1, ibc2}, numeric);


Hello everyone!

I'm interesting in "zcoloring" funciton in colorscheme option.

I wrote simple programm which compares two results: spectrogram of signal drawn with "colormap" list and spectrogram which was plotted with zcoloring function. I use red, green, blue functions to construct JET-colormap: list and expressions in "zcoloring".

My result:

As I understand, when I use:

colorscheme = ["zcoloring", [z-> Red color function(z), z-> Green color function(z), z-> Blue color function(z)], colorspace = "RGB"]

Maple plots z-value with color RGB color coordinates defined from "zcoloring". For example, if "zcoloring" is

colorscheme = ["zcoloring", [z-> 5*z, z-> 3*z, z-> 2*z], colorspace = "RGB"]

and z value is 10, then 10 value will correspond [50,30,20]-RGB color.

My test program:

Spectrogram of my test signal:


with(LinearAlgebra); A := `



what does this mean?

How do I find where 𝑓(π‘₯) = (2*π‘₯ ^2) tan(2*π‘₯), is discontinuous in the interval [0,2πœ‹], and find the discontinuities. I know you need ot use the commands: discount(f(x),x), iscont(f(x),x=a..b,’open’), iscont(f(x),x=a..b,’close’) and fdiscont(f(x),x=a..b, resolution) which will help me find the list of ranges, each of width resolution, in which there appears to be a discontinuity in the function or its first derivative.However, what is next ?

Solve the following ODE for given initial conditions both analytically and numerically. Use the odeadvisor in DEtools package to classify the equations. Plot the explicit and numerical solutions in the range [0,20] using plot and odeplot commands. 𝑦 ′′(𝑑) + 16𝑦(𝑑) = 3 sin(πœ” 𝑑), for πœ” ∈ {1,4,5,8}, 𝑦(0) = 𝑦 ′ (0) = 0


I started by:


ode := diff(y(t), t, t) + 16*y(t) = 3*sin(w*t);
                  /  2      \                       
                  | d       |                       
           ode := |---- y(t)| + 16 y(t) = 3 sin(w t)
                  |   2     |                       
                  \ dt      /                       
odeadvisor(ode, y(t));
            [[_2nd_order, _linear, _nonhomogeneous]]
I undertsnad how to plot 

but how do I odeplot and how do I contribute πœ” ∈ {1,4,5,8

. Let 𝑔(π‘₯) = cos2 (π‘₯ 2+1) (sinπ‘₯+1) 2 and 𝑓(π‘₯) = (2π‘₯ 2 − 1) 3√π‘₯ + 2.

Write a procedure to return the tangent line of the function 𝑓(π‘₯) at the given point π‘₯ ∈ 𝐷𝑓.


I started by writing a regular Proc template 

such as 

tangent line:=proc(y);

however i am unsure if I shpuld go forwrad with using an if loop or not?



What is the correct way to specify region where solution of a PDE is needed? For example, I am trying to verify my hand solution to this HW problem: Solve Poisson PDE in 2D 

The above is the only information given in the textbook. So it is only in the upper half plane. If I type this

pde := VectorCalculus:-Laplacian(u(x,y),[x,y])=-1/(1+y);
pdsolve([pde,bc],u(x,y)) assuming y>0

Maple gives 

But I get by hand using method of images is

So not exactly the same. I think I made mistake in my solution. But I am also not sure that just saying "assuming y>0" is doing what I think it is supposed to do. For example, suppose we want to solve the same PDE say in the first quadrant. Typing

pdsolve([pde,bc],u(x,y)) assuming y>0,x>0

Gives same solution. But the solution should be different. And typing


Gives same answer as well.

So I think I need another way to tell Maple the region of the solution. i.e. I need to tell Maple to use the Laplacian for the upper half plane only and not the Laplacian in the whole 2D space.

Any suggestions what to do and how to handle such problems?

Thank you

TangentLine(l, point(A, 0, 1), circle(c, [point(C, 0, 1), 1]))

Under geometry package if I use the command Tangentline, and if I want to change either the point of the circle, then 

Error, (in geometry:-line) the first argument is expected of type name

How I make it overwrite l each time? So I don't have to rename the tangents each time? 



2 3 4 5 6 7 8 Last Page 4 of 1614