ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Integrals of x*sin(x)^2, x*cos(x)^2, x*tan(x)^2

Updated on February 10, 2015
calculus-geometry profile image

TR Smith is a product designer and former teacher who uses math in her work every day.

Though functions of the form x times a squared trig function may look intimidating to integrate, finding their antiderivatives is no more challenging than integrating other products of polynomials and trigonometric functions. In fact, once you find the integral of x*sin(x)^2, you can use a trig identity to obtain the integral of x*cos(x)^2 for free. And likewise with x*tan(x)^2 and x*sec(x)^2. Here we work out the integration of these four functions step-by-step along with some examples.

As far as notation and mathematical typography goes, the functions

  • x*sin(x)2
  • x*cos(x)2
  • x*tan(x)2
  • x*sec(x)2

may alternatively be written in textbooks as

  • x*sin2(x)
  • x*cos2(x)
  • x*tan2(x)
  • x*sec2(x).

How to Integrate x*sin(x)^2 and x*cos(x)^2

Since the antiderivative of either function can be used to obtain the other, it does not matter if we first start with the sine or cosine function. Starting with x*sin(x)^2, the first step in working out its integral is to apply the trigonometric double angle formula for sine:

sin(x)^2 = 1/2 - (1/2)cos(2x)

This gives us

∫ x*sin(x)^2 dx
= ∫ x/2 dx - ∫ x*cos(2x)/2 dx
= (1/4)x^2 - (1/2)∫ x*cos(2x) dx

Letting 2x = u and dx = (1/2) du, we can integrate the function x*cos(2x) using the method explained in the tutorial for integrating x*cos(x) and x*sin(x). This gives us a final answer of

∫ x*sin(x)^2 dx
= (1/4)x^2 - (1/4)x*sin(2x) - (1/8)cos(2x) + C

So how do you use this antiderivative to find the antiderivative of the closely related function x*cos(x)^2? Here is where we use the fundamental trig identity sin(x)^2 + cos(x)^2 = 1.

∫ x*cos(x)^2 dx
= ∫ x[1 - sin(x)^2] dx
= ∫ x dx - ∫ x*sin(x)^2 dx
= (1/2)x^2 - [(1/4)x^2 - (1/4)x*sin(2x) - (1/8)cos(2x)] + C
= (1/4)x^2 + (1/4)x*sin(2x) + (1/8)cos(2x) + C

How to Integrate x*tan(x)^2 and x*sec(x)^2

As in the previous integration, one of the integrals of x*tan(x)^2 and x*sec(x)^2 can be used to obtain the other. Let's start with x*sec(x)^2 and integrate by parts, using the assigment u = x, du = dx, dv = sec(x)^2 dx, and v = tan(x). This gives us

∫ x*sec(x)^2 dx
= x*tan(x) - ∫ tan(x) dx
= x*tan(x) - Ln |cos(x)| + C

To find the integral of x*tan(x)^2, we use the identity tan(x)^2 = sec(x)^2 - 1. This gives us

∫ x*tan(x)^2 dx
= ∫ x[sec(x)^2 - 1] dx
= ∫ x*sec(x)^2 dx - ∫ x dx
= x*tan(x) - Ln |cos(x)| - (1/2)x^2 + C

Example Integration

Find the area under the curve x*sin(x)^2 from x = 2π to x = 3π. The region in question is shown in the graph below.

Using the antiderivative of x*sin(x)^2, the exact area under the curve is

[(1/4)(3π)^2 - (1/4)(3π)sin(6π) - (1/8)cos(6π)]
- [(1/4)(2π)^2 - (1/4)(2π)sin(4π) - (1/8)cos(4π)]

= (1/4)9π^2 - (1/4)4π^2

= (5/4)π^2

The exact area under any lump that spans the interval {nπ ≤ x ≤ (n+1)π} is

[(1/4)((n+1)π)^2 - (1/4)(n+1)(π)sin(2(n+1)π) - (1/8)cos(2(n+1)π)]
- [(1/4)(nπ)^2 - (1/4)(nπ)sin(2nπ) - (1/8)cos(2nπ)]

= (1/4)((n+1)π)^2 - (1/4)(nπ)^2

= (n/2 + 1/4)π^2

Another integration Example

Let's find the integral of h(x) = (x*tan(x))^2 - x*Ln|cos(x)| using our knowledge of how to integrate x*sec(x)^2. First note that h(x) can be written equivalently as

h(x) = x * [x*tan(x)^2 - Ln|cos(x)|]

Using integration by parts with the variable assignment

u = x
du = dx
dv = x*tan(x)^2 - Ln|cos(x)|
v = x*sec(x)^2

we get

∫ h(x) dx
= (x^2)sec(x)^2 - ∫ x*sec(x)^2 dx
= (x^2)sec(x)^2 - x*tan(x) + Ln|cos(x)| + c

Curiously, the functions f(x) = (x^2)tan(x)^2 and g(x) = x*Ln|cos(x)| are both non-integrable functions, meaning you cannot find any closed form expression for their antiderivatives in terms of elementary functions, such as exponents, logarithms, trig and inverse trig functions, polynomial and rational functions, or radical functions. Yet, the difference function h(x) = f(x) - g(x) has a straight-forward derivative.

Related Non-Integrable Functions

All functions of the form (x^m)sin(x)^n and (x^m)cos(x)^n can be integrated for non-negative values of the powers m and n. However, not all functions of the form (x^m)tan(x)^n and (x^m)sec(x)^n are integrable. The following functions for example are non-integrable

  • x*tan(x)
  • x*tan(x)^3
  • (x^2)tan(x)
  • (x^2)tan(x^2)
  • x*sec(x)
  • x*sec(x)^3
  • (x^2)sec(x)
  • (x^2)sec(x)^2


    0 of 8192 characters used
    Post Comment

    No comments yet.

    Click to Rate This Article