Home » Blog » Compute the integral

Compute the integral

Compute the following integral:

    \[ \int_0^y (\sin^2 x + x) \, dx.\]


We have

    \begin{align*}  \int_0^y (\sin^2 x + x) \, dx &= \frac{1}{2} \int_0^y (1 - \cos (2x)) \, dx + \int_0^y x \, dx \\  &= \frac{y}{2} - \frac{1}{4} \int_0^y \cos x \, dx + \frac{y^2}{2}  \\  &= -\frac{1}{4} \sin y + \frac{y}{2} + \frac{y^2}{2}. \end{align*}

On the second line we used the theorem on expansion/contraction of the interval of integration. Theorem 1.19 in Apostol, I believe.

Note, on the first line we used the trig identity \sin^2 x = \frac{1}{2}(1 - \cos (2x)). I keep evaluating the integrals \int \sin^2 x \, dx this way. I think Apostol does give a formula for the solution of \int_0^a \sin^2 x \, dx in the text, so you could save some effort by using that. I can’t always remember all those specialized formulas, so it’s easier to just solve it directly from the trig identity, since I remember those and they come up all the time in other contexts. Of course, as always, do what you like best.

2 comments

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):