# [SOLVED] integration with sinxcosx

• Feb 1st 2007, 11:12 AM
block
[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
• Feb 1st 2007, 11:19 AM
topsquark
Quote:

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 $\displaystyle C_{cos} = C_{sin} + 1$

-Dan
• Feb 1st 2007, 11:26 AM
ThePerfectHacker
Quote:

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,
$\displaystyle \int \sin x \cos x dx$
And I think the problem you have you think you get two distinct answers when you use $\displaystyle u=\sin x$ and when you switch to $\displaystyle u=\cos x$.

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

2)$\displaystyle u=\cos x$ then $\displaystyle u'=-\sin x$
Thus,
$\displaystyle \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,
$\displaystyle \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,
$\displaystyle \frac{1}{2} +C=C_1$
Thus, you get the same thing.

And the last thing you could have done is,
$\displaystyle \frac{1}{2}\int 2\sin x \cos x dx$
I just multiplied and divide by 2, unchanged expression.
From trignometry you know that,
$\displaystyle \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.
• Feb 2nd 2007, 12:51 PM
Soroban
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: .$\displaystyle \int\sin x\cos x\,dx$

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

[2] If we write it as: .$\displaystyle \int \cos x(\sin x\,dx)$
. . . we let: $\displaystyle u = \cos x\quad\Rightarrow\quad du = -\sin x\,dx\quad\Rightarrow\quad dx = -\frac{du}{\sin x}$
Substitute: .$\displaystyle -\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:
. . $\displaystyle \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: .$\displaystyle \sin^2\!x + \cos^2\!x \;=\;2(C_2-C_1)$

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

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

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

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

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

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

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

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