76.1.26 problem 26

Internal problem ID [17254]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.1 (Separable equations). Problems at page 44
Problem number : 26
Date solved : Monday, March 31, 2025 at 03:46:38 PM
CAS classification : [_separable]

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

With initial conditions

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

Maple. Time used: 0.155 (sec). Leaf size: 43
ode:=2*y(x)*diff(y(x),x) = x/(x^2-4)^(1/2); 
ic:=y(3) = -1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\frac {\sqrt {\sqrt {x^{2}-4}\, \left (\left (-\sqrt {5}+1\right ) \sqrt {x^{2}-4}+x^{2}-4\right )}}{\sqrt {x^{2}-4}} \]
Mathematica. Time used: 1.734 (sec). Leaf size: 29
ode=2*y[x]*D[y[x],x]==x/Sqrt[x^2-4]; 
ic={y[3]==-1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\sqrt {\sqrt {x^2-4}-\sqrt {5}+1} \]
Sympy. Time used: 0.502 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x/sqrt(x**2 - 4) + 2*y(x)*Derivative(y(x), x),0) 
ics = {y(3): -1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \sqrt {\sqrt {x^{2} - 4} - \sqrt {5} + 1} \]