29.26.23 problem 759

Internal problem ID [5344]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 26
Problem number : 759
Date solved : Tuesday, March 04, 2025 at 09:29:51 PM
CAS classification : [_quadrature]

\begin{align*} {y^{\prime }}^{2}&=a +b y^{2} \end{align*}

Maple. Time used: 0.033 (sec). Leaf size: 99
ode:=diff(y(x),x)^2 = a+b*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y \left (x \right ) &= \frac {\sqrt {-a b}}{b} \\ y \left (x \right ) &= -\frac {\sqrt {-a b}}{b} \\ y \left (x \right ) &= -\frac {{\mathrm e}^{-\sqrt {b}\, \left (x +c_{1} \right )} \left (a \,{\mathrm e}^{2 c_{1} \sqrt {b}}-{\mathrm e}^{2 \sqrt {b}\, x}\right )}{2 \sqrt {b}} \\ y \left (x \right ) &= \frac {{\mathrm e}^{-\sqrt {b}\, \left (x +c_{1} \right )} \left (-a \,{\mathrm e}^{2 \sqrt {b}\, x}+{\mathrm e}^{2 c_{1} \sqrt {b}}\right )}{2 \sqrt {b}} \\ \end{align*}
Mathematica. Time used: 1.225 (sec). Leaf size: 92
ode=(D[y[x],x])^2==a+b*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\sqrt {a} \sinh \left (\sqrt {b} (x-c_1)\right )}{\sqrt {b}} \\ y(x)\to \frac {\sqrt {a} \sinh \left (\sqrt {b} (x+c_1)\right )}{\sqrt {b}} \\ y(x)\to -\frac {i \sqrt {a}}{\sqrt {b}} \\ y(x)\to \frac {i \sqrt {a}}{\sqrt {b}} \\ \end{align*}
Sympy. Time used: 17.878 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a - b*y(x)**2 + Derivative(y(x), x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {\sqrt {a} \sinh {\left (\sqrt {b} \left (C_{1} - x\right ) \right )}}{\sqrt {b}}, \ y{\left (x \right )} = \frac {\sqrt {a} \sinh {\left (\sqrt {b} \left (C_{1} + x\right ) \right )}}{\sqrt {b}}\right ] \]