23.3.49 problem 51

Internal problem ID [5763]
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 : 51
Date solved : Friday, October 03, 2025 at 01:43:52 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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