6.5.14 problem 10

Internal problem ID [1638]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : 10
Date solved : Tuesday, September 30, 2025 at 04:41:01 AM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }-2 y&=2 \sqrt {y} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.105 (sec). Leaf size: 12
ode:=diff(y(x),x)-2*y(x) = 2*y(x)^(1/2); 
ic:=[y(0) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \left (2 \,{\mathrm e}^{x}-1\right )^{2} \]
Mathematica. Time used: 0.008 (sec). Leaf size: 14
ode=D[y[x],x]-2*y[x]==2*y[x]^(1/2); 
ic=y[0]==1; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \left (1-2 e^x\right )^2 \end{align*}
Sympy. Time used: 17.263 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*sqrt(y(x)) - 2*y(x) + Derivative(y(x), x),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 4 e^{2 x} - 4 e^{x} + 1 \]