7.11.60 problem 62

Internal problem ID [381]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 2. Linear Equations of Higher Order. Section 2.5 (Nonhomogeneous equations and undetermined coefficients). Problems at page 161
Problem number : 62
Date solved : Saturday, March 29, 2025 at 04:52:16 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.006 (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: 6.732 (sec). Leaf size: 115
ode=(x^2-1)*D[y[x],{x,2}]-2*x*D[y[x],x]+2*y[x]==x^2-1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {(x+1) (x-1)^3 \log \left (1-x^2\right )+4 x \left (x^2-1\right ) \log (x+1)-2 \left (x^4+x^2 \left (-1+c_1 \sqrt {-\left (x^2-1\right )^2}\right )-(2 c_1-c_2) \sqrt {-\left (x^2-1\right )^2} x+c_1 \sqrt {-\left (x^2-1\right )^2}\right )}{2 \left (x^2-1\right )} \]
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