8.11.39 problem 62

Internal problem ID [907]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 5.5, Nonhomogeneous equations and undetermined coefficients Page 351
Problem number : 62
Date solved : Saturday, March 29, 2025 at 10:34:09 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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