Robert Israel

6522 Reputation

21 Badges

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

MaplePrimes Activity


These are replies submitted by Robert Israel

Because implicitplot allows the range for the second variable to depend on the first, but not vice versa.

> display(plottools[reflect](%, [0,0],[1,1]),labels=[r,x]);

 

> display(plottools[reflect](%, [0,0],[1,1]),labels=[r,x]);

 

Since you wrote: dx/dt = rx - sin(x), I guess you're looking for the equilibrium solutions of this differential equation, which (for any r) are the solutions x of r*x - sin(x) = 0.  You also may want to distinguish between stable and unstable equilibria: the equilibrium solution r of the differential equation dx/dt = f(x) is stable if f'(x) < 0, and unstable if f'(x) > 0.  In the following, the stable equilibria are green and the unstable ones are red.
 


> f := (r, x) -> r*x - sin(x);
   with(plots):
   display([implicitplot(f(r,x),x = -10 .. 10, r=-2 .. cos(x), colour=green, axes=box, gridrefine=3, crossingrefine=3),
            implicitplot(f(r,x),x = -10 .. 10, r=cos(x) .. 2,  colour=red,   axes=box, gridrefine=3, crossingrefine=3)]); 

 

Since you wrote: dx/dt = rx - sin(x), I guess you're looking for the equilibrium solutions of this differential equation, which (for any r) are the solutions x of r*x - sin(x) = 0.  You also may want to distinguish between stable and unstable equilibria: the equilibrium solution r of the differential equation dx/dt = f(x) is stable if f'(x) < 0, and unstable if f'(x) > 0.  In the following, the stable equilibria are green and the unstable ones are red.
 


> f := (r, x) -> r*x - sin(x);
   with(plots):
   display([implicitplot(f(r,x),x = -10 .. 10, r=-2 .. cos(x), colour=green, axes=box, gridrefine=3, crossingrefine=3),
            implicitplot(f(r,x),x = -10 .. 10, r=cos(x) .. 2,  colour=red,   axes=box, gridrefine=3, crossingrefine=3)]); 

 

What do you mean by "the vector field for" a function?  And what is the parameter for the animation?

What do you mean by "the vector field for" a function?  And what is the parameter for the animation?

By singularity I didn't mean it necessarily goes to infinity.  "Collapse of the wave" or formation of a shock would be enough to defeat the numerical solver, I think.

By singularity I didn't mean it necessarily goes to infinity.  "Collapse of the wave" or formation of a shock would be enough to defeat the numerical solver, I think.

Something like this?

> M:=pdsolve(diff(u(x,t),t)=diff(u(x,t),x,x),
     {u(x,0)=10, u(0,t)=0, u(1,t)=0},numeric, timestep=0.01);
> M:-plot3d(u(x,t),x=0..1,t=0..0.5,axes=box,shading=zhue,
     orientation=[90,180]);


Something like this?

> M:=pdsolve(diff(u(x,t),t)=diff(u(x,t),x,x),
     {u(x,0)=10, u(0,t)=0, u(1,t)=0},numeric, timestep=0.01);
> M:-plot3d(u(x,t),x=0..1,t=0..0.5,axes=box,shading=zhue,
     orientation=[90,180]);


I tried this:

> de:= diff(diff(y(x),x),x) = .1239104454e-3*y(x)^4-938417.2491
     +428020.2082*(.6+.874e-1*(y(x)-295)^(1/6))^2*(y(x)-295);

> ude:= simplify(eval(de, y(x) = 295 + u(x)^6)) assuming u(x) > 0;

> dsolve([ude, u(0) = (328-295)^(1/6), D(u)(0.5)=0], numeric);

Error, (in dsolve/numeric/bvp) Newton iteration is not converging
 

But this worked:

> dsolve([ude, u(0)=(328-295)^(1/6), D(u)(0.5)=0],numeric,
     initmesh=1000);

  proc(x_bvp) ... end proc
 

It seems there is a "boundary layer" with very rapid change near x=0, and y is very close to 295 everywhere else.
 

> plots[odeplot](%,[x,295+u(x)^6],x=0..0.05, labels=[x,y(x)]);

With time[real] you get the time as you would measure it on a clock.  This may be influenced by whatever other things your computer is doing besides running Maple. 
CPU time, as measured by time without the [real], may be a better indication of the performance of your procedure.

 

With time[real] you get the time as you would measure it on a clock.  This may be influenced by whatever other things your computer is doing besides running Maple. 
CPU time, as measured by time without the [real], may be a better indication of the performance of your procedure.

 

In particular I'm thinking of problems introduced by implicit multiplication:
x y means x*y, but xy is a single name; x(y+z) is the function x applied to y+z, while
sin (x) is sin*x.  See e.g.
www.mapleprimes.com/forum/how-do-i-get-rid-of-unable-to-match-delimiters-error-message (starting with Doug Meade's first comment) and
www.mapleprimes.com/forum/solvingvariable.

 

First 59 60 61 62 63 64 65 Last Page 61 of 187