12.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, March 04, 2025 at 12:58:09 PM
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.021 (sec). Leaf size: 16
ode:=diff(y(x),x)-2*y(x) = 2*y(x)^(1/2); 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = 4 \,{\mathrm e}^{2 x}-4 \,{\mathrm e}^{x}+1 \]
Mathematica. Time used: 0.01 (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]
 
\[ y(x)\to \left (1-2 e^x\right )^2 \]
Sympy. Time used: 0.437 (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 \]