Henry:
try this:
a: r+%i*s;
cabs(a)^2= realpart(a)^2 + imagpart(a)^2;
you can say declare(r,real); declare(s,real) if you wish, but
it seems to be unnecessary.
RJF
On 6/6/12 8:37 AM, Stavros Macrakis wrote:
> I believe that cabs(a) used to return
> sqrt('realpart(a)^2+'imagpart(a)^2), though it now returns 'abs(a)
> (prints as |a|). I think the former is more in the spirit of cabs
> (which is supposed to give you an explicit formula, not just punt to a
> nounform), so I would consider the current behavior to be a bug.
>
> If I remember correctly, a few years ago, someone tried to unify abs
> and cabs (I objected) -- this may be related to that?
>
> As a workaround, you can do cabs(rectform(a))^2 =>
> 'realpart(a)^2+'imagpart(a)^2. Unfortunately, rectform(abs(a))
> currently returns 'abs(a) -- again, I think this is a bug. If you're
> starting with the abs form, I suppose you could do
> subst(lambda([ex],cabs(rectform(ex))),'abs, ... ).
>
> -s
>
>
> On Wed, Jun 6, 2012 at 11:06 AM, Henry Baker <hbaker1 at pipeline.com
> <mailto:hbaker1 at pipeline.com>> wrote:
>
> I'm trying to get maxima to prove that
>
> abs(a)^2=realpart(a)^2+imagpart(a)^2.
>
> I tell maxima:
>
> declare(a,complex);
> abs(a)^2=realpart(a)^2+imagpart(a)^2;
>
> What do I tell maxima to get it to simplify this?
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu <mailto:Maxima at math.utexas.edu>
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima