# Why is this simplification possible?

So I have stumbled into a simplification operation in a maths book about integrals, but it does not provide any explanation why or how is this operation is possible.
$${5*(cos^2x-sin^2x)\over sinx+cosx}=5*(cosx-sinx)$$ I have tried to apply a number of trigonometric identities and transformations but a solution eludes me. Obviously you can just divide by 5 to get ${cos^2x-sin^2x\over sinx+cosx}=cosx-sinx$.
I tried to apply $sin^2x+cos^2x=1$, in different ways, but got nowhere. I would like to know how is this simplification is possible.

• $\cos^2(x) - \sin^2(x) = (\cos(x) - \sin(x))(\cos(x) + \sin(x))$ – Andrew D Mar 27 '14 at 17:42
• And don't be fooled by the incorrect placement of the exponents in $\cos^2 x$ and $\sin^2 x$. – Marc van Leeuwen Mar 27 '14 at 17:46
• To all of the answers here it is important that $\cos x\neq \sin x$. – JP McCarthy Mar 27 '14 at 17:47
• $cos^2x$ is a correct placement, $cos^2x=(cosx)*(cosx)$, at least this is how we use it all the time. – uLoop Mar 27 '14 at 18:00

Use the conjugate rule, $a^2 - b^2 = (a+b)(a-b)$.
Thus $$\frac{5(\cos^2 x - \sin^2 x)}{\sin x + \cos x} = \frac{5(\cos x + \sin x)(\cos x - \sin x)}{\sin x + \cos x} = 5(\cos x - \sin x)$$
\begin{align}{5(\cos^2x-\sin^2x)\over \sin x+\cos x} & = \frac{5(\cos x - \sin x)(\cos x + \sin x)}{\sin x + \cos x} \\ \\ & = \require{cancel}\frac{5(\cos x - \sin x)(\cancel{\cos x + \sin x})}{\cancel{\cos x+ \sin x}}\\ \\ & = 5(\cos x-\sin x)\end{align}
$a^2-b^2$= $(a+b)(a-b)$, hence $\cos^{2}(x)-\sin^{2}(x)$ = $(\cos x+\sin x)(\cos x-\sin x)$.