Why is the integral of $\cos(x) - \sin(x)$ from $0$ to $π/4$ equal to $\sqrt2 - 1$?

79 Views Asked by At

Why is $$\int_ {0}^{π/4} {\cos(x)} - {\sin(x)} \ \mathrm{d}x=\sqrt2 -1$$

This answer popped up on a problem I was doing and it piqued my interest. Can anyone help me out?

2

There are 2 best solutions below

0
On

$$\int_0^{\pi/4}\cos x - \sin x\ dx\\ =[\sin x + \cos x]_0^{\pi/4}\\ =\sin \frac{\pi}{4}+\cos\frac{\pi}4-\sin0-\cos0\\ =\frac{\sqrt{2}}{2}+\frac{\sqrt{2}}{2}-1\\ =\sqrt2-1$$

2
On

Hint: $$\cos x - \sin x = \sqrt2\sin\left(\frac{\pi}{4}-x\right).$$