Example 3. Find the derivative of the function $y=x \cos x$.
Solution. Using formulas (2.4), (2. $6^{\prime \prime \prime}$ ) and (2.8), we find

\[
\begin{gathered}
y^{\prime}=(x \cos x)^{\prime}=x^{\prime} \cos x+x(\cos x)^{\prime}=1 \cdot \cos x+x(-\sin x)= \\
=\cos x-x \sin x
\end{gathered}
\]