62.30.6 problem Ex 6

Internal problem ID [12899]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VIII, Linear differential equations of the second order. Article 53. Change of dependent variable. Page 125
Problem number : Ex 6
Date solved : Monday, March 31, 2025 at 07:23:58 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-2 \tan \left (x \right ) y^{\prime }-\left (a^{2}+1\right ) y&=0 \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 20
ode:=diff(diff(y(x),x),x)-2*tan(x)*diff(y(x),x)-(a^2+1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sec \left (x \right ) \left (c_1 \sinh \left (a x \right )+c_2 \cosh \left (a x \right )\right ) \]
Mathematica. Time used: 0.062 (sec). Leaf size: 32
ode=D[y[x],{x,2}]-2*Tan[x]*D[y[x],x]-(a^2+1)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sec (x) \left (c_1 e^{-a x}+\frac {c_2 e^{a x}}{2 a}\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq((-a**2 - 1)*y(x) - 2*tan(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False