87.6.16 problem 19

Internal problem ID [23333]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 1. Elementary methods. First order differential equations. Exercise at page 53
Problem number : 19
Date solved : Thursday, October 02, 2025 at 09:37:51 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {5 x -y-2}{x +y+4} \end{align*}
Maple. Time used: 0.164 (sec). Leaf size: 33
ode:=diff(y(x),x) = (5*x-y(x)-2)/(x+y(x)+4); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\sqrt {1+54 \left (x +\frac {1}{3}\right )^{2} c_1^{2}}+\left (-3 x -12\right ) c_1}{3 c_1} \]
Mathematica. Time used: 0.094 (sec). Leaf size: 53
ode=D[y[x],x]==(5*x-y[x]-2)/(x+y[x]+4); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\sqrt {6 x^2+4 x+16+c_1}-x-4\\ y(x)&\to \sqrt {6 x^2+4 x+16+c_1}-x-4 \end{align*}
Sympy. Time used: 1.492 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (5*x - y(x) - 2)/(x + y(x) + 4),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - x - \frac {\sqrt {C_{1} + 54 x^{2} + 36 x}}{3} - 4, \ y{\left (x \right )} = - x + \frac {\sqrt {C_{1} + 54 x^{2} + 36 x}}{3} - 4\right ] \]