Integration by parts: ∫u·dv = u·v − ∫v·du, from the product rule. Choose u as the factor that gets simpler when you differentiate it (a power of x, or ln x), and dv as the factor you can integrate (eˣ, sin x, cos x, or x when u = ln x). For a definite integral, evaluate u·v at both limits: ∫ₐᵇ u dv = [u·v]ₐᵇ − ∫ₐᵇ v du. A factor x² needs two rounds.
Choose u and dv
u = x, du = dx; dv = sin x dx, v = −cos x
Antiderivative
∫x sin x dx = −x cos x + ∫cos x dx = −x cos x + sin x
Limits
(−π/2·cos π/2 + sin π/2) − (0 + 0) = 1