12.4.12 problem 12

Internal problem ID [1619]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Existence and Uniqueness of Solutions of Nonlinear Equations. Section 2.3 Page 60
Problem number : 12
Date solved : Saturday, March 29, 2025 at 11:07:55 PM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

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

Maple. Time used: 0.009 (sec). Leaf size: 42
ode:=diff(y(x),x) = (x+y(x))^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ x -2 \sqrt {x +y}-\ln \left (-1+\sqrt {x +y}\right )+\ln \left (1+\sqrt {x +y}\right )+\ln \left (-1+x +y\right )-c_1 = 0 \]
Mathematica. Time used: 7.968 (sec). Leaf size: 59
ode=D[y[x],x]==(x+y[x])^(1/2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to W\left (-e^{-\frac {x}{2}-1-\frac {c_1}{2}}\right ){}^2+2 W\left (-e^{-\frac {x}{2}-1-\frac {c_1}{2}}\right )-x+1 \\ y(x)\to 1-x \\ \end{align*}
Sympy. Time used: 1.510 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt(x + y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x - 2 \sqrt {x + y{\left (x \right )}} + 2 \log {\left (\sqrt {x + y{\left (x \right )}} + 1 \right )} = 0 \]