10.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 : Saturday, March 29, 2025 at 10:48:29 PM
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.137 (sec). Leaf size: 19
ode:=x+y(x)+(x+2*y(x))*diff(y(x),x) = 0; 
ic:=y(2) = 3; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\frac {x}{2}+\frac {\sqrt {-x^{2}+68}}{2} \]
Mathematica. Time used: 0.443 (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]
 
\[ y(x)\to \frac {1}{2} \left (\sqrt {68-x^2}-x\right ) \]
Sympy. Time used: 1.369 (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} \]