MaplePrimes Questions

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?

restart;
Digits:=4:
n:=11:
M := 2:
Le := 5:
Lb := 2:
L:= 1:
l := 0.5:
Pr := 1:
Pe := 2:
Nt := 0.5:
Nb := 0.8:
F[0]:=0:
F[1]:=l*F[2]:
F[2]:=a:
T[0]:=1:
T[1]:=b:
d:=k->piecewise(k<>0,0,k=0,1):
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: 
f:=sum(F[k]*y^k,k=0..n); 
t:=sum(T[k]*y^k,k=0..n); 
with(numapprox):
pade(diff(f,y),y,[4,4]):
pade(t,y,[4,4]):
solve({limit(pade(diff(f,y),y,[4,4]),y=infinity)=0.,limit(pade(t,y,[4,4]),y=infinity)=0.,[a,b]);

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

with(combinat):
g:=proc(n)
 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;

And:

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:

restart:
with(PDEtools):
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);

Thanks.

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_zcoloring.mw

Spectrogram of my test signal:

list_test.txt

with(LinearAlgebra); A := `

D[1,2](1/x);

 

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

interface(showassumed=0);
pde := VectorCalculus:-Laplacian(u(x,y),[x,y])=-1/(1+y);
bc:=u(x,0)=0;
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

pdsolve([pde,bc],u(x,y)) 

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? 

 

 

When composing multiple plots, plots:-display's normal behavior is to set the overall plotting region to what is necessary to accommodate the union of the individual plots.  That works correctly most of the time but not in the case shown below.  This may indicate a bug in one of plots:-shadebetween,  plots:-display,  plottools:-extrude.  I have not been able to pinpoint the problem.  Any ideas?

restart;

Make a 3D plot:

plots:-shadebetween(x^2, 2-x^2, x=-1..1, color=red, transparency=0):
p1 := plottools:-extrude(%, 0..0.3);

 

Make another 3D plot:

plottools:-sphere([1.5,0,0], 1, color="Green"):
p2 := plots:-display(%);

 

Combine the plots:

plots:-display([p1,p2], scaling=constrained, style=surface);

 

We see that most of the green sphere has been cut off.  One way to fix things is
to add a view option (see below), but that wouldn't have been necessary if things
were working properly.

plots:-display([p1,p2], scaling=constrained, style=surface,
  view=[-1..3, DEFAULT, DEFAULT]);

 

This was done in Maple 2019.

Maple 2017 behaves the same way.  I don't know whether this ever worked properly in earlier Maples.
 

Download bug-in-3D-view.mw

 

Dear, I would like to kindly request your help with the following problem I have: 

L:= [0, 3,0,7];

for i from 1 to 4 do
if L[i] > 0 then 
x[i]:= [L[i]/2]
end if;
end do;

I need to write the elements x[i] as a list, however if I type x[i];  Maple just returns the last value of L[i]/2, namely 7/2. I do not know how to obtain the full list [3/2, 7/2]. What am I doing wrongly?

Many thanks in advance for your kind help. 

First 612 613 614 615 616 617 618 Last Page 614 of 2424