Undo trigexpand of complex arguments ??



Hi Stavros:

Could we please include this trigexpand/trigreduce problem in the Maxima regression test problem set?

Examples like these need to be constantly checked every time a change is made to the Maxima "simplifier".

At 08:10 AM 11/25/2013, Stavros Macrakis wrote:
>Workaround:
>
>subst(q/%i,qi,trigreduce(subst(%i*qi,q,%o2)))
>
>On Mon, Nov 25, 2013 at 9:58 AM, Henry Baker <hbaker1 at pipeline.com> wrote:
>What is the antidote for trigexpand with complex arguments?
>
>trigreduce doesn't seem to work here.
>
>Maxima 5.28.0-2 http://maxima.sourceforge.net
>using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
>Distributed under the GNU Public License. See the file COPYING.
>Dedicated to the memory of William Schelter.
>The function bug_report() provides bug reporting information.
>(%i1) cos(p+q*%i);
>(%o1)                            cos(%i q + p)
>(%i2) trigexpand(%);
>(%o2)                 cos(p) cosh(q) - %i sin(p) sinh(q)
>(%i3) trigreduce(%);
>(%o3)                 cos(p) cosh(q) - %i sin(p) sinh(q)
>(%i4)