23.1.111 problem 114

Internal problem ID [4718]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 114
Date solved : Tuesday, September 30, 2025 at 08:19:22 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: 0.122 (sec). Leaf size: 52
ode=D[y[x],x]==a+b*Cos[y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{a+b \cos (K[1])}dK[1]\&\right ][x+c_1]\\ y(x)&\to -\arccos \left (-\frac {a}{b}\right )\\ y(x)&\to \arccos \left (-\frac {a}{b}\right ) \end{align*}
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