# Thread: [SOLVED] integration with sinxcosx

1. ## [SOLVED] integration with sinxcosx

Hey guys i kind of have a weird little problem which i can't figure out.

I'm integrating sinxcosx, and depending on what i use as my substution you get two answers.

1) sin^2x/2 + C and 2) -cos^2x/2 + C

Now if we set these two answers equal to eachother we get

sin^2x + cos^2x = 0 but we know there exists a trig identity that states sin^2x + cos^2x = 1

So i'm confused here. How can this be possible? I know that 0 cannot equal 1. Or at least i hope not hehe. Any help would be great cheers

2. Originally Posted by block
Hey guys i kind of have a weird little problem which i can't figure out.

I'm integrating sinxcosx, and depending on what i use as my substution you get two answers.

1) sin^2x/2 + C and 2) -cos^2x/2 + C

Now if we set these two answers equal to eachother we get

sin^2x + cos^2x = 0 but we know there exists a trig identity that states sin^2x + cos^2x = 1

So i'm confused here. How can this be possible? I know that 0 cannot equal 1. Or at least i hope not hehe. Any help would be great cheers
Two solutions of an integral may be of different form if they are off by a constant. You have two solutions, but who says the constant of integration is the same? What this is telling you is that $C_{cos} = C_{sin} + 1$

-Dan

3. Originally Posted by block
Hey guys i kind of have a weird little problem which i can't figure out.

I'm integrating sinxcosx, and depending on what i use as my substution you get two answers.
You have,
$\int \sin x \cos x dx$
And I think the problem you have you think you get two distinct answers when you use $u=\sin x$ and when you switch to $u=\cos x$.

1) $u=\sin x$ then $u'=\cos x$
Thus,
$\int \sin x \cos x dx= \int u du=\frac{1}{2}u^2 +C=\frac{1}{2}\sin^2 x+C$

2) $u=\cos x$ then $u'=-\sin x$
Thus,
$\int \sin x \cos x dx= -\int u du=\frac{1}{2}u^2 +C=-\frac{1}{2}\cos^2 x+C$

But in reality these are the same (the set of all anti-derivates) because,
$\frac{1}{2}\sin^2 x+C=\frac{1}{2}(1-\cos^2 x)+C=-\frac{1}{2}\cos^2 x+\left( \frac{1}{2}+C\right)=-\frac{1}{2}\cos^2 x+C_1$
I just renamed the constant function,
$\frac{1}{2} +C=C_1$
Thus, you get the same thing.

And the last thing you could have done is,
$\frac{1}{2}\int 2\sin x \cos x dx$
I just multiplied and divide by 2, unchanged expression.
From trignometry you know that,
$\frac{1}{2}\int \sin 2x dx=-\frac{1}{4}\cos 2x+C$
But again though it looks different the space of solutions is still the same. You can use some trignometry to confirm this.

4. Hello, block!

This is a classic puzzler.
I ran across it across it in Calculus I.
There are three ways (at least) to integrate it.

We have: . $\int\sin x\cos x\,dx$

[1] If we look at it as: . $\int \underbrace{\sin x}_{u}\underbrace{(\cos x\,dx)}_{du}$
. . . we get: . $\boxed{\frac{1}{2}\sin^2\!x + C_1}$

[2] If we write it as: . $\int \cos x(\sin x\,dx)$
. . . we let: $u = \cos x\quad\Rightarrow\quad du = -\sin x\,dx\quad\Rightarrow\quad dx = -\frac{du}{\sin x}$
Substitute: . $-\int u\,du \;=\;-\frac{1}{2}u^2 + C\;=\;\boxed{-\frac{1}{2}\cos^2\!x + C_2}$

Since these two answers must be equal, we have:
. . $\frac{1}{2}\sin^2\!x + C_1 \;=\;-\frac{1}{2}\cos^2\!x + C_2\quad\Rightarrow\quad \frac{1}{2}\sin^2\!x + \frac{1}{2}\cos^2\!x\;=\;C_2-C_1$

Multiply by 2: . $\sin^2\!x + \cos^2\!x \;=\;2(C_2-C_1)$

The time the constants $(C_1,\:C_2)$ aren't completely arbitrary.
. . They must satisfy: . $2(C_2-C_1) \:=\:1$

[3] We can use the identity: . $2\sin\theta\cos\theta \,=\,\sin2\theta$

So: . $\int\sin x\cos x\,dx\;=\;\frac{1}{2}\int2\sin x\cos x\,dx \;=\;\frac{1}{2}\int\sin2x\,dx$ $=\;\boxed{-\frac{1}{4}\cos2x + C_3}$

. . I'll let you justify this one . . .

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

A similar problem: . $\int\sec^2\!x\tan x\,dx$

$[1]\;\;\int \underbrace{\sec x}_{u}\underbrace{(\sec x\tan x\,dx)}_{du} \;=\;\frac{1}{2}\sec^2\!2x + C$

$[2]\;\;\int\underbrace{\tan x}_{u}\underbrace{(\sec^2x\,dx)}_{du}\;=\;\frac{1} {2}\tan^2x + C$