19.1.26 problem 26

Internal problem ID [4238]
Book : Advanced Mathematica, Book2, Perkin and Perkin, 1992
Section : Chapter 11.3, page 316
Problem number : 26
Date solved : Tuesday, September 30, 2025 at 07:08:10 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left ({\mathrm e}^{4}\right )&=5 \\ \end{align*}
Maple. Time used: 0.045 (sec). Leaf size: 12
ode:=x*y(x)*diff(y(x),x) = (y(x)^2-9)^(1/2); 
ic:=[y(exp(4)) = 5]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \sqrt {9+\ln \left (x \right )^{2}} \]
Mathematica. Time used: 0.145 (sec). Leaf size: 33
ode=x*y[x]*D[y[x],x]==Sqrt[y[x]^2-9]; 
ic=y[Exp[4]]==5; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \sqrt {\log ^2(x)+9}\\ y(x)&\to \sqrt {\log ^2(x)-16 \log (x)+73} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x)*Derivative(y(x), x) - sqrt(y(x)**2 - 9),0) 
ics = {y(exp(4)): 5} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants