29.5.12 problem 128

Internal problem ID [4729]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 5
Problem number : 128
Date solved : Tuesday, March 04, 2025 at 07:11:49 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=\sqrt {a +b \cos \left (y\right )} \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 21
ode:=diff(y(x),x) = (a+b*cos(y(x)))^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ x -\int _{}^{y \left (x \right )}\frac {1}{\sqrt {a +b \cos \left (\textit {\_a} \right )}}d \textit {\_a} +c_{1} = 0 \]
Mathematica. Time used: 0.724 (sec). Leaf size: 55
ode=D[y[x],x]==Sqrt[a+b Cos[ y[x]]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 2 \operatorname {JacobiAmplitude}\left (\frac {1}{2} \sqrt {a+b} (x+c_1),\frac {2 b}{a+b}\right ) \\ y(x)\to -\arccos \left (-\frac {a}{b}\right ) \\ y(x)\to \arccos \left (-\frac {a}{b}\right ) \\ \end{align*}
Sympy. Time used: 0.680 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-sqrt(a + b*cos(y(x))) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \int \limits ^{y{\left (x \right )}} \frac {1}{\sqrt {a + b \cos {\left (y \right )}}}\, dy = C_{1} + x \]