89.6.7 problem 7

Internal problem ID [24390]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Miscellaneous Exercises at page 45
Problem number : 7
Date solved : Thursday, October 02, 2025 at 10:24:14 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }-\cos \left (x \right )&=\tan \left (y\right )^{2} \cos \left (x \right ) \end{align*}
Maple. Time used: 0.014 (sec). Leaf size: 22
ode:=diff(y(x),x)-cos(x) = cos(x)*tan(y(x))^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\operatorname {RootOf}\left (-\textit {\_Z} +4 c_1 +4 \sin \left (x \right )-\sin \left (\textit {\_Z} \right )\right )}{2} \]
Mathematica. Time used: 0.187 (sec). Leaf size: 32
ode=D[y[x],x] - Cos[x]== Cos[x]*Tan[ y[x] ]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [2 \left (\frac {\text {$\#$1}}{2}+\frac {1}{4} \sin (2 \text {$\#$1})\right )\&\right ][2 \sin (x)+c_1] \end{align*}
Sympy. Time used: 5.824 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-cos(x)*tan(y(x))**2 - cos(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \frac {y{\left (x \right )}}{2} - \sin {\left (x \right )} + \frac {\sin {\left (y{\left (x \right )} \right )} \cos {\left (y{\left (x \right )} \right )}}{2} = C_{1} \]