Hyperbolic equivalent of demoivre()?



On Thu, Dec 8, 2011 at 10:31 AM, Dan <vi5u0-maxima at yahoo.co.uk> wrote:

>
> Dear all,
>
> Is there an equivalent of the demoivre() function (or the demoivre
> option variable) for converting real exponentials to hyperbolic
> functions, please?  I have, for example, the result of
>
> integrate((sech(x))^2,x,0,X) ;
>
> and I'd like to get it to display as tanh(X), instead of an
> exponential form.
>
>
You could do something like subst(X=%i*dummy, <res>), run demoivre, and
then subst(dummy=X/%i, ...)

It won't give you tanh, but it can give sinh/cosh.

(I cannot remember if maxima can convert sin/cos to tan by itself.)

Ray