76.4.1 problem 1

Internal problem ID [17324]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.6 (Exact equations and integrating factors). Problems at page 100
Problem number : 1
Date solved : Monday, March 31, 2025 at 03:52:44 PM
CAS classification : [_separable]

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

Maple. Time used: 0.003 (sec). Leaf size: 43
ode:=2*x+3+(2*y(x)-2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= 1-\sqrt {-x^{2}-c_1 -3 x +1} \\ y &= 1+\sqrt {-x^{2}-c_1 -3 x +1} \\ \end{align*}
Mathematica. Time used: 0.13 (sec). Leaf size: 51
ode=(2*x+3)+(2*y[x]-2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 1-\sqrt {-x^2-3 x+1+2 c_1} \\ y(x)\to 1+\sqrt {-x^2-3 x+1+2 c_1} \\ \end{align*}
Sympy. Time used: 0.387 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (2*y(x) - 2)*Derivative(y(x), x) + 3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = 1 - \sqrt {C_{1} - x^{2} - 3 x}, \ y{\left (x \right )} = \sqrt {C_{1} - x^{2} - 3 x} + 1\right ] \]