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

The linalg package has been replaced by the LinearAlgebra package. This will work nicely with VectorCalculus.

with( LinearAlgebra ):
with( VectorCalculus ):
M := RandomMatrix(3,3)/100.:
V := t -> <t^2, 3*t, t^3>;
v := unapply( M.V(t), t ):

a := D(v):
a(t);
a(5);

Note the improved syntax for matrix multiplication that is available with LinearAlgebra.

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.ed

Maple's random numbers are not completely random. In fact, Maple generates the same sequence of random numbers every time you use it. To force Maple to generate a new set of random numbers, it's necessary to "re-seed the random number generator"; this is done with the randomize command. (See ?rand and ?randomize in Maple's online help.)

The first block of code produces the same result because you are also executing restart every time. If you remove the restart from this block of code, you'll see that the results do change. (But, if you pay close attention, you'll see that you get the same sequence of results after executing restart.)

The two blocks of code should be independent.

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.ed

Maple's random numbers are not completely random. In fact, Maple generates the same sequence of random numbers every time you use it. To force Maple to generate a new set of random numbers, it's necessary to "re-seed the random number generator"; this is done with the randomize command. (See ?rand and ?randomize in Maple's online help.)

The first block of code produces the same result because you are also executing restart every time. If you remove the restart from this block of code, you'll see that the results do change. (But, if you pay close attention, you'll see that you get the same sequence of results after executing restart.)

The two blocks of code should be independent.

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.ed

I admitted as much. How you select the dice to leave on the table for the re-rolls is critical. It's not too difficult to come up with a set of rules for this. I wanted to leave something for the original poster to do. I think the code that has been provided should be sufficient to allow the original poster to put together their own set of heuristics for the re-rolls.

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.ed

I admitted as much. How you select the dice to leave on the table for the re-rolls is critical. It's not too difficult to come up with a set of rules for this. I wanted to leave something for the original poster to do. I think the code that has been provided should be sufficient to allow the original poster to put together their own set of heuristics for the re-rolls.

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.ed

Think about it.

  1. Do you know what trunc does?
  2. Why did I divide by 10?
  3. What is the corresponding conversion for the intervals you want?

If you can answer these questions, then you can answer your question for yourself. You did say that this was an assignment, so I'm not going to just give you the answer.

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.ed

Think about it.

  1. Do you know what trunc does?
  2. Why did I divide by 10?
  3. What is the corresponding conversion for the intervals you want?

If you can answer these questions, then you can answer your question for yourself. You did say that this was an assignment, so I'm not going to just give you the answer.

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.ed

No.

You changed contourplot3d to implicitplot3d. The grid option will need 3 components. contours, filledregions, and coloring do not apply. Evem when these are fixed, you don't get anything of any apparent use.

What's more likely to be useful is a pair of implicitplot3d, one to plot several sheets where x*z-y^2 is positive and one with several sheets where x*z-y^2 is negative. Like this:

with( plots ):
eq := x*z-y^2;
implicitplot3d( [(eq=k/3)$k=0..10], x=-2..2, y=-2..2, z=-10..10, axes=boxed, color=[red,blue$10] );


implicitplot3d( [(eq=-k/3)$k=0..10], x=-2..2, y=-2..2, z=-10..10, axes=boxed, color=[red,blue$10] );


 

You'll have to see these for yourself. Rotate to see the structure from different angles. Change the features of the plot to change the transparency, resolution, coloring, lighting, ... as needed to see (or show) what you are trying to show.

I hope this is useful,

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.ed

No.

You changed contourplot3d to implicitplot3d. The grid option will need 3 components. contours, filledregions, and coloring do not apply. Evem when these are fixed, you don't get anything of any apparent use.

What's more likely to be useful is a pair of implicitplot3d, one to plot several sheets where x*z-y^2 is positive and one with several sheets where x*z-y^2 is negative. Like this:

with( plots ):
eq := x*z-y^2;
implicitplot3d( [(eq=k/3)$k=0..10], x=-2..2, y=-2..2, z=-10..10, axes=boxed, color=[red,blue$10] );

implicitplot3d( [(eq=-k/3)$k=0..10], x=-2..2, y=-2..2, z=-10..10, axes=boxed, color=[red,blue$10] );

 

You'll have to see these for yourself. Rotate to see the structure from different angles. Change the features of the plot to change the transparency, resolution, coloring, lighting, ... as needed to see (or show) what you are trying to show.

I hope this is useful,

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.ed

The suggestion that worksheets should be compressed is fine, but it's not realistic that a thousand students will remember to do this. In the current environment it is not really feasible to have students send (or receive) Maple worksheets via e-mail. It does interfere with the teaching that we are trying to do.

While this is not something that Maplesoft created, it is something I believe they can help to resolve.

  1. Support for automatic compression of worksheets would seem to be a nice step forward.
  2. I hope Maplesoft is in conversation with Microsoft to look for other solutions to this problem.

Hopefully, exchanges such as the one we are having in this forum are useful for Maplesoft, both internally and externally. I look forward to hearing about developments in this area, hopefully sooner rather than later.

WIth lots of hope,

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.ed

The suggestion that worksheets should be compressed is fine, but it's not realistic that a thousand students will remember to do this. In the current environment it is not really feasible to have students send (or receive) Maple worksheets via e-mail. It does interfere with the teaching that we are trying to do.

While this is not something that Maplesoft created, it is something I believe they can help to resolve.

  1. Support for automatic compression of worksheets would seem to be a nice step forward.
  2. I hope Maplesoft is in conversation with Microsoft to look for other solutions to this problem.

Hopefully, exchanges such as the one we are having in this forum are useful for Maplesoft, both internally and externally. I look forward to hearing about developments in this area, hopefully sooner rather than later.

WIth lots of hope,

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.ed

Ugly or not, it's not what you want it to be.

I see nothing wrong wi th your "hand" calculations.

But, there are problems with the way you have tried to use invlaplace. You replace s^2 with k, and then take the invlaplace with respect to s. This completely ignores the dependence on s that was in the denominator. If you want to completely replace s with sqrt(k), then I would do:

restart;
with( inttrans ):
YY := ln((s+5)/sqrt(s^2-4));
                                /    s + 5    \
                              ln|-------------|
                                |        (1/2)|
                                |/ 2    \     |
                                \\s  - 4/     /
Y := eval( YY, s=sqrt(k) );
                                /  (1/2)     \
                                | k      + 5 |
                              ln|------------|
                                |       (1/2)|
                                \(k - 4)     /

 

But, hitting this with invlaplace is only marginally better than what Maple could do with the original expression.

invlaplace( Y, k, t );
          /  / (1/2)    \      \   1                           -1 + exp(4 t)
invlaplace\ln\k      + 5/, k, t/ - - invlaplace(ln(k), k, t) + -------------
                                   2                                2 t     

It appears to me that invlaplace could be improved with regards to its knowledge of the fact that

laplace( (-t)^n * f(t), t, s ) = diff( laplace( f(t), t, s ), s$n );

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.ed

Ugly or not, it's not what you want it to be.

I see nothing wrong wi th your "hand" calculations.

But, there are problems with the way you have tried to use invlaplace. You replace s^2 with k, and then take the invlaplace with respect to s. This completely ignores the dependence on s that was in the denominator. If you want to completely replace s with sqrt(k), then I would do:

restart;
with( inttrans ):
YY := ln((s+5)/sqrt(s^2-4));
                                /    s + 5    \
                              ln|-------------|
                                |        (1/2)|
                                |/ 2    \     |
                                \\s  - 4/     /
Y := eval( YY, s=sqrt(k) );
                                /  (1/2)     \
                                | k      + 5 |
                              ln|------------|
                                |       (1/2)|
                                \(k - 4)     /

 

But, hitting this with invlaplace is only marginally better than what Maple could do with the original expression.

invlaplace( Y, k, t );
          /  / (1/2)    \      \   1                           -1 + exp(4 t)
invlaplace\ln\k      + 5/, k, t/ - - invlaplace(ln(k), k, t) + -------------
                                   2                                2 t     

It appears to me that invlaplace could be improved with regards to its knowledge of the fact that

laplace( (-t)^n * f(t), t, s ) = diff( laplace( f(t), t, s ), s$n );

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.ed

I don't have any problem with this either. I'm using Maple 12.01 and have tested this in both worksheet and document modes. I see no difference in the output. I don't see anything wrong with your commands. (I copied directly from the input in an earlier MaplePrimes post.)

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.ed

I don't have any problem with this either. I'm using Maple 12.01 and have tested this in both worksheet and document modes. I see no difference in the output. I don't see anything wrong with your commands. (I copied directly from the input in an earlier MaplePrimes post.)

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.ed
First 34 35 36 37 38 39 40 Last Page 36 of 76