71.8.41 problem 14 (a)

Internal problem ID [14404]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.4.4, page 115
Problem number : 14 (a)
Date solved : Monday, March 31, 2025 at 12:25:59 PM
CAS classification : [[_1st_order, _with_linear_symmetries], _Clairaut]

\begin{align*} y^{\prime }&=-\frac {x}{2}+\frac {\sqrt {x^{2}+4 y}}{2} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=1 \end{align*}

Maple. Time used: 0.445 (sec). Leaf size: 15
ode:=diff(y(x),x) = -1/2*x+1/2*(x^2+4*y(x))^(1/2); 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\begin{align*} y &= 1-x \\ y &= 1+x \\ \end{align*}
Mathematica. Time used: 0.533 (sec). Leaf size: 17
ode=D[y[x],x]==(-x+Sqrt[x^2+4*y[x]])/2; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 1-x \\ y(x)\to x+1 \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x/2 - sqrt(x**2 + 4*y(x))/2 + Derivative(y(x), x),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants