Maxima 5.10.0 release candidate 4



On Sat, Sep 16, 2006 at 09:04:29AM -0600, Robert Dodier wrote:
> On 9/15/06, Marco Ciampa <ciampix at libero.it> wrote:
> 
> >plot2d([sqrt(x-2) * sqrt(x-4)], [x,-5,5]);
> >
> >you get a graph with a positive and a negative part. The positive is ok
> >since the function is defined for values x>=4 but the negative part (for
> >x<=2) is't defined since the product reset the 2 imaginary components but
> >the function is't defined for the 2 sqrt.
> 
> Well, what I see when I try to plot plot2d([sqrt(x-2) * sqrt(x-4)], 
> [x,-5,5]) is a piece for x <= 2, a gap, and a piece for x >= 4.
> The x <= 2 piece is negative and the x >= 4 piece is positive,
> but that seems to follow from the form of the expression -- for x < 2
> sqrt(x - 2) * sqrt(x - 4) => product of pure imaginaries w/ i.p. > 0
> so the final result is real and negative. That seems OK to me.
>
> >The solution (but I do not know how to apply it to maxima) is to calculate
> >the value of result_imaginary variable for every part of the equation.
> >
> >When the calc is started result_imaginary is set to 0.
> >Whatever part of the function creates a complex number this variable must 
> >be
> >set to 1 to flag that the equation is _not_ defined even if the imaginary 
> >part
> >is zeroed before the end of the calc.
> 
> I'm not sure I understand, but this appears to be a proposal to treat
> an expression as undefined for the purpose of plotting if any part of
> it is complex.
you are correct. Do you think is it possible to obtain this in any easy way?

> I guess I don't see what is the purpose of that.
> If the final result is real, then it is OK for plotting, right?
not exactly.
These are 2 completely different problems.

I think that one should able to choose from:

1) to see all the results (old behaviour)
2) to see only the real results (new default behaviour). This option resolves
the log(x) plot problem in the high school and this is the Maple behaviour 
for example.
3) to see the results of real defined equations. This is the definitive
solution for high school.

One should be able to switch to any of the 3 desired behaviour at wish.
I'm not a mathematician but asking to 3 differet people (2 high school
teachers and a University professor) they all told me the same: for real
numbers only the 3rd is really legal.

> Also, we could introduce spurious terms + %i - %i into any
> expression without changing it mathematically, but then the
> proposed test would reject it for plotting.
I do not know exactly how to resolve the problem, I'm sorry but I do not know
lisp so I'm not able to suggest a solution. Isn't possible to have a separate
array of variable to preserve the real_ness of the equation parts?
Forgive me if I say something foolish...
 
> >Perhaps this go too deep into maxima to make it into this version but this
> >behaviour of the plot_realpart variable IMHO _must_ be documented!
> 
> Agreed, plot_realpart should be documented. If you have not already
> done so, please feel free to submit a bug report about it.
> Bugs reported to the mailing list are handled sooner, if ever,
> but they can easily get lost.
You are right, sorry, I'll do today..

-- 

Marco Ciampa

+--------------------+
| Linux User  #78271 |
| FSFE fellow   #364 |
+--------------------+