60.3.164 problem 1178

Internal problem ID [11160]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 2, linear second order
Problem number : 1178
Date solved : Sunday, March 30, 2025 at 07:44:32 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.005 (sec). Leaf size: 23
ode:=x^2*diff(diff(y(x),x),x)-2*x*diff(y(x),x)+(x^2+2)*y(x)-x^3/cos(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\ln \left (\cos \left (x \right )\right ) \cos \left (x \right )+c_1 \cos \left (x \right )+\sin \left (x \right ) \left (x +c_2 \right )\right ) x \]
Mathematica. Time used: 0.056 (sec). Leaf size: 66
ode=-(x^3*Sec[x]) + (2 + x^2)*y[x] - 2*x*D[y[x],x] + x^2*D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} e^{-i x} x \left (2 e^{2 i x} \text {arctanh}\left (1+2 e^{2 i x}\right )+\log \left (1+e^{2 i x}\right )-i c_2 e^{2 i x}+2 c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3/cos(x) + x**2*Derivative(y(x), (x, 2)) - 2*x*Derivative(y(x), x) + (x**2 + 2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE x**2/(2*cos(x)) - x*y(x)/2 - x*Derivative(y(x), (x, 2))/2 + Derivative(y(x), x) - y(x)/x cannot be solved by the factorable group method