Rouben Rostamian

MaplePrimes Activity


These are answers submitted by Rouben Rostamian

I don't see why you would want to modify the standard Laplace transform code since you can reduce your integrals to the usual Laplace transform through a change of variables.

The integral int(f(u*t)*exp(-s*t), t=0..infinity) after the change of variables u*t=tau takes the form

(1/u)*int(f(tau)*exp(-s/u*tau), tau=0..infinity),

which is the same thing as

(1/u)*laplace(f(tau), tau, s/u).

Similarly, the integral int(f(u*t)*exp(-t), t=0..infinity) changes over to

(1/u)*laplace(f(tau),tau,1/u).

Whether you want to to do these changes of variables or not depend on your ultimate goal.  In practice, both of those integrals may be computed without resort to any changes of variables:

int(f(u*t)*exp(-s*t), t=0..infinity) = laplace(f(u*t), t, s);

int(f(u*t)*exp(-t), t=0..infinity) = laplace(f(u*t), t, 1);

I don't quite understand what it is that you want to do.  The graphs you have shown are those of y versus psi.  You don't need the velocity V or the DEtools package to produce those.  You will obtain the first of your three diagrams if you replace your plot() command with

R := 0.2;
P := seq(
       [psi, y, y=0..1],
     J in As);
plot([P],
  color=[green,red,blue],
  linestyle=[solid,dash,dot],
  thickness=3,
  axes=boxed,
  labels=['psi','y'],
  legend=[seq(J=j, j in As)],
  title=sprintf("y vs psi at R = %g", R)
 );

Change R=2.0 to 5.0 or 6.5 to obtain the other two diagrams.  By the way, the three diagrams that you have shown are identical.   They would be different  if they were done correctly.

 

Introduce velocities as new variables and convert your second order differential equations to first order.  Then you will have a system of four first order differential equations to solve, and events on velocities may be specified in a straightforward way.  See the attached worksheet.  Here is what we get:

Worksheet here: mw.mw

This plots p versus w:

w := 1560*Pi*(9*z-(1/3)*(z-2.7)^3*((1/3)*2.7^3));

plots[odeplot](Sol, [w, p(z)], z = 0 .. 26, color = green);

As acer has noted, this may be a bug.  Or perhaps this is due to a not-so-well documented requirement in Eigenvectors().  I keep a copy of the old Maple 11 for testing purposes.  Running your problem in Maple 11 gives an error message which provides a clue:

> LinearAlgebra:-Eigenvectors(A);

Error, (in LinearAlgebra:-LA_Main:-Eigenvectors) expecting either Matrices of rationals, rational functions, radical functions, algebraic numbers, or algebraic functions, or Matrices of complex(numeric) values

"Expecting rationals"?  So, we change your 0.991 and 0.997 to 991/1000 and 997/1000, and voila, we get an answer! This works  equally well on Maple 11 and Maple 18.

 

   

 

It would be good if you showed at least some attempt toward solving your own homework problem.  Write down the equations.  Write down the initial and boundary conditions.  These have nothing to do with Maple, so "im totally new to maple" is not a good excuse.  Then try to code and solve your equations in Maple.  If you run into problems with Maple, then say where you are stuck and you will receive help.  But it's not fair to ask someone (not "some1") else to do your homework problem from scratch.

zohre your equations are badly scaled.  You have, instance, 

Have in mind that sinh() and cosh() are more or less like the exponential function.  Does raising e to the power of 100 make any sense in regard to the problem that you wish to analyze?  Probably not.

You need to rescale your variables so that they take values within a resonably "normal" range.  You wouldn't express the distance between Lodon and Paris in micrometers.  You wouldn't express the size of your computer screen in kilometers.  For the same reason, you shouldn't express your x(t) and y(t) in units that lead to strange coefficients that you have shown.

Try, as an exercise, the following rescaled version of your equations:


eq1 := diff(x(t),t) = sinh(x(t)+y(t)) - x(t)*cosh(x(t)+y(t));
eq2 := diff(y(t),t) = sinh(-x(t)+y(t)) - y(t)*cosh(-x(t)+y(t));
dsol := dsolve({eq1, eq2, x(0)=0, y(0)=1}, {x(t), y(t)}, numeric, range=0..10);

plots[odeplot](dsol, [t,x(t)]);

plots[odeplot](dsol, [t,y(t)]);

plots[odeplot](dsol, [x(t), y(t)]);

Do you know how to do a phase portrait when the nullclines are straght lines?  The case of curved nullclines is no different.

The variable named soln in your worksheet contains the PDE's solution.  You may examine the numerical values of the variables or plot them.  See the help page on pdsolve/numeric for details.  Here are a few examples:

soln:-plot(phi(y,t), t=1);

soln:-plot(u(y,t), t=1);

soln:-plot(u(y,t), t=0..1, y=1);

soln:-plot3d(u(y,t),t=0..1, y=0..1);

u_at_1 := soln:-value(u(y,t), t=1);
u_at_1(0.3);  # this produces the value of u(0.3, 1)

If x(t) = 2 + t + t^2, then x'(t) = 1 + 2*t.  Certainly that isn't equal to y(t) = 1 + 2t + 0.5t^2.  Did you mean to write something else?

Need to be patient when executing the code below; it takes several minutes to complete. There must be ways to speed it up but I haven't bothered.

restart;
with(plots):
u := Heaviside;
f := t -> u(t) - u(t-2);
g := t -> t*u(t) - (t-4)*u(t-4);
h := unapply(int(f(t-q)*g(q), q=-10..t), t);
frames := seq(display([
    plot(g(s), s=-10..10, color=blue),
    plot(f(t-s), s=-10..10, color=blue),
    plot(h(s), s=-10..t, color=red, thickness=3)
]), t=-7..9, 0.4);
display([frames], insequence=true);

I have not looked at the details of Maple's series method for solving ODEs, so there may be a way to do what you want.  Consult Maple's documentation on that topic.  My preliminary assessment is that the series method expresses the solution as an infinite sum of nonnegative powers of the independent variable.  Your two differential equations have eta and r in the denominators.  Maple determines, therefore, that the solution cannot be expressed in a series with nonnegative powers.

 

The transform() function used in Example 1 is defined in the plottools package.  Load it with

with(plottools);

and all will be right.

Just looking through you code, I see the following symbols which are undefined:

dsnumsort()

C1

V1

C2

V2

What do you mean by these?

for i in [3,-2,5,12] do
    print(i^2);
end do;

First 53 54 55 56 57 58 Page 55 of 58