83.40.6 problem 6

Internal problem ID [19407]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VIII. Linear equations of second order. Excercise VIII (E) at page 140
Problem number : 6
Date solved : Monday, March 31, 2025 at 07:12:49 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

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