[Maxima] Maxima: trigsimp() introducing errors ??

Fri Dec 28 05:15:26 CST 2007

```On Fri, 2007-12-28 at 10:53 +0200, Constantine Frangos wrote:
> q :  -k*Lc/(Lc*(cos(delta3)*sqrt(sin(delta3)^2*Lc^2
>                                      /(2*sin(delta3)*L2
> +cos(delta3)*Lc)^2
>                                      +1)
>                   +1)
>               +2*sin(delta3)*L2
>                 *sqrt(sin(delta3)^2*Lc^2/(2*sin(delta3)*L2
> +cos(delta3)*Lc)^2
>                        +1))
>
> (%i113) limit(q,delta3,0);
>
> (%o113) -k/2
> (%i114) limit(trigsimp(q),delta3,0);
>
> Is  Lc  positive or negative?
>
> positive;
> (%o114) -k/2
> (%i115) subst(0,delta3,q);
>
> (%o115) -k/2
> (%i116) subst(0,delta3,trigsimp(q));
>
> Division by 0
>  -- an error.  Quitting.  To debug this try debugmode(true);
> (%i117) subst(0,delta3,dividethru(q));
>
> (%o117) -k/2
> (%i118)
>
> (%i121) subst(0,delta3,dividethru(trigsimp(q)));
>
> Division by 0
>  -- an error.  Quitting.  To debug this try debugmode(true);
> (%i122)

I wonder whether the div by zeros here from trigsimp are from the same
place as the ones that caused bug 580721.

If so, I'm looking at the bug at the moment - the problem is trying to
evaluate, say, tan(%pi/2), which isn't a great idea :P

I'm half way through modifying %piargs-tan/cot to consider the
"coefficient of %pi" to be only the stuff free of any other variables,
which means that tan(%pi*x + %pi/2) correctly is transformed to -cot(%
pi*x).

But I need to edit the relevant bits of simp-%tan and simp-%cot to stop
them calling in an infinite loop (since -cot(%pi*x) still has a nonzero
coeff of %pi). Hopefully, I'll be able to post a patch by this evening -
who knows, it might sort out this problem too! :P

Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20071228/c3f0f5de/attachment.pgp
```