1 | initial version |
Sage is somewhat recalcitrant to work with power (inluding radix) simplification,for excellent reasons. Similarly, it tends to pull imaginary quantities out of trig/hyperbolic functions (see remark above).
After
var('epsilon t')
y=function('y')(t)
de = diff(y,t,2)+2*epsilon*diff(y,t,1)+y == 0
assume(epsilon<1)
assume(epsilon>-1)
u(t) = desolve(de,y,ivar=t)
var('k_1')
sol=solve(diff(u(t).subs(_K2=0),t).subs(t=0).subs(_K1=k_1)==1,k_1)
sol[0].rhs().simplify_full()
E1=u(t).subs(_K2=0).subs(_K1=sol[0].rhs().simplify_full())
E2=E1.canonicalize_radical()
E1/E2
is
$$ \frac{2 \, \sqrt{\epsilon + 1} \sqrt{\epsilon - 1} \sin\left(\frac{1}{2} \, \sqrt{-4 \, \epsilon^{2} + 4} t\right)}{\sqrt{-4 \, \epsilon^{2} + 4} \sinh\left(\sqrt{\epsilon + 1} \sqrt{\epsilon - 1} t\right)} $$
but giac
somewhat recklessly can deduce :
sage: (E2/E1)._giac_().simplify()._sage_().factor()
1
HTH,