28.2.69 problem 69

Internal problem ID [4512]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 4. Linear Differential Equations. Page 183
Problem number : 69
Date solved : Sunday, March 30, 2025 at 03:24:51 AM
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.004 (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.062 (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