Evaluate the derivative when $x$ is equal to a value

For the derivative $$f^{\prime}(𝑥) = \cos𝑥 - x\sin(x)$$. I need to evaluate it when $$x=\frac{\pi}{4}$$.

The textbook shows the result as : $$f^{\prime}(\frac{\pi}{4})=\frac{\sqrt{2}}{8}(4−\pi)$$

Unfortunately, I don't know how to get to that result.

Can someone show me step by step? Thank you so much in advance!

• You need to recognize that you are just evaluating a function at a point. The fact that the function is a derivative of some other function is immaterial. Plug the given $x$ in as the argument of the function. Sep 28, 2019 at 2:47

When $$x=\frac \pi 4$$ you have $$\cos(x)=\sin(x)=\frac {\sqrt 2}{2}$$, so
$$\cos(x) - x\sin(x) \\=\frac {\sqrt 2}{2}-\frac \pi 4 \times\frac {\sqrt 2}{2} \\= \frac {\sqrt 2}{2} \left(1-\frac \pi 4\right) \\= \frac {\sqrt 2}{8}(4-\pi)$$