# Integral of $\sin x \cos x$ using two methods differs by a constant?

$$\int \sin \theta\cos \theta~d \theta= \int \frac {1} 2 \sin 2\theta~ d \theta=-\frac {1} 4 \cos 2\theta$$ But, if I let $$u=\sin \theta , \text{ then }du=\cos \theta~d\theta$$ Then $$\int \sin \theta\cos \theta~d \theta= \int u ~ du =\frac { u^2 } 2 =\frac {1} 2 \sin^2 \theta$$ Since $$\sin^2 \theta =\frac {1} 2 - \frac {1} 2 \cos 2\theta$$ The above can be written as $$\int \sin \theta\cos \theta~d \theta= \frac {1} 2 \sin^2 \theta =\frac {1} 2 \left( \frac {1} 2 - \frac {1} 2 \cos 2\theta \right)=\frac {1} 4-\frac {1} 4 \cos 2\theta$$ Why are the two results differ by the constant $1/4$? Thank you.

-
Didn't your calculus instructor drum into your head to always write $+C$ when computing an indefinite integral? I guess your head could use a bit more drumming! –  GEdgar Apr 23 '12 at 13:07
@Tony : Please notice my edits to your question. If you write 3\sin 5 in $\TeX$, the backslash on \sin not only prevents italicization, but also results in proper spacing before and after $\sin$, so you don't need to insert those spaces yourself. –  Michael Hardy Apr 23 '12 at 14:57
@Michael Hardy, thank you very much for the useful info!! –  Tony May 2 '12 at 2:43

The answer to the indefinite integration is the family of functions, which differ by a constant on every connected area of the domain.

That is, the correct way to write the answer to $\int f(x)dx$ (where $f$ is defined on a continuous area) is $g(x) + C$.

Note that $C-\dfrac{1}{4}\cos{2\theta}$ defines the same family of functions as $C+\dfrac{1}{4}-\dfrac{1}{4}\cos{2\theta}$.

-
A "series" of functions is a potentially confusing word choice, because "series" has a different technical meaning in analysis. Better to speak of a "family" of functions -- or just a "set" of them. –  Henning Makholm Apr 23 '12 at 10:30
@HenningMakholm Of course you're right, it is just my knowledge of English which failed me... –  penartur Apr 23 '12 at 10:35
@penartur, Thank you very much for your kind answers and comments!! –  Tony Apr 23 '12 at 14:33
@Henning Makholm, Thank you very much for your comments!! –  Tony Apr 23 '12 at 14:38
@penartur, Again thank you very much for your kind and detailed comments!! –  Tony Apr 23 '12 at 14:43