Doug Meade

 

Doug

---------------------------------------------------------------------
Douglas B. Meade <><
Math, USC, Columbia, SC 29208 E-mail: mailto:meade@math.sc.edu
Phone: (803) 777-6183 URL: http://www.math.sc.edu

MaplePrimes Activity


These are replies submitted by Doug Meade

Did your signature appear to be updated on your settings page right after you clicked save? No. As I wrote in my original post, the response did say that the change had been saved.

My theory is that your browser had the signature cached, so when you went to create a post, it was using the old signature. Only once the cache timed out, did the new signature appear. Possible. But, wouldn't I see the correct signature when I tried to create a post? And, wouldn't my posts show the updated signature?

Your theory would seem plausible only if the cache contained the individual pieces from which the MaplePrimes windows are created. Is this how this works?

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/

The requirement that the DE be a system of first-order DEs is based on the classical approach to higher-order equations: rewrite it as a system of first-order equations. As Robert wrote, this should be supported in the implementation of DEplot. In fact, the convertsys command in the DEtools package should be useful. While this is somewhat helpful in this case, it is not clear (to me) how to automatically convert the output from convertsys into a form that can be used in DEplot.

To further support the original request for support of higher-order DEs, I note that the odeplot command in the plots package does all the use of derivatives and other expressions involving the solutions. It would seem (to me) that something similar should be reasonable for DEplot. I hope someone will undertake this project, and will share their enhancement with Maplesoft.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/

The requirement that the DE be a system of first-order DEs is based on the classical approach to higher-order equations: rewrite it as a system of first-order equations. As Robert wrote, this should be supported in the implementation of DEplot. In fact, the convertsys command in the DEtools package should be useful. While this is somewhat helpful in this case, it is not clear (to me) how to automatically convert the output from convertsys into a form that can be used in DEplot.

To further support the original request for support of higher-order DEs, I note that the odeplot command in the plots package does all the use of derivatives and other expressions involving the solutions. It would seem (to me) that something similar should be reasonable for DEplot. I hope someone will undertake this project, and will share their enhancement with Maplesoft.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/

This is a good question. Sometimes you (get lucky and) know something about the ODE that tells you the "time" scale for the problem. But, in most problems, I would say the choice of the time interval is a matter of trial and error. Now, if you want only the phase field then the time interval is of no consequence (but must be present in the call to DEplot). It's only when you want to see solution curves that time intervals become important. Sometimes it might be necessary to create several separate plots. If you want to overlay several plots, use the display command from the plots package.

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/

This is a good question. Sometimes you (get lucky and) know something about the ODE that tells you the "time" scale for the problem. But, in most problems, I would say the choice of the time interval is a matter of trial and error. Now, if you want only the phase field then the time interval is of no consequence (but must be present in the call to DEplot). It's only when you want to see solution curves that time intervals become important. Sometimes it might be necessary to create several separate plots. If you want to overlay several plots, use the display command from the plots package.

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/

Wouldn't you know. As soon as I post my comment, the edit is actually saved. My signature is now updated.

While it might be case closed on this specific incident, the fact remains that there appears to be some sort of a problem with updating user account settings.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/

While you cannot create a plot without giving a specific value to epsilon, it is possible to create an animation that shows how the direction field changes as epsilon changes.

I answered a similar question just last week (but am too lazy to search for the link). Instead, here is the code I would use for this example:

with( DEtools ):
with( plots ):
ODE := diff( x(t), t$2 ) + epsilon*x(t) = 0;
                     / d  / d      \\                   
                     |--- |--- x(t)|| + epsilon x(t) = 0
                     \ dt \ dt     //                   

SYS := [ diff( y(t), t ) + epsilon*x(t) = 0,
         diff( x(t), t )                = y(t) ];
              [/ d      \                      d             ]
              [|--- y(t)| + epsilon x(t) = 0, --- x(t) = y(t)]
              [\ dt     /                      dt            ]

animate( DEplot,
           [ SYS, [x(t),y(t)], t=0..1, x=-3..3,
             y=-3..3, scene=[x(t),y(t)] ],
         epsilon=0..1, frames=11 );

You can include solution curves by adding the initial data to the list on lines 2 and 3 in my code above:

animate( DEplot,
           [ SYS, [x(t),y(t)], t=0..10, x=-3..3,
             y=-3..3, scene=[x(t),y(t)],
             [[x(0)=1,y(0)=0],[x(0)=2,y(0)=0]] ],
         epsilon=0..1, frames=11 );

(I include no plots here because the static pictures are essentially the same as the ones in my previous post, and the animation does not work on MaplePrimes.)

See the online help for the animate command (in the plots package) for more options. I like the trace= option.

I hope this is helpful,

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/

While you cannot create a plot without giving a specific value to epsilon, it is possible to create an animation that shows how the direction field changes as epsilon changes.

I answered a similar question just last week (but am too lazy to search for the link). Instead, here is the code I would use for this example:

with( DEtools ):
with( plots ):
ODE := diff( x(t), t$2 ) + epsilon*x(t) = 0;
                     / d  / d      \\                   
                     |--- |--- x(t)|| + epsilon x(t) = 0
                     \ dt \ dt     //                   

SYS := [ diff( y(t), t ) + epsilon*x(t) = 0,
         diff( x(t), t )                = y(t) ];
              [/ d      \                      d             ]
              [|--- y(t)| + epsilon x(t) = 0, --- x(t) = y(t)]
              [\ dt     /                      dt            ]

animate( DEplot,
           [ SYS, [x(t),y(t)], t=0..1, x=-3..3,
             y=-3..3, scene=[x(t),y(t)] ],
         epsilon=0..1, frames=11 );

You can include solution curves by adding the initial data to the list on lines 2 and 3 in my code above:

animate( DEplot,
           [ SYS, [x(t),y(t)], t=0..10, x=-3..3,
             y=-3..3, scene=[x(t),y(t)],
             [[x(0)=1,y(0)=0],[x(0)=2,y(0)=0]] ],
         epsilon=0..1, frames=11 );

(I include no plots here because the static pictures are essentially the same as the ones in my previous post, and the animation does not work on MaplePrimes.)

See the online help for the animate command (in the plots package) for more options. I like the trace= option.

I hope this is helpful,

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/

I do not know a command that gives the "domain" of a function. Remember that, in general, Maple is working in the complex field. So, as far as Maple is concerned, there is nothing wrong with the logarithm of a negative number:

log( -3 );
                                ln(3) + I Pi

The singular and discont commands give the singularities and discontinuities of an expression. This can be useful when trying to find the domain, but it's only a small step towards actually finding the "domain" of a function.

Even if Maple could find the domain of a function, I do not believe this is an effective use of the software. Many of the questions in the original post amount to testing the understanding of terminology and basic concepts. For this there is no reason to use software (computer or calculator).

Just my opinion,

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/
</

I do not know a command that gives the "domain" of a function. Remember that, in general, Maple is working in the complex field. So, as far as Maple is concerned, there is nothing wrong with the logarithm of a negative number:

log( -3 );
                                ln(3) + I Pi

The singular and discont commands give the singularities and discontinuities of an expression. This can be useful when trying to find the domain, but it's only a small step towards actually finding the "domain" of a function.

Even if Maple could find the domain of a function, I do not believe this is an effective use of the software. Many of the questions in the original post amount to testing the understanding of terminology and basic concepts. For this there is no reason to use software (computer or calculator).

Just my opinion,

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/
</

Yes, the two integrals are equal. The question is easiest to explain (at an elementary level) by thinking in terms of (signed or net) areas. This becomes easier to do when you think about each term individually. Look at the integrals of a*x^2, b*x, and c over [-5,5] and over [0,5] to see if you can't figure this out for yourself.

This is a nice problem.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/
</

Yes, the two integrals are equal. The question is easiest to explain (at an elementary level) by thinking in terms of (signed or net) areas. This becomes easier to do when you think about each term individually. Look at the integrals of a*x^2, b*x, and c over [-5,5] and over [0,5] to see if you can't figure this out for yourself.

This is a nice problem.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/
</

The first problem with the initial poster's attempt is the incorrect usage of D. It is possible to use diff, as suggested in the previous post, but here is how this equation should be entered with D:

ode:= D(D(y))(t)- u*(1-(y(t)^2))*D(y)(t) + y(t)=0;
ics:= y(0)=0.2, D(y)(0)=0;

Next, the second argument to dsolve needs to be the unknown function, in this case y(t):

dsolve({ode,ics},y(t));

Maple is unable to solve this equation exactly. But, it appears you are looking for a numeric solution. So, we use:

Y := dsolve({ode,ics},y(t),numeric);

This returns a Maple procedure that will return an approximate solution to the initial value problem. For example,

Y(0);
              [                                  d           ]
              [t = 0., y(t) = 0.20000000000000, --- y(t) = 0.]
              [                                  dt          ]

For any non-zero value of t, Maple needs a value for u to obtain the solution.

Y(1);
Error, (in Y) global 'u' must be assigned to a numeric value before obtaining a solution

Following this advise, you can assign a value to u (u := 3;). Or, you can avoid a global assignment by using subs:

subs(u=3,Y)(1);
   [                                       d                             ]
   [t = 1., y(t) = -0.114091806521692929, --- y(t) = -1.05459156309341574]
   [                                       dt                            ]

You will need to see the online help for numerical solutions to ODEs (?dsolve,numeric) for additional information on the different output you can obtain from dsolve and the ways to use this output.

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/
</

The first problem with the initial poster's attempt is the incorrect usage of D. It is possible to use diff, as suggested in the previous post, but here is how this equation should be entered with D:

ode:= D(D(y))(t)- u*(1-(y(t)^2))*D(y)(t) + y(t)=0;
ics:= y(0)=0.2, D(y)(0)=0;

Next, the second argument to dsolve needs to be the unknown function, in this case y(t):

dsolve({ode,ics},y(t));

Maple is unable to solve this equation exactly. But, it appears you are looking for a numeric solution. So, we use:

Y := dsolve({ode,ics},y(t),numeric);

This returns a Maple procedure that will return an approximate solution to the initial value problem. For example,

Y(0);
              [                                  d           ]
              [t = 0., y(t) = 0.20000000000000, --- y(t) = 0.]
              [                                  dt          ]

For any non-zero value of t, Maple needs a value for u to obtain the solution.

Y(1);
Error, (in Y) global 'u' must be assigned to a numeric value before obtaining a solution

Following this advise, you can assign a value to u (u := 3;). Or, you can avoid a global assignment by using subs:

subs(u=3,Y)(1);
   [                                       d                             ]
   [t = 1., y(t) = -0.114091806521692929, --- y(t) = -1.05459156309341574]
   [                                       dt                            ]

You will need to see the online help for numerical solutions to ODEs (?dsolve,numeric) for additional information on the different output you can obtain from dsolve and the ways to use this output.

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/
</

You would do this the same way you would enter it on a calculator (with a semi-colon added to the end):

(4*a^4-2*a^3+8*a-5) / (3*x^2-1);

But, there is nothing to do in this case.

If you meant to have the same variable in the numerator and denominator, then maybe you are interested in putting this quotient into "proper form" (with long division). If so, I do not know of a single command to do just this. (Maple developers: Hint, Hint! This would be a useful addition for students.)

Here are a couple of ideas about how you might get this information:

q := (4*a^4-2*a^3+8*a-5) / (3*a^2-1);
                               4      3          
                            4 a  - 2 a  + 8 a - 5
                            ---------------------
                                     2           
                                  3 a  - 1       
Q := quo(numer(q),denom(q),a):
R := rem(numer(q),denom(q),a):
q1 := Q + R/denom(q);
                                           41   22  
                                         - -- + -- a
                        4  2   2     4     9    3   
                        - a  - - a + - + -----------
                        3      3     9       2      
                                          3 a  - 1  
q2 := convert(q,parfrac,a);
                        4  2   2     4    -41 + 66 a 
                        - a  - - a + - + ------------
                        3      3     9     /   2    \
                                         9 \3 a  - 1/

It is pretty easy to see (in this case) that these two forms are equivalent.

Based on your question, I do not know your level of mathematical knowledge. The second approach, which finds the partial fraction decomposition, might be a topic you have not yet seen. Even if you have seen partial fractions, you need to realize that this approach will give a very different looking answer if the denominator factored (without square roots). For example:

q := (4*a^4-2*a^3+8*a-5) / (a^2-1);
                               4      3          
                            4 a  - 2 a  + 8 a - 5
                            ---------------------
                                    2            
                                   a  - 1        
Q := quo(numer(q),denom(q),a):
R := rem(numer(q),denom(q),a):
q1 := Q + R/denom(q);
                             2             -1 + 6 a
                          4 a  - 2 a + 4 + --------
                                             2     
                                            a  - 1 
convert( q, parfrac, a );
                      2                 5           7    
                   4 a  - 2 a + 4 + --------- + ---------
                                    2 (a - 1)   2 (a + 1)

I hope this has been helpful,

Doug

---------------------------------------------------------------------
Douglas B. Meade
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/
First 47 48 49 50 51 52 53 Last Page 49 of 76