10.6.3 problem 3

Internal problem ID [1220]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Miscellaneous problems, end of chapter 2. Page 133
Problem number : 3
Date solved : Thursday, March 13, 2025 at 03:55:30 PM
CAS classification : [_rational]

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

With initial conditions

\begin{align*} y \left (0\right )&=0 \end{align*}

Maple. Time used: 0.079 (sec). Leaf size: 75
ode:=diff(y(x),x) = (2*x+y(x))/(3-x+3*y(x)^2); 
ic:=y(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {\left (108 x^{2}+12 \sqrt {81 x^{4}-12 x^{3}+108 x^{2}-324 x +324}\right )^{{2}/{3}}+12 x -36}{6 \left (108 x^{2}+12 \sqrt {81 x^{4}-12 x^{3}+108 x^{2}-324 x +324}\right )^{{1}/{3}}} \]
Mathematica. Time used: 5.329 (sec). Leaf size: 114
ode=D[y[x],x] == (2*x+y[x])/(3-x+3*y[x]^2); 
ic=y[0]==0; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {\sqrt [3]{2} \left (\sqrt {3} \sqrt {27 x^4-4 x^3+36 x^2-108 x+108}-9 x^2\right )^{2/3}+2 \sqrt [3]{3} x-6 \sqrt [3]{3}}{6^{2/3} \sqrt [3]{\sqrt {3} \sqrt {27 x^4-4 x^3+36 x^2-108 x+108}-9 x^2}} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-2*x - y(x))/(-x + 3*y(x)**2 + 3) + Derivative(y(x), x),0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out