Subject: solving equations with hyperbolic functions
From: Stavros Macrakis
Date: Tue, 23 Aug 2011 19:04:26 -0400
I don't know of any way to provide Maxima with "hints", but you can work
through the solution using Maxima as a symbolic calculator:
(%i7) expr:
(b0*sqrt(b1)*cosh(sqrt(a1*b1)*t)-a0*sqrt(a1)*sinh(sqrt(a1*b1)*t))/sqrt(b1)$
(%i8) expand(%); -- distribute the sqrt(b1)
(%o8) b0*cosh(sqrt(a1*b1)*t)-a0*sqrt(a1)*sinh(sqrt(a1*b1)*t)/sqrt(b1)
(%i9) %=0; -- put in the form of an equation
(%o9) b0*cosh(sqrt(a1*b1)*t)-a0*sqrt(a1)*sinh(sqrt(a1*b1)*t)/sqrt(b1) = 0
(%i10) %-part(%,1,2); -- put sinh and cosh on the two sides
(%o10) b0*cosh(sqrt(a1*b1)*t) = a0*sqrt(a1)*sinh(sqrt(a1*b1)*t)/sqrt(b1)
(%i11) %/part(%,1); -- divide to get sinh/cosh
(%o11) 1 = a0*sqrt(a1)*sinh(sqrt(a1*b1)*t)/(b0*sqrt(b1)*cosh(sqrt(a1*b1)*t))
(%i12) trigreduce(%); -- have Maxima recognize tanh
(%o12) 1 = a0*sqrt(a1)*tanh(sqrt(a1*b1)*t)/(b0*sqrt(b1))
(%i13) solve(%,t); -- now solve
(%o13) [t = atanh(b0*sqrt(b1)/(a0*sqrt(a1)))/sqrt(a1*b1)]
You can get a fully automatic solution if you put the equation in
exponential form:
(%i19) solve(exponentialize(expr),t);
(%o19) [t =
log(-sqrt(-b0*sqrt(b1)/(b0*sqrt(b1)-a0*sqrt(a1))-a0*sqrt(a1)/(b0*sqrt(b1)-a0*sqrt(a1))))/(sqrt(a1)*sqrt(b1)),
t =
log(-b0*sqrt(b1)/(b0*sqrt(b1)-a0*sqrt(a1))-a0*sqrt(a1)/(b0*sqrt(b1)-a0*sqrt(a1)))/(2*sqrt(a1)*sqrt(b1))]
(%i20) factor(%);
(%o20) [t =
log(-sqrt(-(b0*sqrt(b1)+a0*sqrt(a1))/(b0*sqrt(b1)-a0*sqrt(a1))))/(sqrt(a1)*sqrt(b1)),t
=
log(-(b0*sqrt(b1)+a0*sqrt(a1))/(b0*sqrt(b1)-a0*sqrt(a1)))/(2*sqrt(a1)*sqrt(b1))]
But of course the result is not expressed using atanh... so let's do the
substitution log(y) => atanh((y^2-1)/(y^2+1)):
(%i21) subst(lambda([y],atanh((y^2-1)/(y^2+1))),'log,%o20);
(%o21) [t =
atanh((-(b0*sqrt(b1)+a0*sqrt(a1))/(b0*sqrt(b1)-a0*sqrt(a1))-1)/(1-(b0*sqrt(b1)+a0*sqrt(a1))/(b0*sqrt(b1)-a0*sqrt(a1))))/(sqrt(a1)*sqrt(b1)),
t =
atanh(((b0*sqrt(b1)+a0*sqrt(a1))^2/(b0*sqrt(b1)-a0*sqrt(a1))^2-1)/((b0*sqrt(b1)+a0*sqrt(a1))^2/(b0*sqrt(b1)-a0*sqrt(a1))^2+1))/(2*sqrt(a1)*sqrt(b1))]
(%i22) radcan(%);
(%o22) [t = atanh(b0*sqrt(b1)/(a0*sqrt(a1)))/(sqrt(a1)*sqrt(b1)),t =
atanh(2*a0*sqrt(a1)*b0*sqrt(b1)/(b0^2*b1+a0^2*a1))/(2*sqrt(a1)*sqrt(b1))]
Of course, this relies on recognizing that the result should be in terms of
atanh....
-s
On Tue, Aug 23, 2011 at 18:30, Louis Reinitz <lkreinitz at gmail.com> wrote:
> atanh((b0*sqrt(b1))/(a0*sqrt(a1)))
>