23.3.159 problem 161

Internal problem ID [5873]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 161
Date solved : Friday, October 03, 2025 at 01:44:55 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} -y+2 \tan \left (x \right ) y^{\prime }+y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.108 (sec). Leaf size: 28
ode:=-y(x)+2*tan(x)*diff(y(x),x)+diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -i \cos \left (x \right ) c_2 +\sin \left (x \right ) \ln \left (\sin \left (x \right )+i \cos \left (x \right )\right ) c_2 +c_1 \sin \left (x \right ) \]
Mathematica. Time used: 0.115 (sec). Leaf size: 45
ode=-y[x] + 2*Tan[x]*D[y[x],x] + D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_2 \left (\cos (x)-\sqrt {\sin ^2(x)} \arctan \left (\frac {\cos (x)}{\sqrt {\sin ^2(x)}}\right )\right )+c_1 \sqrt {\sin ^2(x)} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) + 2*tan(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False