2.1.5 problem 5

Internal problem ID [655]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 1.2. Integrals as general and particular solutions. Page 16
Problem number : 5
Date solved : Tuesday, September 30, 2025 at 04:05:02 AM
CAS classification : [_quadrature]

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

With initial conditions

\begin{align*} y \left (2\right )&=-1 \\ \end{align*}
Maple. Time used: 0.030 (sec). Leaf size: 13
ode:=diff(y(x),x) = 1/(x+2)^(1/2); 
ic:=[y(2) = -1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = 2 \sqrt {2+x}-5 \]
Mathematica. Time used: 0.003 (sec). Leaf size: 16
ode=D[y[x],x] == 1/(2+x)^(1/2); 
ic=y[2]==-1; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 2 \sqrt {x+2}-5 \end{align*}
Sympy. Time used: 0.077 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 1/sqrt(x + 2),0) 
ics = {y(2): -1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 2 \sqrt {x + 2} - 5 \]