How to use derivatives to prove that $f(x)=2\cos^2\left(\frac{\pi }{4}-\frac{x}{2}\right)-\sin \left(x\right)=1$?

172 Views Asked by At

I'm supposed to use the derivative to prove that $$f(x)=2\cos ^2\left(\frac{\pi }{4}-\frac{x}{2}\right)-\sin \left(x\right)=1$$

What I have so far is:

$$f'\left(x\right)=D\left(2\left(\cos\left(\frac{\pi}{4}-\frac{x}{2}\right)\right)^2\right)-D\left(\sin\left(x\right)\right)=1$$

$$f\:'\left(x\right)=4\cos\left(\frac{\pi}{4}-\frac{x}{2}\right)\left(-\frac{1}{2}\sin\left(\frac{\pi}{4}-\frac{x}{2}\right)\right)-\cos\left(x\right)=1$$

$$f\:'\left(x\right)=-2\sin\left(\frac{\pi}{4}-\frac{x}{2}\right)\cos\left(\frac{\pi}{4}-\frac{x}{2}\right)-\cos\left(x\right)=1$$

And by continuing this I can get all the way to zero, which would mean that $0=1$ and from there by taking the derivative of $1$ we'd get $0=0$, which is obviously true. But what I'm confused about is that even if the constant was any number, let's say two, the equation would still come out as true. And obviously, the original function doesn't equal two.

I'm assuming that I'm somehow supposed to get $1$ to the left side as well? Honestly, I've gone through the formulas so many times, and yet I can't figure out how to do it.

2

There are 2 best solutions below

1
On

You have that $f'(x)=0$, so $f(x)=c$. Now substitute a "nice" value into $f$ to get the value of $c$.

0
On

$f(x)$ is $$2cos^2 \left(\frac{\pi}{4}-\frac{x}{2}\right)-sin(x) \ \ \ \ (1) $$

The derivative of $f(x)$ is:

$$f'(x) = 2 * 2* cos\left(\frac{\pi}{4}-\frac{x}{2}\right) * \left(-sin\left(\frac{\pi}{4}-\frac{x}{2}\right)*(-\frac{1}{2})\right) \iff$$

$$f'(x)=2cos\left(\frac{\pi}{4}-\frac{x}{2}\right) sin\left(\frac{\pi}{4}-\frac{x}{2}\right)-cos(x)=sin\left(\frac{\pi}{2}-x\right)-cos(x)=0 \ \forall x\in \mathbb R$$

where the identity $sin(2x)=2cos(x)sin(x) $ was used. Now, by knowing $f'(x) = 0 \ \forall x \in \mathbb R $ you can say $$f(x) = c \ \forall x\in \mathbb R$$ based on a consequence of the mean value theorem. If you now set $x=0$ to the initial formula for $f(x), (1) $ you get $f(0)=1$ and thefore: $$ f(x)=1 \ \forall x\in \mathbb R$$