Carl Love

Carl Love

21283 Reputation

24 Badges

8 years, 251 days
Natick, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

The example above showed that two Records which seem identical but are stored at different addresses will be stored as separate entries in the table---which may slow down the recursion, but won't cause a real error. The following example---of the converse situation: different Records, same address---is more insidious.

restart;
A:= Record(a=1):
T[eval(A)]:= 1:
A:-a:= 2:
eval(T);

     table([Record(a = 2) = 1])

So even though the record has changed, the value associated with it in the table has not. This situation would cause a procedure that used a remember table on Record arguments to give wrong results.

There is a way that cache tables might help, though it wouldn't usually be worth it: If the situation in the example immediately above was relatively rare, then you could clear the cache every time you changed the contents of a record.

The example above showed that two Records which seem identical but are stored at different addresses will be stored as separate entries in the table---which may slow down the recursion, but won't cause a real error. The following example---of the converse situation: different Records, same address---is more insidious.

restart;
A:= Record(a=1):
T[eval(A)]:= 1:
A:-a:= 2:
eval(T);

     table([Record(a = 2) = 1])

So even though the record has changed, the value associated with it in the table has not. This situation would cause a procedure that used a remember table on Record arguments to give wrong results.

There is a way that cache tables might help, though it wouldn't usually be worth it: If the situation in the example immediately above was relatively rare, then you could clear the cache every time you changed the contents of a record.

@acer I agree totally that I manually extracted the arguments from the sqrts. I thought that you were referring to manual extraction of the reduced constraints as returned by solve. I was trying to approach the problem as if it were presented as originally posed to a freshman student, who knows to solve for nonnegativity of arguments to sqrt, as you said.

@acer I agree totally that I manually extracted the arguments from the sqrts. I thought that you were referring to manual extraction of the reduced constraints as returned by solve. I was trying to approach the problem as if it were presented as originally posed to a freshman student, who knows to solve for nonnegativity of arguments to sqrt, as you said.

@acer I was very careful to remove any need for manual extraction of the reduced constraints (returned by solve) from my solution. I just decided the display the results at that point so the reader could "catch a breather"---kinda like a dramatic pause. The remaining code works regardless of what those reduced constraints are or how many there are. All that matters is each constraint set eliminates one variable and gives numeric bounds for the other.

Also, I did use Im or any other complex-number commands.

@acer I was very careful to remove any need for manual extraction of the reduced constraints (returned by solve) from my solution. I just decided the display the results at that point so the reader could "catch a breather"---kinda like a dramatic pause. The remaining code works regardless of what those reduced constraints are or how many there are. All that matters is each constraint set eliminates one variable and gives numeric bounds for the other.

Also, I did use Im or any other complex-number commands.

I want to point out that my solution above gets the exact answer with purely symbolic techniques. It does not require plots. It does not require any initial guess. It uses only basic Maple commands, no packages. It does not use any complex-number commands such as evalc, Re, Im. It does not use any assumptions or RealDomain or Student. Each command runs quickly. In short, it is accessible to the average student. The apparent complexity with indets, etc., was only because I wanted to ensure that it would run the same regardless of the order that solutions are returned by solve. That would not be a concern to a student running Maple as a "desk calculator". 

I want to point out that my solution above gets the exact answer with purely symbolic techniques. It does not require plots. It does not require any initial guess. It uses only basic Maple commands, no packages. It does not use any complex-number commands such as evalc, Re, Im. It does not use any assumptions or RealDomain or Student. Each command runs quickly. In short, it is accessible to the average student. The apparent complexity with indets, etc., was only because I wanted to ensure that it would run the same regardless of the order that solutions are returned by solve. That would not be a concern to a student running Maple as a "desk calculator". 

@Kitonum Yes, thanks for spotting that. I should've compared the whole list of pairs before posting.

@Kitonum Yes, thanks for spotting that. I should've compared the whole list of pairs before posting.

I believe that Preben's method here is called the "shooting method" for BVPs. See http://en.wikipedia.org/wiki/Shooting_method. I have a hunch (with no real evidence yet) that Maple's BVP solver was trying this. My hunch is based on the error message about the Newton iteration convergence.

I believe that Preben's method here is called the "shooting method" for BVPs. See http://en.wikipedia.org/wiki/Shooting_method. I have a hunch (with no real evidence yet) that Maple's BVP solver was trying this. My hunch is based on the error message about the Newton iteration convergence.

Minimal polynomials are not necessarily square free. Consider a matrix which is all 0 except for a single off-diagonal nonzero. Clearly the minimal polynomial is x2.

Minimal polynomials are not necessarily square free. Consider a matrix which is all 0 except for a single off-diagonal nonzero. Clearly the minimal polynomial is x2.

Must be a oversight in the documentation. The help link to SquareFreePart is dead, nor does my Maple 16 have the help file; although I can see that my Maple's PolynomialTools does indeed export a SquareFreePart.

First 584 585 586 587 588 589 590 Page 586 of 593