Conversion exponential expression to hyperbolic equivalent one



Here's the trick: change the exponents to imaginary, use demoivre, then
change back.  For example:

(%i1) exp(3*x)/(exp(x)-exp(2*x));
(%o1) %e^(3*x)/(%e^x-%e^(2*x))
(%i2) subst(%i*x,x,%);
(%o2) %e^(3*%i*x)/(%e^(%i*x)-%e^(2*%i*x))
(%i3) demoivre(%);
(%o3) (%i*sin(3*x)+cos(3*x))/(-%i*sin(2*x)-cos(2*x)+%i*sin(x)+cos(x))
(%i4) subst(x/%i,x,%);
(%o4) (sinh(3*x)+cosh(3*x))/(-sinh(2*x)-cosh(2*x)+sinh(x)+cosh(x))

On 10/3/07, Cuneyt Ertal <cuneyt.ertal at gmail.com> wrote:
>
> I want maxima to convert exponential expression to hyperbolic one. How
> can I do that? I tried demoivre but it converts exponential to
> trigonometric but not to hyperbolic.
>