7.5.59 problem 59

Internal problem ID [163]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.6 (substitution and exact equations). Problems at page 72
Problem number : 59
Date solved : Saturday, March 29, 2025 at 04:37:36 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {x -y-1}{x +y+3} \end{align*}

Maple. Time used: 0.126 (sec). Leaf size: 32
ode:=diff(y(x),x) = (x-y(x)-1)/(x+y(x)+3); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\sqrt {2 \left (x +1\right )^{2} c_1^{2}+1}+\left (-x -3\right ) c_1}{c_1} \]
Mathematica. Time used: 0.149 (sec). Leaf size: 53
ode=D[y[x],x]==(x-y[x]-1)/(x+y[x]+3); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {2 x^2+4 x+9+c_1}-x-3 \\ y(x)\to \sqrt {2 x^2+4 x+9+c_1}-x-3 \\ \end{align*}
Sympy. Time used: 1.943 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x + y(x) + 1)/(x + y(x) + 3) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - x - \sqrt {C_{1} + 2 x^{2} + 4 x} - 3, \ y{\left (x \right )} = - x + \sqrt {C_{1} + 2 x^{2} + 4 x} - 3\right ] \]