47.5.10 problem 10

Internal problem ID [7499]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 2. Linear homogeneous equations. Section 2.3.4 problems. page 104
Problem number : 10
Date solved : Sunday, March 30, 2025 at 12:10:50 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 53
ode:=(-x^2+1)*diff(diff(y(x),x),x)-x*diff(y(x),x)+1/4*y(x) = -1/2*x^2+1/2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {2 \left (x^{2}+7\right ) \sqrt {x +\sqrt {x^{2}-1}}+15 c_1 x +15 c_1 \sqrt {x^{2}-1}+15 c_2}{15 \sqrt {x +\sqrt {x^{2}-1}}} \]
Mathematica. Time used: 7.781 (sec). Leaf size: 228
ode=(1-x^2)*D[y[x],{x,2}]-x*D[y[x],x]+1/4*y[x]==1/2*(1-x^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \cosh \left (\frac {\sqrt {1-x^2} \arcsin (x)}{2 \sqrt {x^2-1}}\right ) \int _1^x-\sqrt {K[1]^2-1} \sinh \left (\frac {\arcsin (K[1]) \sqrt {1-K[1]^2}}{2 \sqrt {K[1]^2-1}}\right )dK[1]+i \sinh \left (\frac {\sqrt {1-x^2} \arcsin (x)}{2 \sqrt {x^2-1}}\right ) \int _1^x-i \cosh \left (\frac {\arcsin (K[2]) \sqrt {1-K[2]^2}}{2 \sqrt {K[2]^2-1}}\right ) \sqrt {K[2]^2-1}dK[2]+c_1 \cosh \left (\frac {\sqrt {1-x^2} \arcsin (x)}{2 \sqrt {x^2-1}}\right )+i c_2 \sinh \left (\frac {\sqrt {1-x^2} \arcsin (x)}{2 \sqrt {x^2-1}}\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2/2 - x*Derivative(y(x), x) + (1 - x**2)*Derivative(y(x), (x, 2)) + y(x)/4 - 1/2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (2*x**2*(1 - 2*Derivative(y(x), (x, 2))) + y(x) + 4*Derivative(y(x), (x, 2)) - 2)/(4*x) cannot be solved by the factorable group method