12.2.22 problem 22

Internal problem ID [1558]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Linear first order. Section 2.1 Page 41
Problem number : 22
Date solved : Saturday, March 29, 2025 at 10:59:01 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 27
ode:=(x-2)*(x-1)*diff(y(x),x)-(4*x-3)*y(x) = (x-2)^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {2 \left (x -2\right )^{3} \left (-\frac {1}{2}+\left (x -2\right )^{2} c_1 \right )}{2 x -2} \]
Mathematica. Time used: 0.042 (sec). Leaf size: 30
ode=(x-2)*(x-1)*D[y[x],x] -(4*x-3)*y[x]==(x-2)^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {(x-2)^3 \left (-1+2 c_1 (x-2)^2\right )}{2 (x-1)} \]
Sympy. Time used: 0.775 (sec). Leaf size: 54
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(x - 2)**3 + (x - 2)*(x - 1)*Derivative(y(x), x) - (4*x - 3)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} x^{5} - 10 C_{1} x^{4} + 40 C_{1} x^{3} - 80 C_{1} x^{2} + 80 C_{1} x - 32 C_{1} - \frac {x^{3}}{2} + 3 x^{2} - 6 x + 4}{x - 1} \]