10.5.1 problem 1

Internal problem ID [1193]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.6. Page 100
Problem number : 1
Date solved : Saturday, March 29, 2025 at 10:45:29 PM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 43
ode:=3+2*x+(-2+2*y(x))*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.12 (sec). Leaf size: 51
ode=3+2*x+(-2+2*y[x])*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 ] \]