\(\int\left(\sin x + \cos x\right)^2 dx\) is equal to (where C is a constant of integration)
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → \(x - \displaystyle\frac{1}{2}\cos 2x + C\)
Expanding the square and using \(\sin^2 x + \cos^2 x = 1\) and \(2\sin x\cos x = \sin 2x\):
\(\left(\sin x + \cos x\right)^2 = \sin^2 x + \cos^2 x + 2\sin x\cos x\)
\(\left(\sin x + \cos x\right)^2 = 1 + \sin 2x\)
Integrating term by term, with \(\int\sin 2x\,dx = -\frac{1}{2}\cos 2x\):
\( \displaystyle \int (1 + \sin 2x)\,dx = x - \frac{1}{2}\cos 2x + C \)
Why the other options are incorrect
Option (1) \(\displaystyle\frac{\left(\sin x + \cos x\right)^3}{3} + C\) — Incorrect. The power rule does not apply here, because \(\sin x + \cos x\) is not x; its derivative has an extra factor \(\cos x - \sin x\).
Option (2) \(x + \displaystyle\frac{1}{2}\cos 2x + C\) — Incorrect. Its derivative is \(1 - \sin 2x\); the sign of the integral of \(\sin 2x\) is wrong.
Option (4) \(x - \cos 2x + C\) — Incorrect. Its derivative is \(1 + 2\sin 2x\); the factor \(\frac{1}{2}\) from the 2x inside is missing.