89.10.24 problem 24

Internal problem ID [24517]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 4. Additional topics on equations of first order and first degree. Exercises at page 77
Problem number : 24
Date solved : Thursday, October 02, 2025 at 10:44:51 PM
CAS classification : [_linear]

\begin{align*} x -2 y-1-\left (x -3\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 15
ode:=x-2*y(x)-1-(x-3)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1}{\left (x -3\right )^{2}}+\frac {x}{3} \]
Mathematica. Time used: 0.019 (sec). Leaf size: 30
ode=(x-2*y[x]-1 )-( x-3 )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^3-6 x^2+9 x+3 c_1}{3 (x-3)^2} \end{align*}
Sympy. Time used: 0.184 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x - (x - 3)*Derivative(y(x), x) - 2*y(x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \frac {x^{3}}{3} - 2 x^{2} + 3 x}{x^{2} - 6 x + 9} \]