Undo trigexpand of complex arguments ??



I never said that %iargs controls trigreduce; it simply prevents trigexpand
from resulting in cosh/sinh.

I understand that you would like trigreduce to handle this case. But by
mentioning regression tests, you're implying that it used to handle this
case, and there has been an undetected regression which causes it not to
handle it any more. If so, it would be helpful if you could identify the
version of Maxima in which it did handle this case.

But as far as I know, Maxima has never handled the mixed
hyperbolic/trigonometric case, though it is a perfectly reasonable feature
request.

            -s


On Mon, Nov 25, 2013 at 3:38 PM, Henry Baker <hbaker1 at pipeline.com> wrote:

> The setting of %iargs doesn't help.  This is still a bug.
>
> 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) %iargs:false;
> (%o1)                                false
> (%i2) cos(p+q*%i);
> (%o2)                            cos(%i q + p)
> (%i3) trigexpand(%);
> (%o3)                 cos(p) cos(%i q) - sin(p) sin(%i q)
> (%i4) %,%iargs=true;
> (%o4)                 cos(p) cosh(q) - %i sin(p) sinh(q)
> (%i5) trigreduce(%);
> (%o5)                 cos(p) cosh(q) - %i sin(p) sinh(q)
> (%i6)
>
> At 11:16 AM 11/25/2013, Stavros Macrakis wrote:
> >Are you saying that this example used to work as you expected? In what
> version?
> >
> >Not sure what this has to do with the simplifier. Except maybe if you're
> talking about %iargs -- if you set %iargs:false, then sin(%i*x) does not
> simplify to %i*sinh(x), so trigreduce(trigexpand(sin(a+b*%i))) =>
> sin(a+b*%i). Are you saying that the default value of %iargs has changed?
> >
> >           -s
> >
> >On Mon, Nov 25, 2013 at 12:52 PM, Henry Baker <hbaker1 at pipeline.com>
> wrote:
> >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)
>
>