30.5.7 problem 7

Internal problem ID [7506]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.6, Substitutions and Transformations. Exercises. page 76
Problem number : 7
Date solved : Tuesday, September 30, 2025 at 04:40:38 PM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

\begin{align*} \cos \left (x +y\right ) y^{\prime }&=\sin \left (x +y\right ) \end{align*}
Maple. Time used: 0.088 (sec). Leaf size: 32
ode:=cos(x+y(x))*diff(y(x),x) = sin(x+y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ -c_1 +x -\ln \left (\tan \left (x +y\right )+1\right )+\frac {\ln \left (\sec \left (x +y\right )^{2}\right )}{2}-y = 0 \]
Mathematica. Time used: 0.25 (sec). Leaf size: 59
ode=Cos[x+y[x]]*D[y[x],x]==Sin[x+y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [y(x)+\left (-\frac {1}{4}+\frac {i}{4}\right ) \log (-\tan (y(x)+x)+i)-\left (\frac {1}{4}+\frac {i}{4}\right ) \log (\tan (y(x)+x)+i)+\frac {1}{2} \log (\tan (y(x)+x)+1)=c_1,y(x)\right ] \]
Sympy. Time used: 7.670 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sin(x + y(x)) + cos(x + y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {x}{2} - \frac {y{\left (x \right )}}{2} - \frac {\log {\left (- \tan {\left (x + y{\left (x \right )} \right )} - 1 \right )}}{2} + \frac {\log {\left (\tan ^{2}{\left (x + y{\left (x \right )} \right )} + 1 \right )}}{4} = 0 \]