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

I beg to disagree.

There is never a case where these integrals are negative. The sign of the answer is never in question. The (real-valued branch of the) integrand is positive for all p.

All that matters is the comparison of p with 1. The integrals converge for p>1 (because 1-p<0) and diverge for p<=1 (with p=1 treated as a special case).

It does appear that, the way Maple does the problem, the sign of p does enter into the picture. But, this is mathematically unnecessary.

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

Have  you forgotten about the Maplet Builder? This was a separate GUI for building maplets. I remember trying to use it several  years ago, but giving up because of its limitations. I believe embedded components are the next step in the evolution.

I can find references to the Maplet Builder for Maple 9.5 and Maple 10. There are also a couple of MaplePrimes forums (1, 2)- with a grand total of one response.

I agree with Jacques. I would like to see embedded components and maplets merge into a single fully-developed feature. There has to be significant overlap in the technologies.

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

 

Can you explain what you mean by "top level"? Thanks, 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/

Can you explain what you mean by "top level"? Thanks, 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/

You are partially correct about using the ditto operators (%, %%, %%%). % refers to the previous result, %% the next previous result, and %%% the one before that. It makes no difference where these commands are in the worksheet / document. All that matters is the order in which the commands are executed. Nothing is re-executed when you use %, so that should not be a source of any slowdown.

From your worksheet, I see that you are already making use of the labels. Why don't you replace all % and %% with the appropriate label?

Also, it appears as though you have not adopted my earlier suggestions about using alias and declare, and avoiding the name D. I think you will see the power these can create, once you give them a try.

I hope this helps to answer your questions,

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/

 

You are partially correct about using the ditto operators (%, %%, %%%). % refers to the previous result, %% the next previous result, and %%% the one before that. It makes no difference where these commands are in the worksheet / document. All that matters is the order in which the commands are executed. Nothing is re-executed when you use %, so that should not be a source of any slowdown.

From your worksheet, I see that you are already making use of the labels. Why don't you replace all % and %% with the appropriate label?

Also, it appears as though you have not adopted my earlier suggestions about using alias and declare, and avoiding the name D. I think you will see the power these can create, once you give them a try.

I hope this helps to answer your questions,

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 second Alec's suggestion to use a TextField for input. I, too, would like to use the MathMLEditor but find that there are still too many issues with it to make use of it with students. I use TextFields for all input and use MathMLViewer to preview the input. Exacly what Alec suggests.

---------------------------------------------------------------------
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 second Alec's suggestion to use a TextField for input. I, too, would like to use the MathMLEditor but find that there are still too many issues with it to make use of it with students. I use TextFields for all input and use MathMLViewer to preview the input. Exacly what Alec suggests.

---------------------------------------------------------------------
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/

Here are two alternatives to make the entries numeric. First, you can use the previous maplet with the entries "parsed":

BB := map( parse, eval( parse( Maplets[Display](makeMaplet(1,5))[] ) ) );

Second, you can change the definition of M in GetMatrix to:

M := Matrix( m,n, (i,j)->Get(entry||i||j::numeric,corrections=true) );

With this approach all entries of the matrix must be numeric. If they are not, then a window will appear in which a numeric value must be entered before going further.

If you adopt the second approach, then maybe you want to put a default value of 0 in every entry in the matrix. You can force the entries to be returned as numeric by changing the double loop creating the entries to:

      seq([seq(TextBox[entry||i||j](width = 5,value=0),j = 1..n)],i = 1..m),

That is, insert ",value=0" to set 0 as the default value in each entry. Here is the current version I have:

restart;
with(Maplets:-Elements):
makeMaplet := proc(m::posint,n::posint)
   Maplet([
      ["Enter the matrix, please"],
      seq([seq(TextBox[entry||i||j](width = 5,value=0),j = 1..n)],i = 1..m),
      [TextBox['TBm']('visible'='false', 'width'=1, 'value'=m ),
       TextBox['TBn']('visible'='false', 'width'=1, 'value'=n ),
       Button("Return the matrix",'onclick'='A1'),
       TextBox['TBM']('visible'='false', 'width'=1, 'value'="" ),
       TextBox['TBd']('visible'='false', 'width'=1, 'value'="" )]
   ],
   Action['A1']( Evaluate('function' = "GetMatrix"),
                 Shutdown(['TBM']) )
)
end proc:

GetMatrix := proc()
  local m, n, M;
  uses Maplets:-Tools;
  sprintf( "in GetMatrix with m=%a and n=%a", m,n );
  m := Get( 'TBm'::posint, corrections=true );
  n := Get( 'TBn'::posint, corrections=true );
  M := Matrix( m,n, (i,j)->Get(entry||i||j::numeric,corrections=true) );
  Set( 'TBM' = M );
end proc:

AA:=eval( parse( Maplets[Display](makeMaplet(3,5))[] ) );

How did I learn this? Experience. Lots of trial and error. Reading the help. Re-reading the help. Asking questions of Maple Technical Support. I did all of this while creating Maplets for Calculus, a collection of now 94 maplets for single variable calculus. Take a look at http://m4c.math.sc.edu/. The actual maplets are on a secure site. I can give temporary access to anyone who would like to take them for a test drive.

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/

Here are two alternatives to make the entries numeric. First, you can use the previous maplet with the entries "parsed":

BB := map( parse, eval( parse( Maplets[Display](makeMaplet(1,5))[] ) ) );

Second, you can change the definition of M in GetMatrix to:

M := Matrix( m,n, (i,j)->Get(entry||i||j::numeric,corrections=true) );

With this approach all entries of the matrix must be numeric. If they are not, then a window will appear in which a numeric value must be entered before going further.

If you adopt the second approach, then maybe you want to put a default value of 0 in every entry in the matrix. You can force the entries to be returned as numeric by changing the double loop creating the entries to:

      seq([seq(TextBox[entry||i||j](width = 5,value=0),j = 1..n)],i = 1..m),

That is, insert ",value=0" to set 0 as the default value in each entry. Here is the current version I have:

restart;
with(Maplets:-Elements):
makeMaplet := proc(m::posint,n::posint)
   Maplet([
      ["Enter the matrix, please"],
      seq([seq(TextBox[entry||i||j](width = 5,value=0),j = 1..n)],i = 1..m),
      [TextBox['TBm']('visible'='false', 'width'=1, 'value'=m ),
       TextBox['TBn']('visible'='false', 'width'=1, 'value'=n ),
       Button("Return the matrix",'onclick'='A1'),
       TextBox['TBM']('visible'='false', 'width'=1, 'value'="" ),
       TextBox['TBd']('visible'='false', 'width'=1, 'value'="" )]
   ],
   Action['A1']( Evaluate('function' = "GetMatrix"),
                 Shutdown(['TBM']) )
)
end proc:

GetMatrix := proc()
  local m, n, M;
  uses Maplets:-Tools;
  sprintf( "in GetMatrix with m=%a and n=%a", m,n );
  m := Get( 'TBm'::posint, corrections=true );
  n := Get( 'TBn'::posint, corrections=true );
  M := Matrix( m,n, (i,j)->Get(entry||i||j::numeric,corrections=true) );
  Set( 'TBM' = M );
end proc:

AA:=eval( parse( Maplets[Display](makeMaplet(3,5))[] ) );

How did I learn this? Experience. Lots of trial and error. Reading the help. Re-reading the help. Asking questions of Maple Technical Support. I did all of this while creating Maplets for Calculus, a collection of now 94 maplets for single variable calculus. Take a look at http://m4c.math.sc.edu/. The actual maplets are on a secure site. I can give temporary access to anyone who would like to take them for a test drive.

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/

Can you please share with us EXACTLY what you are trying? Either upload your Maple file (worksheet or document) to MaplePrimes or cut-and-paste the input (and output) from your session. Then, we should be able to provide a solution that will definitely work for you.

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/

Can you please share with us EXACTLY what you are trying? Either upload your Maple file (worksheet or document) to MaplePrimes or cut-and-paste the input (and output) from your session. Then, we should be able to provide a solution that will definitely work for you.

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/

There is no need for a worksheet. Just copy and paste these commands wherever you need them. You can create a task template if you want.

restart;
interface( rtablesize=20 ):   # display tables up 20 rows or cols
f := x->sin(x);
X := [$0..10]/10;
T := < seq( < x | f(x) | evalf(f(x)) >, x=X ) >;

It appears as though my previous post was visited by the < gremlin, even though it is inside a pre tag and it previewed correctly. Hmmm.

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/

There is no need for a worksheet. Just copy and paste these commands wherever you need them. You can create a task template if you want.

restart;
interface( rtablesize=20 ):   # display tables up 20 rows or cols
f := x->sin(x);
X := [$0..10]/10;
T := < seq( < x | f(x) | evalf(f(x)) >, x=X ) >;

It appears as though my previous post was visited by the < gremlin, even though it is inside a pre tag and it previewed correctly. Hmmm.

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/

Here's another way to construct a table of function values. One advantage of this method is the output is a Maple object that can be used for later steps, if needed.

restart;
interface( rtablesize=20 ):   # needed to display tables with more than 10 rows or columns
f := x->sin(x);
x -> sin(x)
X := [$0..10]/10;
                    [   1   1  3   2  1  3  7   4  9    ]
                    [0, --, -, --, -, -, -, --, -, --, 1]
                    [   10  5  10  5  2  5  10  5  10   ]
T := < seq( 

This constructs a table with three columns. You can modify the list of values from the domain to fit your needs. The specific functions, and number of columns is also completely customizable. Note the use of "|" to separate columns in the table. The output is omitted because MaplePrimes does not like to display Maple matrices.

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 45 46 47 48 49 50 51 Last Page 47 of 76