4.27.39 \(-\left (\left (a^2+1\right ) y(x)\right )+y''(x)-2 \tan (x) y'(x)=0\)

ODE
\[ -\left (\left (a^2+1\right ) y(x)\right )+y''(x)-2 \tan (x) y'(x)=0 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.199041 (sec), leaf count = 32

\[\left \{\left \{y(x)\to \sec (x) \left (c_1 e^{-a x}+\frac {c_2 e^{a x}}{2 a}\right )\right \}\right \}\]

Maple
cpu = 0.101 (sec), leaf count = 25

\[\left [y \left (x \right ) = \frac {\textit {\_C1} \sinh \left (a x \right )}{\cos \left (x \right )}+\frac {\textit {\_C2} \cosh \left (a x \right )}{\cos \left (x \right )}\right ]\] Mathematica raw input

DSolve[-((1 + a^2)*y[x]) - 2*Tan[x]*y'[x] + y''[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> (C[1]/E^(a*x) + (E^(a*x)*C[2])/(2*a))*Sec[x]}}

Maple raw input

dsolve(diff(diff(y(x),x),x)-2*diff(y(x),x)*tan(x)-(a^2+1)*y(x) = 0, y(x))

Maple raw output

[y(x) = _C1/cos(x)*sinh(a*x)+_C2/cos(x)*cosh(a*x)]