15.22.1 problem 1

Internal problem ID [3335]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 40, page 186
Problem number : 1
Date solved : Tuesday, March 04, 2025 at 04:36:20 PM
CAS classification : [_quadrature]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}

With initial conditions

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

Maple. Time used: 0.003 (sec). Leaf size: 11
Order:=5; 
ode:=diff(y(x),x) = (1-y(x))^(1/2); 
ic:=y(0) = 0; 
dsolve([ode,ic],y(x),type='series',x=0);
 
\[ y \left (x \right ) = x -\frac {1}{4} x^{2} \]
Mathematica. Time used: 0.098 (sec). Leaf size: 12
ode=D[y[x],x]==(1-y[x])^(1/2); 
ic={y[0]==0}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,4}]
 
\[ y(x)\to x-\frac {x^2}{4} \]
Sympy. Time used: 0.834 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt(1 - y(x)) + Derivative(y(x), x),0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics,hint="1st_power_series",x0=0,n=5)
 
\[ y{\left (x \right )} = x - \frac {x^{2}}{4} + O\left (x^{5}\right ) \]