Integrating over trigonometric functions

Hi everyone.

I'm hoping someone can help me out with this problem:

If f(x) and g(x) are any two distinct options from {1, cos x, sin x, cos 2x, sin 2x, cos 3x, sin 3x,...., cos nx, sin nx}

show that the integral from [-pi, pi] of f(x)g(x) is zero while the integral from [-pi, pi] of (f(x))^2 is non-zero.

Would I need to use trig identities? I don't really know where to get started.

Any help is much appreciated

Re: Integrating over trigonometric functions

You may find the following properties helpful:

i) $\displaystyle \int_{-a}^{a}f(x)\,dx=\int_0^a [f(x)+f(-x)]\,dx$

ii) $\displaystyle \int_0^a f(x)\,dx=\int_0^a f(a-x)\,dx$

Re: Integrating over trigonometric functions

In other words, this question asks you to figure out that the set that you identified is an orthogonal basis in the sense of the integral in the interval [-pi,pi]

There are three cases that you need to investigate for the integral from [-pi,pi] of

(i) cos(nx)sin(mx) dx for any m,n

(ii) cos(nx)cos(mx) dx and sin(nx)sin(mx) for m not equal to n

(iii) cos(nx)cos(nx) dx and sin(nx)sin(nx)

List of trigonometric identities - Wikipedia, the free encyclopedia This hyperlink is useful for finding useful Identities. The rest is integral calculus that I leave to you to solve.

For all these you can use the Product to Sum Identities, however it should be noted that (iii) can use what's known as the power reducing formula, which is the generalized version when angles are equal. (iii) should give you non-zero integrals.

Also, if you observe how cosine acts for (ii) and (iii) first, you may use an argument of phase shift to cover the cases for sine

Re: Integrating over trigonometric functions

Additionally, you do not need any trig identities to prove that $\displaystyle \int_{-\pi}^{\pi} f(x)^2 \, dx$ is non-zero. Here, $\displaystyle f(x)$ is non-zero for almost all of the domain, so $\displaystyle f(x)^2$ will be positive over this subset, and therefore the integral will be positive and non-zero.