Calculus

Answer & solution
Official answer: 4
Step 1: On the integration interval x is nonnegative; sin x is nonnegative on [0,π] and nonpositive on [π,2π]. Thus split the absolute-value integral as ∫₀^π x sin x dx−∫π2π x sin x dx. Step 2: Integration by parts gives the antiderivative −x cos x+sin x. The first ordinary integral is π, and the second is −3π. Step 3: The absolute areas add to π+3π=4π, so k=4. Integrating without splitting the absolute value would incorrectly allow cancellation.