81.6.9 problem 9

Internal problem ID [18613]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter V. Homogeneous linear differential equations. Exact equations. Exercises at page 69
Problem number : 9
Date solved : Thursday, March 13, 2025 at 12:25:14 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

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