10.2.4 problem 4

Internal problem ID [1132]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.2. Page 48
Problem number : 4
Date solved : Saturday, March 29, 2025 at 10:40:49 PM
CAS classification : [_separable]

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

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