Robert Israel

6577 Reputation

21 Badges

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

MaplePrimes Activity


These are replies submitted by Robert Israel

Are we using the same deq and ci?  What version of Maple are you using?

 deq := diff(x(t), t, t)+2*(diff(x(t), t))-5*x(t) = 0;
 ci := x(0) = 1, (D(x))(0) = -2;
 p:= dsolve({deq,ci},x(t),numeric, range=0..5, output= Array([0.1*j $ j=0..50]));
 

I tried several releases of Maple, and never got a warning.  In Maple 8 to Maple 10, something strange happened to the last row of the output:

> p[2,1][50..51, 1..3];

 [4.90000000000000034    359.488895369929650    521.075466325794764]
         [                                                                 ]
         [         ?                      ?                      ?         ]
 

In Maple 11 and 12, the result of this is

         [4.90000000000000034    359.488895369930104    521.075466325795332]
         [                                                                 ]
         [        5.             415.562142095951117    602.353062345626086]
 

Ah, I think I see the problem.  In addition to the procedure itself that dsolve returns, it seems you need to save `dsolve/numeric/data/modules` (or at least the part of it that your procedure references).

> P:= dsolve(....);
  save P, `dsolve/numeric/data/modules`, "dsolveoutput.txt";

Then...

> restart;
   read "dsolveoutput.txt";
   plots[odeplot](P, ...);

 

Ah, I think I see the problem.  In addition to the procedure itself that dsolve returns, it seems you need to save `dsolve/numeric/data/modules` (or at least the part of it that your procedure references).

> P:= dsolve(....);
  save P, `dsolve/numeric/data/modules`, "dsolveoutput.txt";

Then...

> restart;
   read "dsolveoutput.txt";
   plots[odeplot](P, ...);

 

I'm not sure what exactly goes in the "so on", but try

> M := Matrix(4,5):
   M(1.., 1):= <a,b,c,d>:
   for j from 2 to 5 do
      M(1.., j) := <0,0,0,1>
  end do:

I'm not sure what exactly goes in the "so on", but try

> M := Matrix(4,5):
   M(1.., 1):= <a,b,c,d>:
   for j from 2 to 5 do
      M(1.., j) := <0,0,0,1>
  end do:

See the help page ?LinearAlgebra,General,MVshortcut

Yes, ^%T is transpose.  You could avoid it, though, by using

> <M,<0|0|0|1>>;

"|" separates columns, "," separates rows, so <0,0,0,1> is a column vector and <0|0|0|1> is a row vector.

See the help page ?LinearAlgebra,General,MVshortcut

Yes, ^%T is transpose.  You could avoid it, though, by using

> <M,<0|0|0|1>>;

"|" separates columns, "," separates rows, so <0,0,0,1> is a column vector and <0|0|0|1> is a row vector.

It looks to me like this was a bug that only affected Maple 9.  Your Maple 11 should do this correctly.

It looks to me like this was a bug that only affected Maple 9.  Your Maple 11 should do this correctly.

Indeed, in this example the first derivative doesn't exist at x=0.  Going to the next interval, at x=1 the first derivative will be continuous but the second derivative will not exist, and in general at x=n you'll have n continuous derivatives.  But my next example, starting with a smooth function that is 0 on [0,1/3] union [2/3, 1], is C_infinity on the whole real line.

Indeed, in this example the first derivative doesn't exist at x=0.  Going to the next interval, at x=1 the first derivative will be continuous but the second derivative will not exist, and in general at x=n you'll have n continuous derivatives.  But my next example, starting with a smooth function that is 0 on [0,1/3] union [2/3, 1], is C_infinity on the whole real line.

Don't trust graphs too much: the picture would also seem to indicate a limit of 1 for my counterexample

f:= abs(x^2 - y)^(x^2 + y^2)

 

Don't trust graphs too much: the picture would also seem to indicate a limit of 1 for my counterexample

f:= abs(x^2 - y)^(x^2 + y^2)

 

It could be a solution for x in (0,1), if f(t) = t^3 - 2* t^2 - 3* t for t in [-1,0).

> F[1]:= x -> x^3 - 2*x^2;
   F[0]:= t -> t^3 - 2*t^2 - 3*t;

> D(F[1])(x) = normal(F[1](x) - F[0](x-1));

3*x^2-4*x = 3*x^2-4*x

 

It could be a solution for x in (0,1), if f(t) = t^3 - 2* t^2 - 3* t for t in [-1,0).

> F[1]:= x -> x^3 - 2*x^2;
   F[0]:= t -> t^3 - 2*t^2 - 3*t;

> D(F[1])(x) = normal(F[1](x) - F[0](x-1));

3*x^2-4*x = 3*x^2-4*x

 

First 114 115 116 117 118 119 120 Last Page 116 of 187