Robert Israel

6577 Reputation

21 Badges

18 years, 218 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are replies submitted by Robert Israel

What I am doing with dchange is a change of variables Pm = 1/u - 1, making the integral for Pm from 0 to infinity into an integral for u from 0 to 1, which should be much quicker to compute.

Exactly as you would use the L from the other solutions.  Although, as Joe said, it is slightly different, () -> `*`(3, args) and x -> 3*x have the same effect if called with a single argument.

According to the definition in ?type,algebraic:

An expression is of type algebraic if it is one of the following types:
complex type/extended_numeric `+` `*` `^`
function indexed name SDMPolynom
SERIES series type/uneval zppoly
 

[x]+1 is certainly of type `+`, and therefore it is of type algebraic.  On the other hand, [x] is not any of the listed types; it is a list.

The question of whether [x]+1 does anything useful as an expression is beside the point, as far as type is concerned.

 

According to the definition in ?type,algebraic:

An expression is of type algebraic if it is one of the following types:
complex type/extended_numeric `+` `*` `^`
function indexed name SDMPolynom
SERIES series type/uneval zppoly
 

[x]+1 is certainly of type `+`, and therefore it is of type algebraic.  On the other hand, [x] is not any of the listed types; it is a list.

The question of whether [x]+1 does anything useful as an expression is beside the point, as far as type is concerned.

 

For those who don't have Maple 11, you can try something like this for polynomial curves such as these.

> p1:= x^2 + y^2 + 3*z^2 - 1;
   p2:= 2*x + 3*y + z;
   r := resultant(p1, p2, z);

This will eliminate z from the two equations p1 = 0 and p2 = 0, producing a polynomial in x and y.  If you want to plot the curve in 3d, you need the z value in terms of x and y, which you get in this case by solving p2 for z.

> with(plots):
   XYplot:= implicitplot(r, x=-1..1, y=-1..1):
  zxy:= solve(p2=0,z);
  display(plottools[transform](unapply([x,y,zxy],(x,y)))
     (XYplot),axes=box);

For more complicated cases, you may try something like this.

> q1:= x*y*z + x^2 + y^2 + z^2 - 4;
   q2:= x*y^3 + y*z^3 + z*x^3 - 3;
   r := resultant(q1, q2, z);
   q3:= rem(q2, q1, z);

Note that the degree of q3 in z must be less than that of q1.  In this case that degree is 1, so we can solve q3 for z.

> zxy:= solve(q3=0, z); 
   XYplot:= implicitplot(r, x=-4..4, y=-4..4):
   display(plottools[transform](unapply([x,y,zxy],(x,y)))
       (XYplot),axes=box);

 

 

Try intersectplot in the plots package (this command is not available before Maple 11).

> plots[intersectplot](x^2+y^2+3*z^2=1, 2*x+3*y+z=0, x=-1..1, y=-1..1, z=-1..1);

 

 

Yes, these work fine.

Yes, these work fine.

It would give you that, except...

To get the phase portrait of a second order DE, you want to convert it to a system of two first order DE's.  You could use convertsys, but in a case such as this it's simpler to do it "by hand".Thus something like this would normally work:

with(DEtools);
de:= diff(y(t), t, t) =...;
sys:= {diff(y(t),t)=v(t), diff(v(t),t) = 
       subs(diff(y(t),t)=v(t), rhs(de))};
phaseportrait(sys, [y(t), v(t)], t = 0 .. 10, 
      [[y(0)=1, v(0)=0]], y=-5..5, v=-5..5);

Unfortunately, it seems that phaseportrait doesn't like functions involving "piecewise" (if you want the field arrows).

It would work if you replaced the "piecewise" by something else, e.g. like this:

de:= diff(y(t),t,t) = tanh(100*(y(t)+diff(y(t),t)));

 Or you can use the option arrows = none in the phaseportrait command (which will only give you solution curves) - except that the discontinuity in your DE will give the solver trouble when a solution curve hits it.

 

 

 

It would give you that, except...

To get the phase portrait of a second order DE, you want to convert it to a system of two first order DE's.  You could use convertsys, but in a case such as this it's simpler to do it "by hand".Thus something like this would normally work:

with(DEtools);
de:= diff(y(t), t, t) =...;
sys:= {diff(y(t),t)=v(t), diff(v(t),t) = 
       subs(diff(y(t),t)=v(t), rhs(de))};
phaseportrait(sys, [y(t), v(t)], t = 0 .. 10, 
      [[y(0)=1, v(0)=0]], y=-5..5, v=-5..5);

Unfortunately, it seems that phaseportrait doesn't like functions involving "piecewise" (if you want the field arrows).

It would work if you replaced the "piecewise" by something else, e.g. like this:

de:= diff(y(t),t,t) = tanh(100*(y(t)+diff(y(t),t)));

 Or you can use the option arrows = none in the phaseportrait command (which will only give you solution curves) - except that the discontinuity in your DE will give the solver trouble when a solution curve hits it.

 

 

 

I think that last line should be

> transform((x,y,z) -> [x,y])(FG);

 

BUG1 is a nice example of how Integration by Parts does not always help. Perhaps the help page should include a disclaimer: the Hint is not guaranteed to be helpful.

When I tried them (using Firefox under Windows XP), the audio in these two cut out after about 5 seconds, but the video continued OK.

Habit, I guess.  student[changevar] usually works quite well, but the student package is supposed to be deprecated, and I'm not that familiar with IntegrationTools yet.  Not to mention that those still using Maple 9.5 wouldn't have IntegrationTools.

Habit, I guess.  student[changevar] usually works quite well, but the student package is supposed to be deprecated, and I'm not that familiar with IntegrationTools yet.  Not to mention that those still using Maple 9.5 wouldn't have IntegrationTools.

First 148 149 150 151 152 153 154 Last Page 150 of 187