Odd or even function. Determine whether the following function is odd or even :
$$f(x) =(\cos{x} + \sin{x} +1)(\cos{x} + \sin{x} -1)$$
My turn :
$$f(x) = (\cos{x}+ \sin{x})^2 -1= \sin{2x}$$
Then f is an odd function
Another turn :
$$f(-x) = (\cos{x}- \sin{x} +1)(\cos{x} -\sin{x} -1)$$
But the last form seems neither odd nor even. My question is why i could not reach the same another using the last form ?
 A: The last form is equal to $$(\cos x-\sin x)^2-1=-\sin 2x.$$
Thus $f$ is still odd.
A: While it seems that everything in the original post is correct, you want to show that: 
$f(x) = -f(-x)$ 
$(\cos x + \sin  x + 1)(\cos x +\sin x - 1) = -(\cos (-x) +\sin (-x) + 1)(\cos (-x) + \sin (-x) -1)\\
(\cos x + \sin  x + 1)(\cos x +\sin x - 1) = -(\cos x -\sin x + 1)(\cos x - \sin x -1)\\
(\cos x + \sin x)^2 - 1  = -(\cos x - \sin x)^2 + 1\\
2\sin x\cos x = 2\sin x\cos x$
It is not obvious that 
$f(x) = (\cos x + \sin  x + 1)(\cos x +\sin x - 1)$ because neither of the factors are odd nor even.  Nonetheless, it is.
A: Let $c=\cos \frac x2; s=\sin \frac x2$
Then $(\cos x + \sin x + 1)=2c(c+s)$ and $(\cos x + \sin x -1)=2s(c-s)$
Also $(\cos x - \sin x +1)= 2c(c-s)$ and $(\cos x - \sin x -1)=-2s(c+s)$
So you can see that the $c-s$ and $c+s$ factors switch between the brackets alongside the sign change.
So you either need to put everything together and go to the product $\sin 2x$ or to analyse the factors by going to half-angle formulae to see how the overall function works.
