81.15.12 problem 19-13

Internal problem ID [21720]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 19. Change of variables. Page 483
Problem number : 19-13
Date solved : Thursday, October 02, 2025 at 08:01:12 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \sin \left (x \right )^{2} y^{\prime \prime }+\tan \left (x \right ) y^{\prime }-k^{2} \cos \left (x \right )^{2} y&=0 \end{align*}
Maple. Time used: 0.035 (sec). Leaf size: 19
ode:=sin(x)^2*diff(diff(y(x),x),x)+tan(x)*diff(y(x),x)-k^2*cos(x)^2*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \sin \left (x \right )^{k}+c_2 \sin \left (x \right )^{-k} \]
Mathematica. Time used: 0.045 (sec). Leaf size: 27
ode=Sin[x]^2*D[y[x],{x,2}]+Tan[x]*D[y[x],x]-k^2*Cos[x]^2*y[x]==0 ; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \cosh (k \log (\sin (x)))+i c_2 \sinh (k \log (\sin (x))) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
k = symbols("k") 
y = Function("y") 
ode = Eq(-k**2*y(x)*cos(x)**2 + sin(x)**2*Derivative(y(x), (x, 2)) + tan(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(k**2*y(x)*cos(x)**2 - sin(x)**2*Derivative(y(x), (x, 2)))/tan(x) + Derivative(y(x), x) cannot be solved by the factorable group method