67.1.5 problem Problem 1(e)

Internal problem ID [13881]
Book : APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section : Chapter 2, First Order Equations. Problems page 149
Problem number : Problem 1(e)
Date solved : Monday, March 31, 2025 at 08:16:08 AM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

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

Maple. Time used: 0.012 (sec). Leaf size: 16
ode:=diff(y(x),x) = cos(x+y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x -2 \arctan \left (-x +c_1 \right ) \]
Mathematica. Time used: 0.824 (sec). Leaf size: 59
ode=D[y[x],x]==Cos[x+y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -x+2 \arctan \left (x+\frac {c_1}{2}\right ) \\ y(x)\to -x+2 \arctan \left (x+\frac {c_1}{2}\right ) \\ y(x)\to -x-\pi \\ y(x)\to \pi -x \\ \end{align*}
Sympy. Time used: 0.786 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-cos(x + y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - x + 2 \operatorname {atan}{\left (C_{1} + x \right )} \]