29.4.22 problem 111

Internal problem ID [4713]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 4
Problem number : 111
Date solved : Sunday, March 30, 2025 at 03:48:09 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.008 (sec). Leaf size: 43
ode:=diff(y(x),x) = a+b*cos(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 2 \arctan \left (\frac {\tan \left (\frac {\sqrt {a^{2}-b^{2}}\, \left (c_1 +x \right )}{2}\right ) \sqrt {a^{2}-b^{2}}}{a -b}\right ) \]
Mathematica. Time used: 60.135 (sec). Leaf size: 47
ode=D[y[x],x]==a+b Cos[y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 2 \arctan \left (\frac {(a+b) \tanh \left (\frac {1}{2} \sqrt {b^2-a^2} (x+c_1)\right )}{\sqrt {b^2-a^2}}\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a - b*cos(y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : < not supported between instances of NoneType and y