MaplePrimes Questions

Dear friends! Hope you will be fine. I want to generate a general form of the matrix (of order 2M+1 by 2M+1) shown below in Maple

 

[[[0,0,⋯,0,-1/(M Pi),0,⋯,0,1/(M Pi)],[0,0,⋯,0,-1/((M-1) Pi),0,⋯,1/((M-1) Pi),0],[⋮,⋮,⋱,⋮,⋮,⋮, ⋰,⋮,⋮],[0,0,⋯,0,-1/(Pi),1/(Pi),⋯,0,0],[1/(Pi),1/(Pi),⋯,1/(Pi),1,1/(Pi),⋯,1/(Pi),1/(Pi)],[0,0,⋯,1/(Pi),1/(Pi),0,⋯,0,0],[⋮,⋮,⋰,⋮,⋮,⋮,⋱,⋮,⋮],[0,1/((M-1) Pi),⋯,0,1/((M-1) Pi),0,⋯,0,0],[1/(M Pi),0,⋯,0,1/(M Pi),0,⋯,0,0]]]

for M=4 we get

Matrix(9, 9, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = -(1/4)/Pi, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = (1/4)/Pi, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = -(1/3)/Pi, (2, 6) = 0, (2, 7) = 0, (2, 8) = (1/3)/Pi, (2, 9) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = -(1/2)/Pi, (3, 6) = 0, (3, 7) = (1/2)/Pi, (3, 8) = 0, (3, 9) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = -1/Pi, (4, 6) = 1/Pi, (4, 7) = 0, (4, 8) = 0, (4, 9) = 0, (5, 1) = 1/Pi, (5, 2) = 1/Pi, (5, 3) = 1/Pi, (5, 4) = 1/Pi, (5, 5) = 1, (5, 6) = 1/Pi, (5, 7) = 1/Pi, (5, 8) = 1/Pi, (5, 9) = 1/Pi, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 1/Pi, (6, 5) = 1/Pi, (6, 6) = 0, (6, 7) = 0, (6, 8) = 0, (6, 9) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = (1/2)/Pi, (7, 4) = 0, (7, 5) = (1/2)/Pi, (7, 6) = 0, (7, 7) = 0, (7, 8) = 0, (7, 9) = 0, (8, 1) = 0, (8, 2) = (1/3)/Pi, (8, 3) = 0, (8, 4) = 0, (8, 5) = (1/3)/Pi, (8, 6) = 0, (8, 7) = 0, (8, 8) = 0, (8, 9) = 0, (9, 1) = (1/4)/Pi, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = (1/4)/Pi, (9, 6) = 0, (9, 7) = 0, (9, 8) = 0, (9, 9) = 0})

I want the general for of this matrix for any value of M

9_by_9.mw

Hi Guys,

I am trying to solve the folling ODE in maple but am struggling to get to the correct solution. I first of all have the following equations;

Diff(V(x), [x]) = q(x)

Diff(M(x), [x]) = V(x)

theta(x) = Diff(v(x),[x])

M(x)=EI*theta(x)

Which give me the following;

q(x) = Diff(EI*(Diff(v(x), [`$`(x, 2)])), [`$`(x, 2)])

With thw boundary conditions;

M(l) = 0, M(0) = 0, v(0) = 0, v(l) = 0

The given solution is;

v(x)=(qx/24EI)*(x^3-2lx^2+l^3)

Anything that might point me in the right direction would be great!

Cheers

Steve

 

 

conic_section_animation.mw

 

I have a nice 1 x 2 arry of plots, both columns of which are animations. They play beautifully inline. However, I cannot get them to export. Only one column can be selected at a time, hence I could export each animation separately, but the whole idea is to watch the animations together, side-by-side.

I have tried to change the plot setup to export to a file but when I do that I get an error in plots[display].

See the file above for details.

It could be that Display just cannot do this. But I don't see why not. I can export an array of plots of static images and it creates a single GIF file with both columns. The animated gifs should just be this same idea done 50 times over.

 

Any advice?

Dear community,

The VectorCalculus package in Maple 18 exhibits some rather odd behaviour when calculating an integral over a 3D-domain (an elipsoid centered at (0,0,1) with length of semi-axes 2, 2, and 1) given by a 'Region'. It also reports an incorrect result when calculating the flux of a vector field through the surface of this ellipsoid.

See below for a minimal working example:

 

// integrate several functions over ellipsoid

int(2*x+2*y, [x, y, z] = Region(-2 .. 2, -sqrt(-x^2+4) .. sqrt(-x^2+4), -sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1));    ---- output: 0

int(2*z, [x, y, z] = Region(-2 .. 2, -sqrt(-x^2+4) .. sqrt(-x^2+4), -sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1));    ---- output: 32*Pi/3

int(2*x+2*y+2*z, [x, y, z] = Region(-2 .. 2, -sqrt(-x^2+4) .. sqrt(-x^2+4), -sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1));    ---- output: -32*Pi/3

 

Why does the integral change sign?

 

// Calculate flux of vector field over surface of ellipsoid

F2 := VectorField(`<,>`(x^2, y^2, z^2));

S2 := Surface(`<,>`(2*sin(t)*cos(s), 2*sin(t)*sin(s), 1+cos(t)), s = 0 .. 2*Pi, t = 0 .. Pi);

Flux(F2, S2, 'outward');   ---- output: -32*Pi/3

 

However, since 'z' is positive over the entire ellipsoid, by the Divergence Theorem we know the result should be positive (in fact, equal to +32*Pi/3). Changing 'outward' to 'inward' does not change the sign, by the way.

 

Is this a bug inside the VectorCalculus package which appears more often, or have I done something wrong?

Thank you for responding and apologies if a similar question has already been answered in another thread.

Best wishes,

QQ

 

Hello all,

 

I am trying to solve a simple PDE with one unknow theta and three boundary conditions. Unfortunately, I receive error messages. In this case, the integer s seems to cause troubles. The error message is:

Error, (in pdsolve/numeric/process_PDEs) variable(s) {s} are in the PDE system but are not dependent or independent variables

 

When I assign s a value (such as 1 or 2), no error messages, but still no response. I get:

pds:=module() export plot,plot3d,animate,value,settings; ... end module

Would anyone have an idea how to resolve this issue? Thank you for your suggestions. Below is the small portion of code

restart;
with(PDEtools);

PDE := [(1-y^(s+1))*(diff(theta(y, z), z)) = diff(theta(y, z), `$`(y, 2))+y^(s+1)*(s+1)^(1/s+1)];
IBC := {theta(1, z) = 0, theta(y, 0) = 0, (D[1](theta))(0, z) = 0};

pds := pdsolve(PDE, IBC, numeric);
Error, (in pdsolve/numeric/process_PDEs) variable(s) {s} are in the PDE system but are not dependent or independent variables

sample.mw

 

Hi, please help me,
Regards

Velocity_distribution.mw

 

Hi, I plotted this, but I don't know if it is true or not...!!!

Help me please.

Regards.

Hi all,

I am new here, and it's my first post :)

I am a second year chemical engineering student, I have a homework with use of MAPLE software. Here is my code:

> L := [seq(i, i = 0.1e-1 .. 2500, 1)];
> v := Vector(L);
> Tc := 190.6;
> Pc := 46.1;
> w := 0.12e-1;
> R := 83.14;
> b := 0.8664e-1*R*Tc/Pc;
> m := .48+1.574*w-.175*w^2;
> n := length(v);
> P := Matrix(n, 10):

> MaProcedure := proc (x, i)
global P;
y := x;
for j to n do
P[j, i] := R*T/(y-b)+(-1)*a/(y*y*b)
end do
end proc;

> for i to 10 do
T := 99+10*i;
Tr := T/Tc;
a := .42748*R*Tc*(1+(1-sqrt(Tr)))^2/Pc;
for j to 26 do
MaProcedure(v[j], i)
end do
end do;

As you may deduce, P is the pressure, T the temperature and v is the molar volume.

I choosed to consider P as a matrix of n x 10 elements. and I desire to plot P in terms of v for 10 different temperatures.. every column of P contains the values of P computed for each v at a specified temprature T.

Hence, I must get 10 curves for P in one figure. But I guess that this code doesn't work. Can you help please? I don't mind if you have others suggestions for solving this problem.

PS: I want to obtain curves like shown in the figure below.

Thanks in advance :)

Hi,

I was trying to find the solution for two theta variables in a couple of simultaneous equations (infact this is an iverse kinematics problem for a two link system pendulum).
The following are the initial inputs/equations to be manipulated:


Then I use the folowing command to rearrange for the theta values which I am after:

which gives me the result:

This is all fine until I give in values for l1, l2, x and y:


results:

I have a RootOf in there with a _Z term poping up here and there. I know that this configuration of the two link mechanism in fact dows have a solution and that these numbers are reasonable. Thus I have three questions:

Why does this happen?
What does the "signum" mean here?
how do I go about getting the nummerical values?

Many thanks,
- pjf

So this is my minimal working code. Everything works, but I cannot get the arrow size fixed you can see the animation propperly. Adding wid=1/2 gives an error message.

dsolve.mw

Hi all, I want the bewst for you.

 

Could anyone help me with this bad equation, please?

 

Regards.

This message is for those who prefer use Maple in 1-D Math Input.

In 1-D Math Input, in previous versions of Maple, it was very comfortable to have the freedom to write ONE large statement in Continuing ON SEVERAL LINES for clarity and better reading from a *.wm file.

Here are simple examples, but in reality, I work on very complex cases.

 

Example #1:

A := u*( x + ln(x +1) + cos(x))

     + v*(1 + sqrt(x))

     + w*(sin(x) + tan(x) + x);

 

Example #2:

Vector([cos(s)*cos(t)

          , cos(s)*sin(t)

          , sin(s)]);

 

Example #3:

display(

  plot(f(x), x = x1..x2)

, plot(g(x), x = x1..x2)

, plot(h(x), x = x1..x2)

);

 

In Maple 2015 with a *.wm file, when you try to execute these example in 1-D Math Input, an error is returned and unfortunately forces you to write everything on the same line, what makes reading tiring.

 

Is a bug or a voluntary deactivation?

Can you help me, please?

 

Guy.

I have drawn a 3d plot of a sphere in maple, but when I try to export this one in an .eps file, only the coordinate system of the plot is shown, but not the colourful plot. The export works if I use jpg and similar file types, but not with .eps, does anybody know if there is a way out of this problem?

Hi,

Is there a way to export worksheet to pdf format but not in A4 size since some lines are going beyond the page?

I have a problem solving a system of PDEs.

The system of PDEs are

PDE01 := -(l^2+1^2)*(diff(v(l, t), t))+(l^2+1^2)*(diff(R(l, t), l, l))+4*l*(diff(R(l, t), l))+4*l*v(l, t)/(l^2+1^2)^(1/4)-6*R(l, t)/(l^2+1^2)+(l^2+1^2)^(1/2)*(-1.1+sqrt(.1))^2*sqrt(24)*u(l, t) = 0

PDE02 := diff(R(l, t), t) = v(l, t)

PDE03 := diff(u(l, t), t)-sqrt((1.1^2-1)/1.1^2)*(diff(u(l, t), l))-2*l*sqrt(1.1^2-1)*u(l, t)/(l^2+1^2) = 0

the initial condisions are

v(l, 0) = 0, R(l, 0) = 0, u(l, 0) = sqrt((l^2+1^2)^(1/2))*10^(-5)*exp(-(l-10)^2/.5^2)

and the BCs are

bdry00 := {((30^2+1^2)/30^2)^(1/4)*v(-30, t) = -((30^2+1^2)/30^2)^(1/2)*(D[1](R))(-30, t), ((30^2+1^2)/30^2)^(1/4)*v(30, t) = -((30^2+1^2)/30^2)^(1/2)*(D[1](R))(30, t), u(-30, t) = sqrt(30^2+1^2)*10^(-5)*exp(-40000), u(30, t) = sqrt(30^2+1^2)*10^(-5)*exp(-10000)}

to solve the system,

I enter

pde := pdsolve({PDE01, PDE02, PDE03}, {bdry00, init00}, time = t, numeric, range = -30 .. 30, timesstep = 1/60, spaceste = 1/254)

then, I failed to get the result constantly.

I tried several cases changing the initial conditions...

Can you let me know what I am doing wrong?

 

First 1292 1293 1294 1295 1296 1297 1298 Last Page 1294 of 2429