81.6.8 problem 8

Internal problem ID [18620]
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 : 8
Date solved : Monday, March 31, 2025 at 05:46:46 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 25
ode:=(x^2-1)*diff(diff(y(x),x),x)+4*x*diff(y(x),x)+2*y(x) = 2*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{3}+3 c_1 x +3 c_2}{3 x^{2}-3} \]
Mathematica. Time used: 0.028 (sec). Leaf size: 29
ode=(x^2-1)*D[y[x],{x,2}]+4*x*D[y[x],x]+2*y[x]==2*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^3+3 c_2 x+3 c_1}{3 \left (x^2-1\right )} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*x*Derivative(y(x), x) - 2*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)) + 2) - 2*y(x) + Derivative(y(x), (x, 2)))/(4*x) cannot be solved by the factorable group method