35.3.5 problem 5

Internal problem ID [6109]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 3. Linear First-Order Equations. page 403
Problem number : 5
Date solved : Monday, January 27, 2025 at 01:36:22 PM
CAS classification : [_linear]

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

Solution by Maple

Time used: 0.002 (sec). Leaf size: 28

dsolve(diff(y(x),x)*cos(x)+y(x)=cos(x)^2,y(x), singsol=all)
 
\[ y = \frac {\left (x -\cos \left (x \right )+c_1 \right ) \left (\cos \left (x \right )-\sin \left (x \right )+1\right )}{\cos \left (x \right )+\sin \left (x \right )+1} \]

Solution by Mathematica

Time used: 0.076 (sec). Leaf size: 25

DSolve[D[y[x],x]*Cos[x]+y[x]==Cos[x]^2,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^{-2 \text {arctanh}\left (\tan \left (\frac {x}{2}\right )\right )} (x-\cos (x)+c_1) \]