# What's wrong in this evaluation of the definite integral of $\sin^2 (x/3)$?

I tried evaluating $\displaystyle\int_{3\pi/4}^{3\pi/2}\sin^2 \left(\frac {1} {3} x \right) dx$ by first using integration by parts and u-substitution to find the indefinite integral, and then using the Second Fundamental Theorem of Calculus to get the definite integral. Here is my work:

$$\int \sin^2 \left(\frac {1} {3} x\right)\,dx\\ u = \frac {1} {3} x\\ $$\begin{split} 3\int sin^2 u\,du = 3\sin u \int \sin u \,du - 3\int \left(\sin u \int \sin u \,du \right) \,du\\ = - 3\sin u \cos u - 3 \int \sin u \cos u \,du\\ v = \sin u\\ - 3\sin u \cos u - 3\int v \,dv = -3 \sin u \cos u - \frac {3v^2} {2} + C\\ = -3 \sin \left(\frac {1} {3} x\right) \cos \left(\frac {1} {3} x\right) - \frac {3\sin^2\left(\frac {1} {3} x\right)} {2} + C \end{split}$$$$

Evaluating this at $\dfrac {3\pi} {2}$ gives $-3 \cdot 1 \cdot 0 + \dfrac {1^2} {2}$ which is $\dfrac {1} {2}$, while at $\dfrac {3\pi} {4}$ it yields $-\dfrac {1} {4}$, so I thought the answer would be $\dfrac {3} {4}$. However, all of the answer choices I'm given are irrational numbers that include $\pi$. Where did I go wrong in this solution?

• Why don't we use $$2\sin^2x=1-\cos2x$$ – lab bhattacharjee Jan 25 '17 at 5:53
• @labbhattacharjee That sounds like a good idea; it would probably simplify finding the antiderivative a lot. I'm interested in knowing what I did wrong in my work, though. – James Ko Jan 25 '17 at 5:58
• "Where did I go wrong in this solution?" The problem is that you are using the incorrect integration by parts formula $$\int fg'=fg-\int fg$$ instead of $$\int fg'=fg-\int f'g$$ with $$f=3\sin\qquad g'=\sin$$ hence $$f'=3\cos\qquad g=-\cos$$ (Impressive collection of offtopic answers you got there...) – Did Jan 25 '17 at 9:22

By parts,

$$I=\int_{3\pi/4}^{3\pi/2}\sin^2\frac x3 dx=- \left.3\cos\frac x3\sin\frac x3\right|_{3\pi/4}^{3\pi/2}+\int_{3\pi/4}^{3\pi/2}\cos^2\frac x3 dx=\frac32+\frac{3\pi}4-I,$$ substituting $\cos^2=1-\sin^2$ and trivially integrating the term $1$.

You can also try by continuing the integration by parts from $I=\dfrac32+J$,

$$J=\int_{3\pi/4}^{3\pi/2}\cos^2\frac x3 dx= \left.3\sin\frac x3\cos\frac x3\right|_{3\pi/4}^{3\pi/2}+\int_{3\pi/4}^{3\pi/2}\sin^2\frac x3 dx=-\frac32+I,$$ but this is nothing new. The only escape is to evaluate $I+J$, giving $\dfrac{3\pi}4$.

• Hi downvoters, did you spend a good time ? – Yves Daoust Jan 25 '17 at 9:23
• In this case it seems to have been someone who many times downvotes "by justice" and apprises whoever did what he thinks must have been done...and somebody else dowvoted, too. You and I, and perhaps somebody else, tried to show the OP a better way than what he tried. True, the OP wanted to know what went with his way, but sometimes it is better, imo, to see other approaches, in particular when the one the OP took is so badly wrong. Never mind, though...those little things this site is made for... – DonAntonio Jan 25 '17 at 9:33
• @DonAntonio: Lao Tseu said: "he who silently downvotes, downvotes himself". – Yves Daoust Jan 25 '17 at 9:36
• Hehe...good one. I shall upvote you now as I think your first line is very nice and informative. Also, you will have more positive than negative points from this. +1 – DonAntonio Jan 25 '17 at 9:41
• @DonAntonio Interesting rationalization for not answering the question asked. Next time somebody asks why the set of real numbers is not countable, I will "answer" with a computation of the sum of the inverse of the squares. Because I like it better. – Did Jan 26 '17 at 8:33

We have in integration by parts $$\int a \mathrm {d}b = ab -\int b \mathrm {d}a = a\int \mathrm {d}b -\int (\int \mathrm {d}b) \mathrm {d}a$$

Here we have $a=\sin u$ and $\mathrm {d}b =\sin u du$. Then we have $$\int a\mathrm {d}b = \sin u \int \sin u du -\int (\int \sin u du) \cos u du = \sin u (-\cos u)-\int (-\cos u)(\cos u) du$$

Hope your mistake is clear to you. Also keep in mind @lab's comment which is much easier. Hope it helps.

• Finally an answer which addresses the question asked... +1. – Did Jan 25 '17 at 9:24

For one thing, you are combining scaling $x$ with integration by parts.

For another, you say what $u$ is, but not what $dv$ is.

Here's what I would do.

Since $\sin^2(x) =\frac{1-\cos(2x)}{2}$,

$\begin{array}\\ \int\sin^2 (\frac {1} {3} x ) dx &=\frac{1}{2}\int(1-\cos (\frac {2} {3} x ) dx\\ &=\frac{1}{2}\int dx- \frac{1}{2}\int\cos (\frac {2} {3} x ) dx\\ &=\frac{1}{2}(x-\frac32 \sin(\frac23 x))\\ \text{so that}\\ \int_{3\pi/4}^{3\pi/2}\sin^2 (\frac {1} {3} x ) dx &=\frac{1}{2}(x-\frac32 \sin(\frac23 x))\big|_{3\pi/4}^{3\pi/2}\\ &=\frac{1}{2}((3\pi/2-3\pi/4)-\frac32 (\sin(\frac23 3\pi/2)-\sin(\frac23 3\pi/4))\\ &=\frac{1}{2}((3\pi/4)-\frac32 (\sin(\pi)-\sin(\pi/2))\\ &=\frac{1}{2}((3\pi/4)-\frac32 (0-1))\\ &=\frac{3(\pi+2)}{8}\\ \end{array}$

• Since when is $sin^2(x) =1-2cos(x)$? This is the substitution you need to make: $sin^2(x)=\frac{1-cos(x)}{2}$. From there it's easy! Your answer therefore is wrong. It should be $\frac{3(2+\pi}{8}$ – user372003 Jan 25 '17 at 8:42
• @Denis A little confusion there. Wait for a response and give some slack, don't rush to downvote. – DonAntonio Jan 25 '17 at 8:48
• @Denis And then we can even say the answer is wrong. Fine. Wait for it, though...it may be Marty meant not even to make a substitution but rather to use a common trigonometric identity, say like $\;\sin^2x=\frac{1-\cos2x}2\;$ (observe this is not what you wrote in your first comment...!) – DonAntonio Jan 25 '17 at 8:56
• @Denis I did read your comment: where you wrote "substitution" you seem to have meant "by means of trigonometric identity", yet the "identity" you wrote there is wrong: it must be $\;\cos\color{red}2x\;$ on the right side... – DonAntonio Jan 25 '17 at 9:11
• @DonAntonio Actually it IS what I wrote in my first comment. Nonetheless I fixed his answer. Now it should be correct. Also when I used the term 'substitution', I actually meant 'to replace'. – user372003 Jan 25 '17 at 9:16

We have the trigonometric identity

$$\sin^2x=\frac{1-\cos2x}2\implies \int_{3\pi/4}^{3\pi/2}\sin^2\frac x3\,dx=\frac12\int_{3\pi/4}^{3\pi/2}\left(1-\cos\frac{2x}3\right)dx=$$$${}$$

$$=\frac12\left[\frac{3\pi}4-\left.\frac12\cdot\frac32\sin\frac{2x}3\right|_{3\pi/4}^{3\pi/2}\right]=\frac{3\pi}8-\frac34\left(0-1\right)=\frac{3\pi}8+\frac34$$