60.3.24 problem 1024

Internal problem ID [11020]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 2, linear second order
Problem number : 1024
Date solved : Thursday, March 13, 2025 at 08:23:25 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.262 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x)-(1+2*tan(x)^2)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = i \sin \left (x \right ) c_{2} +\sec \left (x \right ) \ln \left (\cos \left (x \right )+i \sin \left (x \right )\right ) c_{2} +\sec \left (x \right ) c_{1} \]
Mathematica. Time used: 0.85 (sec). Leaf size: 124
ode=(-1 - 2*Tan[x]^2)*y[x] + D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sec (x) \exp \left (\int _1^{\cos (x)}-\frac {2-K[1]^2}{2 K[1]-2 K[1]^3}dK[1]-\frac {1}{2} \int _1^{\cos (x)}-\frac {2-K[2]^2}{K[2]-K[2]^3}dK[2]\right ) \left (c_2 \int _1^{\cos (x)}\exp \left (-2 \int _1^{K[3]}-\frac {2-K[1]^2}{2 K[1]-2 K[1]^3}dK[1]\right )dK[3]+c_1\right ) \]
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