1.2.13 problem 15

Internal problem ID [31]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.3. Problems at page 27
Problem number : 15
Date solved : Tuesday, September 30, 2025 at 03:38:45 AM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

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

With initial conditions

\begin{align*} y \left (2\right )&=2 \\ \end{align*}
Maple. Time used: 0.490 (sec). Leaf size: 61
ode:=diff(y(x),x) = (x-y(x))^(1/2); 
ic:=[y(2) = 2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -{\mathrm e}^{2 \operatorname {RootOf}\left (\textit {\_Z} -x -2 \,{\mathrm e}^{\textit {\_Z}}+4-\ln \left ({\mathrm e}^{\textit {\_Z}} \left ({\mathrm e}^{\textit {\_Z}}-2\right )^{2}\right )\right )}+2 \,{\mathrm e}^{\operatorname {RootOf}\left (\textit {\_Z} -x -2 \,{\mathrm e}^{\textit {\_Z}}+4-\ln \left ({\mathrm e}^{\textit {\_Z}} \left ({\mathrm e}^{\textit {\_Z}}-2\right )^{2}\right )\right )}+x -1 \]
Mathematica
ode=D[y[x],x]==Sqrt[x-y[x]]; 
ic={y[2]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

{}

Sympy. Time used: 0.529 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt(x - y(x)) + Derivative(y(x), x),0) 
ics = {y(2): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ x + 2 \sqrt {x - y{\left (x \right )}} + 2 \log {\left (\sqrt {x - y{\left (x \right )}} - 1 \right )} - 2 - 2 i \pi = 0 \]