4.6.13 problem 13

Internal problem ID [1230]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Miscellaneous problems, end of chapter 2. Page 133
Problem number : 13
Date solved : Tuesday, September 30, 2025 at 04:30:15 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=1+2 x +y^{2}+2 x y^{2} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 11
ode:=diff(y(x),x) = 1+2*x+y(x)^2+2*x*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (x^{2}+c_1 +x \right ) \]
Mathematica. Time used: 0.141 (sec). Leaf size: 13
ode=D[y[x],x] == 1+2*x+y[x]^2+2*x*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \tan \left (x^2+x+c_1\right ) \end{align*}
Sympy. Time used: 0.339 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*y(x)**2 - 2*x - y(x)**2 + Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \tan {\left (C_{1} + x^{2} + x \right )} \]