12.3.9 problem 10

Internal problem ID [1586]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. separable equations. Section 2.2 Page 52
Problem number : 10
Date solved : Saturday, March 29, 2025 at 11:00:43 PM
CAS classification : [_separable]

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

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