50.1.24 problem 2(j)

Internal problem ID [7796]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Section 1.2 THE NATURE OF SOLUTIONS. Page 9
Problem number : 2(j)
Date solved : Wednesday, March 05, 2025 at 05:06:12 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.000 (sec). Leaf size: 18
ode:=(x^2-3*x+2)*diff(y(x),x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\ln \left (x -1\right )+2 \ln \left (x -2\right )+c_{1} \]
Mathematica. Time used: 0.005 (sec). Leaf size: 24
ode=(x^2-3*x+2)*D[y[x],x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\log (1-x)+2 \log (2-x)+c_1 \]
Sympy. Time used: 0.177 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + (x**2 - 3*x + 2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + 2 \log {\left (x - 2 \right )} - \log {\left (x - 1 \right )} \]