Exercise 4
The rule for integration by parts is: \[\int \left[ \frac{\mathrm{d}f(x)}{\mathrm{d}x} g(x) \right] \, \mathrm{d}x = f(x) g(x) - \int \left[ f(x) \frac{\mathrm{d}g(x)}{\mathrm{d}x} \right] \, \mathrm{d}x\]
Evaluation of the definite integral: \[\int^{\pi/2}_0 x \cos x \, \mathrm{d}x\]
Let \(g(x) := x\) und \(\frac{\mathrm{d}f(x)}{\mathrm{d}x} := \cos x\), this yields \(f(x) = \sin x\).
We get: \[\int x \cos x \, \mathrm{d}x = x \sin x - \int \sin x \frac{\mathrm{d}}{\mathrm{d}x}x\, \mathrm{d}x = x \sin x - ( -\cos x + C) = x \sin x + \cos x + C\] \[\int^{\pi/2}_0 x \cos x \, \mathrm{d}x = \left[x \sin x + \cos x \right]_0^{\pi/2} = \frac{\pi}{2} \sin \frac{\pi}{2} - \cos 0 =\frac{\pi}{2} -1 \]