Geordie McBain <geordie.mcbain@aeromech.usyd.edu.au> writes:
> There is an erroneous reduction rule for a hyperbolic multiple-angle
> formula:
>
> (C1) trigreduce(sinh(z)^4);
> - COSH(4 z) + 4 COSH(2 z) - 3
> (D1) -----------------------------
> 8
>
> This is -1 times the correct answer.
[...]
> Cosh(z)^4, sin(z)^4, and sinh(z)^n (n=2, 3, 5, 6) are all reduced
> correctly, but sinh(z)^8 has a similar error.
This should fix it (BTW, this implies that the original definition in
trgred.lisp gives the correct result iff n = 2,3 mod 4, so sinh^5 is
also wrong).
(DEFUN SINH^N (%N V)
(M* (m^ -1 (// %n 2))
(SC^N %N V (COND ((ODDP %N) '(%SINH))
('(%COSH)))
(NOT (ODDP %N))
(M^ -1 (M+ (// %N 2) 'K)))))
For odd n this is still more complicated than necessary, though.
Wolfgang