89.10.5 problem 5

Internal problem ID [24498]
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 : 5
Date solved : Thursday, October 02, 2025 at 10:43:05 PM
CAS classification : [[_homogeneous, `class C`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} 2 x +y-4+\left (x -3 y+12\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.093 (sec). Leaf size: 29
ode:=2*x+y(x)-4+(x-3*y(x)+12)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\sqrt {7 c_1^{2} x^{2}+3}+\left (x +12\right ) c_1}{3 c_1} \]
Mathematica. Time used: 0.096 (sec). Leaf size: 63
ode=(2*x+y[x]-4 )+( x-3*y[x]+12   )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{3} \left (-i \sqrt {-7 x^2-9 (16+c_1)}+x+12\right )\\ y(x)&\to \frac {1}{3} \left (i \sqrt {-7 x^2-9 (16+c_1)}+x+12\right ) \end{align*}
Sympy. Time used: 0.969 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (x - 3*y(x) + 12)*Derivative(y(x), x) + y(x) - 4,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x}{3} - \frac {\sqrt {C_{1} + 7 x^{2}}}{3} + 4, \ y{\left (x \right )} = \frac {x}{3} + \frac {\sqrt {C_{1} + 7 x^{2}}}{3} + 4\right ] \]