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

A nice feature for Maple 15 would be better support for the plotting of functions with singularities.

A classical example from calculus is the graph of y=sin(x)/x . At present, to emphasize that x=0 is not in the domain of the function I would have to do something like the following:

f := sin(x)/x:
a := 0:
L := limit( f, x=a ):

epsilon:=0.05:

plots:-display(
  plot( f, x=-2*Pi..a-epsilon ),
  plot( f, x=a+epsilon..2*Pi ),
  plot( [[a,L]], style=point, symbol=circle ),
  axes=boxed);

For a second example, I present

f := (x^3-8)/(x-2):
a := 2:
L := limit( f, x=a ):

plots:-display(
  plot( f, x=-5..a-epsilon ),
  plot( f, x=a+epsilon..5 ),
  plot( [[a,L]], style=point, symbol=circle ),
  axes=boxed);

Instead of these command sequences, I'd like to be able to obtain these plots with

plot( f, x=-5..5, discont=true );

One of my reasons for making this request is to help me to reinforce the idea that removable singularities cannot just be ignored. The expressions (x^3-8)/(x-2) and x^2+2x+4 might agree for all x<>2, but they do not agree for x=2 - and this single difference means they are different expressions.

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

Well, I'd like to be able to see the signum function without the vertical segment between the two parts of the graph. For example:

with( plots ):
implicitplot( y=signum(x-1), x=-2..2, y=-2..2, signchange=false, gridrefine=2 );

This is a pretty simple example. It would not be difficult to come up with much more complicated situations where this would be much more important.

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

Well, I'd like to be able to see the signum function without the vertical segment between the two parts of the graph. For example:

with( plots ):
implicitplot( y=signum(x-1), x=-2..2, y=-2..2, signchange=false, gridrefine=2 );

This is a pretty simple example. It would not be difficult to come up with much more complicated situations where this would be much more important.

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

The only difference between the two plots is the style.

One is with style=line (the default) and the other is with style=point (which is what pointplot does by default).

There are no "points on the asymptote". These artifacts appear only because Maple's line plots connect all points - unless you specify discontinuities=true. There are no bugs, or inconsistencies, here; these are all "features". They are all beneficial at different times.

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

The only difference between the two plots is the style.

One is with style=line (the default) and the other is with style=point (which is what pointplot does by default).

There are no "points on the asymptote". These artifacts appear only because Maple's line plots connect all points - unless you specify discontinuities=true. There are no bugs, or inconsistencies, here; these are all "features". They are all beneficial at different times.

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

Robert's explanation makes perfect sense. I had read about signchange in the online help, but didn't take enough time to understand what it was saying.

When I tore apart the plot data structure and saw the actual points plotted, I did notice that the function values oscillated between positive and negative values. While I found this interesting, I did not investigate it further - or make the connection with the signchange option.

Shouldn't the signchange (and other implicitplot options) be included in the plot builder interface for implicit plots?

And, still, is it really unreasonable to implement discontinuity checking in implicitplot?

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

Robert's explanation makes perfect sense. I had read about signchange in the online help, but didn't take enough time to understand what it was saying.

When I tore apart the plot data structure and saw the actual points plotted, I did notice that the function values oscillated between positive and negative values. While I found this interesting, I did not investigate it further - or make the connection with the signchange option.

Shouldn't the signchange (and other implicitplot options) be included in the plot builder interface for implicit plots?

And, still, is it really unreasonable to implement discontinuity checking in implicitplot?

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

I would not be so fast to relegate odeplot to the "2nd division of useful tools". It's still one of my favorite commands. It's just that neither odeplot nor DEplot is a do-it-all for all situations. Each has its individual strengths - and limitations.

I was pretty sure you'd like the plots. I, too, did see some of the warnings about "Invalid DAG option structure detected." I don't think they appeared everytime, so I just ignored them for my post. If the continue to appear, this should be reported as a bug that needs to be fixed.

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

I would not be so fast to relegate odeplot to the "2nd division of useful tools". It's still one of my favorite commands. It's just that neither odeplot nor DEplot is a do-it-all for all situations. Each has its individual strengths - and limitations.

I was pretty sure you'd like the plots. I, too, did see some of the warnings about "Invalid DAG option structure detected." I don't think they appeared everytime, so I just ignored them for my post. If the continue to appear, this should be reported as a bug that needs to be fixed.

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

I have to admit that I am not, currently, a MapleTA user. I thought it was possible to have multiple response fields in a single question, but as I look over the documentation it appears my memory is faulty. Maybe you can do something with a multipart question, but I did not see anything explicit showing how this might be done.

Hopefully, someone else with more current working knowledge of MapleTA, and it's possibilities, will be able to point you in a good direction.

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

I have to admit that I am not, currently, a MapleTA user. I thought it was possible to have multiple response fields in a single question, but as I look over the documentation it appears my memory is faulty. Maybe you can do something with a multipart question, but I did not see anything explicit showing how this might be done.

Hopefully, someone else with more current working knowledge of MapleTA, and it's possibilities, will be able to point you in a good direction.

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

Your array of 16 response areas is probably the way to go, but I think you are unnecessarily limiting the types of problems for which this could be used.

If I were doing this, I would write code to collect the user's information from these cells as a matrix, and then use the relevant mathematics to check if this matrix is correct. Using your example of a diagonalizing matrix, this would involve multiplying the student's answer and the original matrix and checking that the result is diagonal.

Here's a simple implementatin of a test if a matrix is diagonal:

IsDiagonal := A -> ArrayTools:-IsZero( A - LinearAlgebra:-DiagonalMatrix( LinearAlgebra:-Diagonal( A ) ) );

Lastly, I would suggest that you might create a general array with, say, 36 response areas and have the instructions emphasize that students should fill in only those entries for the appropriate size of the response. (You could have two extra fields for the number of rows and columns, but I prefer the idea of having some areas left empty and modifying my answer checker to check that the student's answer has the correct shape and size.

Just a couple of thoughts that I hope are of some use,

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

Your array of 16 response areas is probably the way to go, but I think you are unnecessarily limiting the types of problems for which this could be used.

If I were doing this, I would write code to collect the user's information from these cells as a matrix, and then use the relevant mathematics to check if this matrix is correct. Using your example of a diagonalizing matrix, this would involve multiplying the student's answer and the original matrix and checking that the result is diagonal.

Here's a simple implementatin of a test if a matrix is diagonal:

IsDiagonal := A -> ArrayTools:-IsZero( A - LinearAlgebra:-DiagonalMatrix( LinearAlgebra:-Diagonal( A ) ) );

Lastly, I would suggest that you might create a general array with, say, 36 response areas and have the instructions emphasize that students should fill in only those entries for the appropriate size of the response. (You could have two extra fields for the number of rows and columns, but I prefer the idea of having some areas left empty and modifying my answer checker to check that the student's answer has the correct shape and size.

Just a couple of thoughts that I hope are of some use,

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

Complex roots are complex roots. Even if you approximate them, their approximation will still be complex (in most cases).

In most cases like this, you need to do some more work to decide what's the best plan of attack. Possible options include:

  1. complex roots are non-physical, so this set of parameters can be skipped
  2. it's really the real part of the root that matters (of course, for a quadratic polynomial with real coefficients, the two roots are complex conjugates - they have the same real part)

Maple's doing the mathematics correctly. It's your responsibility to give an appropriate mathematical formulation to Maple.

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

Complex roots are complex roots. Even if you approximate them, their approximation will still be complex (in most cases).

In most cases like this, you need to do some more work to decide what's the best plan of attack. Possible options include:

  1. complex roots are non-physical, so this set of parameters can be skipped
  2. it's really the real part of the root that matters (of course, for a quadratic polynomial with real coefficients, the two roots are complex conjugates - they have the same real part)

Maple's doing the mathematics correctly. It's your responsibility to give an appropriate mathematical formulation to Maple.

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
First 10 11 12 13 14 15 16 Last Page 12 of 76