AcademiaAgriculture & FarmingHumanitiesSocial SciencesSTEM

How to Integrate sin(ax)sin(bx) | Trig Tricks

Updated on September 05, 2014
calculus-geometry profile image

TR Smith is a teacher and creator who uses mathematics in her line of work every day.

Trigonometric integrals that look difficult can often be simplified using one or more of the many trig identities. Integrals that involve nothing but standard trig functions being multipled or added/subtracted can always be solved. (When you introduce operations such as logarithms, square roots, polynomials, and rational functions the integrals may or may not have antiderivatives, i.e., they are more likely to be non-integrable functions.)

For example, one of the most useful sets of trigonometric identities is the collection of sum-product conversions for sine and cosine. Let A > B, then we have

sin(A)sin(B) = (1/2)[cos(A-B) - cos(A+B)]
sin(A)cos(B) = (1/2)[sin(A-B) + sin(A+B)]
sin(B)cos(A) = (1/2)[sin(A+B) - sin(A-B)]
cos(A)cos(B) = (1/2)[cos(A-B) + cos(A+B)]

With these formulas we can reduce a sine product function into the sum of simple sine and cosine functions.

Example 1: sin(8x)sin(5x)

To find the antiderivative of sin(8x)sin(5x), we let A = 8x and B = 5x and use the first formula sin(A)sin(B) = (1/2)[cos(A-B) - cos(A+B)] This gives us

∫ sin(8x)sin(5x) dx
= ∫ (1/2)[cos(3x) - cos(13x)] dx
= (1/6)sin(3x) - (1/26)sin(13x) + C

Now let's find the area under this curve from x = 0 to x = π. To do this, we plug the limits of integration into the antiderivative function and subtract. This gives us

(1/6)sin(3π) - (1/26)sin(13π) - (1/6)sin(0) + (1/26)sin(0)
= 0 - 0 - 0 + 0
= 0

This answer makes sense from looking at the graph because the positive area above the x-axis is the same as the negative area below the x-axis, and thus they cancel out.

Above is the graph of the function y = sin(8x)sin(5x) with the area under the curve between 0 and π shaded in pink and yellow. Notice how the positive area matches up with the negative area, making the total area 0. And below is the general formula for the integral of sin(ax)sin(bx) where a ≠ b.

Example 2: sin(2x)sin(5x)sin(6x)

The reduction formulas provide a way to transform the product of two trig functions into a sum of simpler functions, but will it also work for the product of three trig functions? Let's start by simplifying the product sin(2x)sin(5x). Using the reduction formula gives us

= (1/2)[cos(3x) - cos(7x)]

This means that

= (1/2)[sin(6x)cos(3x) - sin(6x)cos(7x)]

Now we can further simplify this expression using the reduction formulas for the product of sine and cosine:

(1/2)[sin(6x)cos(3x) - sin(6x)cos(7x)]
= (1/4)[sin(9x) + sin(3x)] - (1/4)[sin(13x) - sin(x)]
= (1/4)[sin(x) + sin(3x) + sin(9x) - sin(13x)]

Computing the integral of sin(2x)sin(5x)sin(6x) yields

∫ sin(2x)sin(5x)sin(6x) dx
= ∫ (1/4))[sin(x) + sin(3x) + sin(9x) - sin(13x)] dx
= (-1/4)cos(x) - (1/12)cos(3x) - (1/36)cos(9x) + (1/52)cos(13x) + C

Above is the graph of sin(2x)sin(5x)sin(6x). Its period length is 2π, which is longer than the period length of any of the individual factors. The general formula for converting sin(ax)sin(bx)sin(cx) to a sum of sine functions is

sin(ax)sin(bx)sin(cx) =
(1/4)[ sin((a+b-c)x) + sin((a+c-b)x) + sin((b+c-a)x) - sin((a+b+c)x) ]

Example 3: sin(mx)sin(nx), m & n distinct integers, 0 ≤ x ≤ π

One of the classic integral calculus problems is to find the area under the curve f(x) = sin(mx)sin(nx) from between 0 and π, where m and n are distinct integers. The resulting integral is

∫ sin(mx)sin(nx) dx, {0 ≤ x ≤ π}

= ∫ (1/2)[ cos((m-n)x) - cos((m+n)x) ] dx, {0 ≤ x ≤ π}

= [1/(2*(m-n))]sin((m-n)x) - [1/(2*(m+n))]sin((m+n)x) + C, {0 ≤ x ≤ π}

= [1/(2*(m-n))]sin((m-n)π) - [1/(2*(m+n))]sin((m+n)π)
- [1/2*(m-n))]sin(0) + [1/(2*(m+n))]sin(0)

= [1/(2*(m-n))]sin((m-n)π) - [1/(2*(m+n))]sin((m+n)π)

Since m and n are integers, so are m+n and m-n. The sine of any integer multiple of pi is equal to 0, therefore the value of the definite integral is 0 - 0 = 0.

If m = n, then you have the sine squared function which is integrated with other techniques.

Example 4: Irrational Number Coefficients

These kinds of trigonometric function integrals are solved the same way no matter if the coefficients are integers, rational numbers or irrational numbers. For example, let's find the area under the curve y = sin(sqrt(2)x)sin(x) from x = 0 to x = π/sqrt(2).

∫ sin(sqrt(2)x)sin(x) dx, {0 ≤ x ≤ π/sqrt(2)}

= (1/(2*sqrt(2)-2))sin[(sqrt(2)-1)x] - (1/(2*sqrt(2)+2))sin[(sqrt(2)+1)x] + C, {0 ≤ x ≤ π/sqrt(2)}

= (1/(2*sqrt(2)-2))sin[π - π/sqrt(2)] - (1/(2*sqrt(2)+2))sin[π + π/sqrt(2)]

Using the trig identity sin(π + p) = -sin(p), the expression above can be simplified to

-(1/(2*sqrt(2)-2))sin(-π/sqrt(2)) + (1/(2*sqrt(2)+2))sin(π/sqrt(2))

= (1/(2*sqrt(2)-2))sin(π/sqrt(2)) + (1/(2*sqrt(2)+2))sin(π/sqrt(2))

= [1/(2*sqrt(2)-2) + 1/(2*sqrt(2)+2)]sin(π/sqrt(2))

= sqrt(2)*sin(π/sqrt(2)

≈ 1.12528

Above is the graph of y = sin(sqrt(2)x*sin(x) with the area shaded in pink from x = 0 to x = π/sqrt(2).


    0 of 8192 characters used
    Post Comment

    • polecat 5 weeks ago

      How do you integrate these similar trig functions

      y = cos(ax)cos(bx)

      y = tan(ax)tan(bx)

      I guess cos(ax)cos(bx) is done the same way as sin(ax)sin(bx) because a cosine function is just a horizontally shifted sine function. But tangent is the ratio of sine over cosine. Is there a quotient rule for integrals?

    • calculus-geometry profile image

      TR Smith 5 weeks ago from Germany

      The integral of cos(ax)cos(bx) is

      (1/2)sin((a-b)x)/(a-b) + (1/2)sin((a+b)x)/(a+b) + C

      which is as you guessed like the integral of sin(ax)sin(bx). You can work out the integral of tan(ax)tan(bx) only if the parameters a and b are rational, otherwise there is no closed-form antiderivative. Even if a and b are rational the integral expressions are very complicated, involving lots of logarithms and inverse tangents. For example, the integral of tan(x)tan(2x) is

      (1/2)ln[(cos(x)+sin(x))/(cos(x)-sin(x))] - x + C

    Click to Rate This Article