71.3.18 problem 13

Internal problem ID [14297]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.1, page 40
Problem number : 13
Date solved : Monday, March 31, 2025 at 12:16:01 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&={| y|} \end{align*}

Maple. Time used: 0.044 (sec). Leaf size: 19
ode:=diff(y(x),x) = abs(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {{\mathrm e}^{-x}}{c_1} \\ y &= {\mathrm e}^{x} c_1 \\ \end{align*}
Mathematica. Time used: 0.202 (sec). Leaf size: 29
ode=D[y[x],x]==Abs[y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{| K[1]| }dK[1]\&\right ][x+c_1] \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.163 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-Abs(y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \int \limits ^{y{\left (x \right )}} \frac {1}{\left |{y}\right |}\, dy = C_{1} + x \]