75.19.18 problem 635

Internal problem ID [17063]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.4 Nonhomogeneous linear equations with constant coefficients. The Euler equations. Exercises page 143
Problem number : 635
Date solved : Monday, March 31, 2025 at 03:39:44 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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