4.6.14 problem 14

Internal problem ID [1231]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Miscellaneous problems, end of chapter 2. Page 133
Problem number : 14
Date solved : Tuesday, September 30, 2025 at 04:30:18 AM
CAS classification : [[_homogeneous, `class A`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

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

With initial conditions

\begin{align*} y \left (2\right )&=3 \\ \end{align*}
Maple. Time used: 0.118 (sec). Leaf size: 19
ode:=x+y(x)+(x+2*y(x))*diff(y(x),x) = 0; 
ic:=[y(2) = 3]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {x}{2}+\frac {\sqrt {-x^{2}+68}}{2} \]
Mathematica. Time used: 0.246 (sec). Leaf size: 24
ode=x+y[x]+(x+2*y[x])*D[y[x],x] == 0; 
ic=y[2]==3; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} \left (\sqrt {68-x^2}-x\right ) \end{align*}
Sympy. Time used: 0.866 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x + (x + 2*y(x))*Derivative(y(x), x) + y(x),0) 
ics = {y(2): 3} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {x}{2} + \frac {\sqrt {68 - x^{2}}}{2} \]