34.14.2 problem 23

Internal problem ID [8059]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 19. Linear equations with variable coefficients (Misc. types). Supplemetary problems. Page 132
Problem number : 23
Date solved : Tuesday, September 30, 2025 at 05:14:57 PM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} \left (x^{2}+1\right ) y^{\prime \prime }+2 x y^{\prime }&=\frac {2}{x^{3}} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 15
ode:=(x^2+1)*diff(diff(y(x),x),x)+2*x*diff(y(x),x) = 2/x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 +1\right ) \arctan \left (x \right )+\frac {1}{x}+c_2 \]
Mathematica. Time used: 60.026 (sec). Leaf size: 36
ode=(1+x^2)*D[y[x],{x,2}]+2*x*D[y[x],x]==2*x^(-3); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \int _1^x\frac {c_1 K[1]^2-1}{K[1]^4+K[1]^2}dK[1]+c_2 \end{align*}
Sympy. Time used: 0.376 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*Derivative(y(x), x) + (x**2 + 1)*Derivative(y(x), (x, 2)) - 2/x**3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} - C_{2} \log {\left (x - i \right )} + C_{2} \log {\left (x + i \right )} + \frac {1}{x} \]