10.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 : Saturday, March 29, 2025 at 10:48:25 PM
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.187 (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]
 
\[ y(x)\to \tan \left (x^2+x+c_1\right ) \]
Sympy. Time used: 0.512 (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 )} \]