Rouben Rostamian

MaplePrimes Activity


These are answers submitted by Rouben Rostamian

Do you really need symbolic manipulation capabilities in your research on hyperbolic systems?  To my knowledge, the bulk of computing in that area involves a lot of number crunching but no serious use of symbolic computations.

If that's the case, then the choice between Maple and Mathematica is immaterial.  You may also consider Matlab, or write programs in C or Fortran.  Compilers for C and Fortran are available for free so that choice will cost you $0.

Ultimately the key deciding factor would be which of these languages you feel more comfortable with, and the level of support that you can reasonably expect to receive from its user community.

 

 

@das1404 The mathematical definitions a circle and a disk of radius R centered at the origin in the usual Cartesian x-y coordinate system are:

circle    { (x,y) : x2 + y2 = R2 }

disk      { (x,y) : x2 + y2 ≤ R2 }

Maple uses the terms terms "circle" and "disk" according to these standard mathematical definitions.  These should not be confused with the ordinary "street" use of those terms.

The filled versus outline drawings of the plottools objects are controlled through the options style=surface and surface=line.  Try the following to see:

restart;
with(plots): with(plottools):
display(disk([0,0], 1, color=yellow));
display(disk([0,0], 1, color=yellow, style=surface));
display(disk([0,0], 1, color=yellow, style=line));
display([
  disk([0,0], 1, color=red, style=line, thickness=3),
  disk([0,0], 1, color=yellow, style=surface)
]);

Also try the corresponding constructions with circle and rectangle.

PS: I can't tell whether these will have the intended results on Maple 7. They certainly work on the more recent versions of Maple.

 

restart;

with(VectorCalculus):

F := VectorField(<x,y,z>, coords=cartesian[x,y,z]):

cyl := Surface( <2,phi,z>, phi=0..2*Pi, z=-3..3,
    coords=cylindrical[r, phi, z]):

top := Surface( <r*cos(t), r*sin(t),  3>,
    r=0..2, t=0..2*Pi, coords=cartesian[x,y,z]):

Important!  In the definition of bot below, note the reversal of the order of appearance

of t=... and r=... relative to those in top.  That makes the normal vectors of

top and bot point in opposite directions.

Alternatively, we may keep the order the same, but reverse the sign of the flux

calculated on the cylinder's bottom.

bot := Surface( <r*cos(t), r*sin(t), -3>,
    t=0..2*Pi, r=0..2, coords=cartesian[x,y,z]):

Individual fluxes:

Flux(F, cyl);

48*Pi

 

Flux(F, top);

12*Pi

 

Flux(F, bot);

12*Pi

 

Total flux:

Flux(F, cyl) + Flux(F, top) + Flux(F, bot);

72*Pi

 
 

 

The maximum length of 67.66 cm calculated by vv and kitonum is much too small considering that one side of the box is 118 cm long.  That's because the assumption (given in the problem's statement) that the cylinder's axis coincides with the box's diagonal is not good.  If we calculate without that assumption, we arrive at a maximum length of 118.84 cm which makes better sense.  That means that the rolled carpet of length 120 cm is just a bit too long to squeeze in, but perhaps if you give it a little push it may work ;-)

Here is a picture of the box and the longest carpet:

Worksheet: cylinder-in-a-box.mw

Worksheet: mw.mw

Animation extracted fron worksheet mw.mw. The triangle marks the osculating plane. The red dot marks the center of curvature.

I don't have MapleSim but the animation can be produced quite easily in Maple; see the attached worksheet. Here is a sample demonstration where the left end is clamped and the right end is hinged, but you may change the boundary conditions in the worksheet as you wish.

Worksheet: animate-beam.mw

 

This should be self-explanatory:

restart;

solve(sin(Pi*t/T), t);

0

(1)

solve(sin(Pi*t/T), t, allsolutions);

_Z1*T

(2)

about(_Z1);

Originally _Z1, renamed _Z1~:
  is assumed to be: integer

 

 

 

Download mw.mw

 

I find your question quite vague, so here is my attempt to figure out what it is asking.  The calculation that follows is inconclusive.  You need to state more clearly what you have in mind.

Let's look at the PDE:

pde := a*diff(u(x,y,z),x,x) + b*diff(u(x,y,z),y,y) + c*diff(u(x,y,z),z,z) = 1;

a*(diff(diff(u(x, y, z), x), x))+b*(diff(diff(u(x, y, z), y), y))+c*(diff(diff(u(x, y, z), z), z)) = 1

(1)

Try a solution of the form u = f(x-2*y+z)

eval(pde, u(x,y,z)=f(x-2*y+z));

a*((D@@2)(f))(x-2*y+z)+4*b*((D@@2)(f))(x-2*y+z)+c*((D@@2)(f))(x-2*y+z) = 1

(2)

This is to hold for all x, y, z.  Let w = x-2*y+z

eval((2), x-2*y+z=w);

a*((D@@2)(f))(w)+4*b*((D@@2)(f))(w)+c*((D@@2)(f))(w) = 1

(3)

This is an ordinary differential equation for f(w).  Solve it:

dsolve((3), f(w));

f(w) = (1/2)*w^2/(a+4*b+c)+_C1*w+_C2

(4)

Restore the x, y, z variables:

u(x,y,z) = eval(rhs((4)), w=x+2*y+z);

u(x, y, z) = (1/2)*(x+2*y+z)^2/(a+4*b+c)+_C1*(x+2*y+z)+_C2

(5)

Let's verify that what we have obtained is indeed a solution of the PDE:

pdetest((5), pde);

0

(6)

So yes, what we have obtained is a solution.

 

Conclusion: We see that a solution of the form u = f(x-2*y+z) exists for
any choice of the coefficients a, b, c.  That is, requiring a solution of that form
does not determine the coefficients at all!

Here it is:

Worksheet: mw.mw

You did not provide your equations in the Maple input form, so I retyped them. I don't guarantee that I have made no mistakes. Check!

restart;

interface(imaginaryunit = IMunit):  # free the symbol I to use as a variable

fS := (1-p)*pi+phi*V+delta*R-(mu+lambda+theta)*S;
fV := p*pi+theta*S-(mu+epsilon*lambda+phi)*V;
fC := rho*lambda*S+rho*epsilon*lambda*V+(1-q)*eta*I-(mu+beta+chi)*C;
fI := (1-rho)*lambda*S+(1-rho)*epsilon*lambda*V+chi*C-(mu+alpha+eta)*I;
fR := beta*C+q*eta*I-(mu+delta)*R;

(1-p)*pi+phi*V+delta*R-(mu+lambda+theta)*S

 

p*pi+theta*S-(epsilon*lambda+mu+phi)*V

 

rho*lambda*S+rho*epsilon*lambda*V+(1-q)*eta*I-(mu+beta+chi)*C

 

(1-rho)*lambda*S+(1-rho)*epsilon*lambda*V+chi*C-(mu+alpha+eta)*I

 

beta*C+q*eta*I-(mu+delta)*R

(1)

endemic := solve({ fS, fV, fC, fI, fR },  { S, V, C, I, R } ):

Here is what S looks like.  Replace S by any of V, C, I, R to see the other four.

eval(S, endemic);

-pi*(-delta*epsilon*eta*lambda*mu*p*q*rho+alpha*beta*delta*epsilon*lambda*p*rho+beta*delta*epsilon*lambda*mu*p*rho-chi*epsilon*eta*lambda*mu*p*q+delta*epsilon*eta*lambda*mu*p*q-alpha*beta*delta*epsilon*lambda*p-alpha*beta*epsilon*lambda*mu*p-alpha*chi*delta*epsilon*lambda*p-alpha*chi*epsilon*lambda*mu*p-alpha*delta*epsilon*lambda*mu*p-alpha*epsilon*lambda*mu^2*p-beta*delta*epsilon*lambda*mu*p-beta*epsilon*eta*lambda*mu*p-beta*epsilon*lambda*mu^2*p+chi*delta*epsilon*eta*lambda*q-chi*delta*epsilon*lambda*mu*p-chi*delta*eta*mu*p*q+chi*epsilon*eta*lambda*mu*q-chi*epsilon*lambda*mu^2*p-chi*eta*mu^2*p*q-delta*epsilon*eta*lambda*mu*p-delta*epsilon*lambda*mu^2*p-epsilon*eta*lambda*mu^2*p-epsilon*lambda*mu^3*p+alpha*beta*delta*epsilon*lambda-alpha*beta*delta*mu*p+alpha*beta*epsilon*lambda*mu-alpha*beta*mu^2*p+alpha*chi*delta*epsilon*lambda-alpha*chi*delta*mu*p+alpha*chi*epsilon*lambda*mu-alpha*chi*mu^2*p+alpha*delta*epsilon*lambda*mu-alpha*delta*mu^2*p+alpha*epsilon*lambda*mu^2-alpha*mu^3*p+beta*delta*epsilon*eta*lambda+beta*delta*epsilon*lambda*mu-beta*delta*eta*mu*p-beta*delta*mu^2*p+beta*epsilon*eta*lambda*mu+beta*epsilon*lambda*mu^2-beta*eta*mu^2*p-beta*mu^3*p+chi*delta*epsilon*lambda*mu+chi*delta*eta*mu*q+chi*delta*eta*phi*q-chi*delta*mu^2*p+chi*epsilon*lambda*mu^2+chi*eta*mu^2*q+chi*eta*mu*phi*q-chi*mu^3*p+delta*epsilon*eta*lambda*mu+delta*epsilon*lambda*mu^2-delta*eta*mu^2*p-delta*mu^3*p+epsilon*eta*lambda*mu^2+epsilon*lambda*mu^3-eta*mu^3*p-mu^4*p+alpha*beta*delta*mu+alpha*beta*delta*phi+alpha*beta*mu^2+alpha*beta*mu*phi+alpha*chi*delta*mu+alpha*chi*delta*phi+alpha*chi*mu^2+alpha*chi*mu*phi+alpha*delta*mu^2+alpha*delta*mu*phi+alpha*mu^3+alpha*mu^2*phi+beta*delta*eta*mu+beta*delta*eta*phi+beta*delta*mu^2+beta*delta*mu*phi+beta*eta*mu^2+beta*eta*mu*phi+beta*mu^3+beta*mu^2*phi+chi*delta*mu^2+chi*delta*mu*phi+chi*mu^3+chi*mu^2*phi+delta*eta*mu^2+delta*eta*mu*phi+delta*mu^3+delta*mu^2*phi+eta*mu^3+eta*mu^2*phi+mu^4+mu^3*phi)/(-delta*epsilon*eta*lambda^2*mu*q*rho-delta*epsilon*eta*lambda*mu*q*rho*theta+alpha*beta*delta*epsilon*lambda^2*rho+alpha*beta*delta*epsilon*lambda*rho*theta+beta*delta*epsilon*lambda^2*mu*rho+beta*delta*epsilon*lambda*mu*rho*theta-chi*delta*epsilon*eta*lambda*mu*q-chi*epsilon*eta*lambda^2*mu*q-chi*epsilon*eta*lambda*mu^2*q-chi*epsilon*eta*lambda*mu*q*theta+delta*epsilon*eta*lambda^2*mu*q+delta*epsilon*eta*lambda*mu*q*theta-delta*eta*lambda*mu^2*q*rho-delta*eta*lambda*mu*phi*q*rho-alpha*beta*delta*epsilon*lambda^2-alpha*beta*delta*epsilon*lambda*mu-alpha*beta*delta*epsilon*lambda*theta+alpha*beta*delta*lambda*mu*rho+alpha*beta*delta*lambda*phi*rho-alpha*beta*epsilon*lambda^2*mu-alpha*beta*epsilon*lambda*mu^2-alpha*beta*epsilon*lambda*mu*theta-alpha*chi*delta*epsilon*lambda^2-alpha*chi*delta*epsilon*lambda*mu-alpha*chi*delta*epsilon*lambda*theta-alpha*chi*epsilon*lambda^2*mu-alpha*chi*epsilon*lambda*mu^2-alpha*chi*epsilon*lambda*mu*theta-alpha*delta*epsilon*lambda^2*mu-alpha*delta*epsilon*lambda*mu^2-alpha*delta*epsilon*lambda*mu*theta-alpha*epsilon*lambda^2*mu^2-alpha*epsilon*lambda*mu^3-alpha*epsilon*lambda*mu^2*theta-beta*delta*epsilon*eta*lambda*mu-beta*delta*epsilon*lambda^2*mu-beta*delta*epsilon*lambda*mu^2-beta*delta*epsilon*lambda*mu*theta+beta*delta*lambda*mu^2*rho+beta*delta*lambda*mu*phi*rho-beta*epsilon*eta*lambda^2*mu-beta*epsilon*eta*lambda*mu^2-beta*epsilon*eta*lambda*mu*theta-beta*epsilon*lambda^2*mu^2-beta*epsilon*lambda*mu^3-beta*epsilon*lambda*mu^2*theta-chi*delta*epsilon*lambda^2*mu-chi*delta*epsilon*lambda*mu^2-chi*delta*epsilon*lambda*mu*theta-chi*delta*eta*mu^2*q-chi*delta*eta*mu*phi*q-chi*delta*eta*mu*q*theta-chi*epsilon*lambda^2*mu^2-chi*epsilon*lambda*mu^3-chi*epsilon*lambda*mu^2*theta-chi*eta*lambda*mu^2*q-chi*eta*lambda*mu*phi*q-chi*eta*mu^3*q-chi*eta*mu^2*phi*q-chi*eta*mu^2*q*theta-delta*epsilon*eta*lambda^2*mu-delta*epsilon*eta*lambda*mu^2-delta*epsilon*eta*lambda*mu*theta-delta*epsilon*lambda^2*mu^2-delta*epsilon*lambda*mu^3-delta*epsilon*lambda*mu^2*theta+delta*eta*lambda*mu^2*q+delta*eta*lambda*mu*phi*q-epsilon*eta*lambda^2*mu^2-epsilon*eta*lambda*mu^3-epsilon*eta*lambda*mu^2*theta-epsilon*lambda^2*mu^3-epsilon*lambda*mu^4-epsilon*lambda*mu^3*theta-alpha*beta*delta*lambda*mu-alpha*beta*delta*lambda*phi-alpha*beta*delta*mu^2-alpha*beta*delta*mu*phi-alpha*beta*delta*mu*theta-alpha*beta*lambda*mu^2-alpha*beta*lambda*mu*phi-alpha*beta*mu^3-alpha*beta*mu^2*phi-alpha*beta*mu^2*theta-alpha*chi*delta*lambda*mu-alpha*chi*delta*lambda*phi-alpha*chi*delta*mu^2-alpha*chi*delta*mu*phi-alpha*chi*delta*mu*theta-alpha*chi*lambda*mu^2-alpha*chi*lambda*mu*phi-alpha*chi*mu^3-alpha*chi*mu^2*phi-alpha*chi*mu^2*theta-alpha*delta*lambda*mu^2-alpha*delta*lambda*mu*phi-alpha*delta*mu^3-alpha*delta*mu^2*phi-alpha*delta*mu^2*theta-alpha*lambda*mu^3-alpha*lambda*mu^2*phi-alpha*mu^4-alpha*mu^3*phi-alpha*mu^3*theta-beta*delta*eta*mu^2-beta*delta*eta*mu*phi-beta*delta*eta*mu*theta-beta*delta*lambda*mu^2-beta*delta*lambda*mu*phi-beta*delta*mu^3-beta*delta*mu^2*phi-beta*delta*mu^2*theta-beta*eta*lambda*mu^2-beta*eta*lambda*mu*phi-beta*eta*mu^3-beta*eta*mu^2*phi-beta*eta*mu^2*theta-beta*lambda*mu^3-beta*lambda*mu^2*phi-beta*mu^4-beta*mu^3*phi-beta*mu^3*theta-chi*delta*lambda*mu^2-chi*delta*lambda*mu*phi-chi*delta*mu^3-chi*delta*mu^2*phi-chi*delta*mu^2*theta-chi*lambda*mu^3-chi*lambda*mu^2*phi-chi*mu^4-chi*mu^3*phi-chi*mu^3*theta-delta*eta*lambda*mu^2-delta*eta*lambda*mu*phi-delta*eta*mu^3-delta*eta*mu^2*phi-delta*eta*mu^2*theta-delta*lambda*mu^3-delta*lambda*mu^2*phi-delta*mu^4-delta*mu^3*phi-delta*mu^3*theta-eta*lambda*mu^3-eta*lambda*mu^2*phi-eta*mu^4-eta*mu^3*phi-eta*mu^3*theta-lambda*mu^4-lambda*mu^3*phi-mu^5-mu^4*phi-mu^4*theta)

(2)

 

Download mw.mw

As to your question "Or solve by hand?": I don't think you would want to do that.

General advice: It is important to distinguish between the assignment operator ":=" and the equality operator "=".  The primary purpose of the assignment operator ":=",, is to define labels for expressions to make it easier to refer to them later.  Clearly you don't intend ω as a mere label, rather, you intend ω to enter as a variable in your equations.

So this is what you need to do:

rels1 := diff(phi(t),t) + diff(beta(t),t) = omega(t);
rels2 := diff(rels1, t);
simplify(myvector, {rels1, rels2});

Note how rels1 and rels2 serve as labels for their respective equations.

 

Let's begin by looking at the expression which is being summed:

1/r*sin(r*Pi*x/2)*exp(-lambda^2*t);

sin((1/2)*r*Pi*x)*exp(-lambda^2*t)/r

(1)

What is lambda?  I suppose that you know enough about the heat equation to know

that lambda is supposed to be Pi*r/2, so let's fix it:

subs(lambda=Pi*r/2, (1));

sin((1/2)*r*Pi*x)*exp(-(1/4)*Pi^2*r^2*t)/r

(2)

But r is supposed to range over the odd integers, therefore we replace it by 2*r-1:

subs(r=2*r-1, (2));

sin((1/2)*(2*r-1)*Pi*x)*exp(-(1/4)*Pi^2*(2*r-1)^2*t)/(2*r-1)

(3)

Now we form the desired sum (note the cappital letter S):

40/Pi * Sum((3), r=1..infinity);

40*(Sum(sin((1/2)*(2*r-1)*Pi*x)*exp(-(1/4)*Pi^2*(2*r-1)^2*t)/(2*r-1), r = 1 .. infinity))/Pi

(4)

This is what you wish to call u(x,t), so let's do it:

u := unapply((4), [x,t]);

proc (x, t) options operator, arrow; 40*(Sum(sin((1/2)*(2*r-1)*Pi*x)*exp(-(1/4)*Pi^2*(2*r-1)^2*t)/(2*r-1), r = 1 .. infinity))/Pi end proc

(5)

To plot u(x,t), we limit the summation to N terms:

N := 50: eval(u(x,t), infinity=N);

40*(Sum(sin((1/2)*(2*r-1)*Pi*x)*exp(-(1/4)*Pi^2*(2*r-1)^2*t)/(2*r-1), r = 1 .. 50))/Pi

(6)

Now we are ready to plot:

plot3d((6), x=0..2, t=0..1, style=patchcontour);

 

 

 

 

Download mw.mw

restart;
f:=n->piecewise(n=0,1,n>=1,sum('f(k)',k=0..n-1));
seq(f(i), i=0..10);
        1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512

You have

plot(l, ....);

What is l? It is not defined as far as I can tell.  Perhaps you wanted to say

plot(x[1], ....);

First 39 40 41 42 43 44 45 Last Page 41 of 58