# Missing something simple

1. Jan 30, 2008

### koolrizi

Hi everyone,
I know I am missing something simple from this integration.

integrate from l to -l

$$\int$$cos ((k*pi*x)/l) * cos ((k*pi*x)/l)dx

I use the identity cos u cos v = 1/2 [cos(u-v) + cos(u+v)]

which gives me the following to integrate from l to -l

1/2[cos (2k*pi*x)/l]dx

I bring 1/2 out of integration

so when i integrate [cos (2k*pi*x)/l]dx

i get [sin (2k*pi*x)/l] / [(2k*pi)/l]

now i move the numerator out so the outside becomes l/4*k*pi
and the inside is [sin 2*k*pi + sin 2*k*pi]

Now my problem is this sin 2 k pi is zero
hence if i multiply it by the outside it will become zero but the answer is l

I know I am missing a simple step but dont know where.

Thanks guys

2. Jan 30, 2008

### dhris

You are just overlooking the fact that cos(0)=1, not 0.

3. Jan 30, 2008

### koolrizi

i am sorry i didnt get you there. I know cos 0 is 1 but I am using sin at the very end which is zero if sin 2*k*pi

4. Jan 30, 2008

### dhris

Well what happened to the cos(u-v) term in your identity?

5. Jan 30, 2008

### koolrizi

Oh! I didnt see that one. Silly Silly mistake. Thanks dhris