AcademiaAgriculture & FarmingHumanitiesSocial SciencesSTEM

Antiderivative of Sqrt(1 + Cos(x)) and Similar Functions

Updated on February 10, 2017
calculus-geometry profile image

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

Graph of y = sqrt(1 + cos(x)).
Graph of y = sqrt(1 + cos(x)).

Finding the integral of sqrt(1 + cos(x)), sqrt(1 - cos(x)), sqrt(1 + sin(x)), sqrt(1 - sin(x)) and similar functions may seem challenging since there is no obvious way to apply a trigonometric identity, and no obvious u-substitution candidate. However, with a little algebra it is possible to transform these integral into functions suitable for u-substitution.

The method of integrating these square roots of basic trigonometric functions can be extended to solve integrals of the form sqrt(1 ± cos(Bx)) and sqrt(1 ± sin(Bx)) for any value of B.

Here are step-by-step explanations of the techniques for finding the antiderivatives of these functions in calculus and their applications to other sciences.

How to Integrate Sqrt(1 + Cos(x))

To integrate the function f(x) = sqrt(1 + cos(x)), we first multiply the function by the fraction sqrt(1 - cos(x))/sqrt(1 - cos(x)) = 1. This gives us the equivalent function

f(x) = sqrt(1 + cos(x))
= sqrt(1+cos(x)) * sqrt(1-cos(x)) / sqrt(1-cos(x))
= sqrt(1 - cos(x)^2) / sqrt(1 - cos(x))
= sin(x) / sqrt(1 - cos(x))

Now we can integrate f(x) using the substitution u = cos(x) and du = -sin(x) dx. This gives us

∫ f(x) dx = ∫ sin(x)/sqrt(1 - cos(x)) dx = ∫ -1/sqrt(1 - u) du

The antiderivative of -1/sqrt(1 - u) is 2*sqrt(1 - u) + C, therefore we have

∫ -1/sqrt(1 - u) du = 2*sqrt(1 - u) + C = 2*sqrt(1 - cos(x)) + C

So we find that the antiderivative of sqrt(1 + cos(x)) is 2*sqrt(1 - cos(x)) + C. Notice the change of sign within the square root. The same procedure can be used to find the integrals of sqrt(1 - cos(x)), sqrt(1 + sin(x)) and sqrt(1 - sin(x)). These integrals are summarized in the the list below.

Integrals of sqrt(1+cos(x)), sqrt(1-cos(x)), sqrt(1+sin(x)), sqrt(1-sin(x)).
Integrals of sqrt(1+cos(x)), sqrt(1-cos(x)), sqrt(1+sin(x)), sqrt(1-sin(x)).

The only problem with these integral forms is that while the antiderivative curve F(x) = 2*sqrt(1 - cos(x)) has points where the slope is negative, the derivative F'(x) = f(x) = sqrt(1 + cos(x)) is always non-negative. Moreover, the derivative of 2*sqrt(1 - cos(x)) is not defined at -2π, 0, 2π, 4π, etc. because the function has cusps at these values of x, sharp points.

To fix this, we use alternative forms of the antiderivative that have non-negative slope, and whose derivatives at -2π, 0, 2π, 4π, etc. approach 0. Since these alternative forms are periodic functions with non-negative derivatives, they are necessarily discontinuous at the points where f(x) has a cusp. For example, the alternative antiderivative of f(x) = sqrt(1 + cos(x)) is F(x) = 2*tan(x/2)*sqrt(1 + cos(x)).

Alternative antiderivatives of sqrt(1+cos(x)), sqrt(1-cos(x)), sqrt(1+sin(x)), sqrt(1-sin(x)).
Alternative antiderivatives of sqrt(1+cos(x)), sqrt(1-cos(x)), sqrt(1+sin(x)), sqrt(1-sin(x)).

Alternative Integration Technique

An alternative integration technique for finding the antiderivatives of sqrt(1+cos(x)), sqrt(1-cos(x)), sqrt(1+sin(x)), and sqrt(1-sin(x)) is to use the four trig identities

  • (1 + cos(x))/2 = cos(x/2)^2
  • (1 - cos(x))/2 = sin(x/2)^2
  • cos(x) = sin(x - π/2)
  • sin(x) = cos(x + π/2)

This implies that

sqrt(1 + cos(x))
= sqrt[2*(1 + cos(x))/2]
= sqrt[2*cos(x/2)^2]
= sqrt(2) * |cos(x/2)|

Similarly, we have

sqrt(1 - cos(x)) = sqrt(2) * |sin(x/2)|
sqrt(1 + sin(x)) = sqrt(2) * |cos(x/2 + π/4)|
sqrt(1 - sin(x)) = sqrt(2) * |sin(x/2 + π/4)|

As you can see, the square root of 1 plus or minus cosine or sine is simply a multiple of the absolute value of sine or cosine with the period halved. This gives us yet another set of alternative integral formulas for sqrt(1 + cos(x)) and its relatives.

How to Integrate Sqrt(1 + Cos(Bx))

Finding the integral of sqrt(1 + cos(Bx)) and relatives, we make the substitution

x = u/B
dx = 1/B du

This works out to

∫ sqrt(1 + cos(Bx)) dx = ∫ sqrt(1 + cos(u)) * (1/B) du
= (2/B)sqrt(1 - cos(u)) + C
= (2/B)sqrt(1 - cos(Bx)) + C

The rest are summarized in the list below.

Integral of Sqrt(1 + Sec(x))

If T(x) is a trigonometric function other than sin(x) or cos(x), then the integral of f(x) = sqrt(1 + T(x)) is harder to integrate, but not always impossible.

For example, to integrate the function sqrt(1 + sec(x)), we first convert it to an equivalent form using simple algebra:

sqrt(1 + sec(x)) = sqrt[ (cos(x) + 1) / cos(x) ]
= sqrt[(cos(x) + 1)/cos(x)]*sqrt(1 - cos(x))/sqrt(1 - cos(x))
= sqrt(1 - cos(x)^2)/sqrt(cos(x) - cos(x)^2)
= sin(x)/sqrt(cos(x) - cos(x)^2)
= sin(x)/sqrt(0.25 - 0.25 + cos(x) - cos(x)^2)
= sin(x)/sqrt[0.25 - (cos(x) - 0.5)^2]

Now we can integrate using the substitution cos(x) - 0.5 = u and -sin(x) = du. This gives us

∫ sin(x)/sqrt[0.25 - (cos(x) - 0.5)^2] dx
= -∫ 1/sqrt(0.25 - u^2) du
= -arcsin(2u) + C
= -arcsin(2*cos(x) - 1) + C
= arcsin(1 - 2*cos(x)) + C

The same technique can be used to find the antiderivatives of sqrt(sec(x) - 1), sqrt(1 + csc(x)), and sqrt(csc(x) - 1).

Differential Equations Involving Sqrt(1 + Cos(x))

Solve the differential equation

y * y' = 2*cos(x)

If you look at the antiderivative formulas above, you'll notice that if y = 2*sqrt(1 + sin(x)), then its derivative is y' = sqrt(1 - sin(x)), and y times y' equals 2*cos(x) after algebraic simplification. Thus, y = 2*sqrt(1 + sin(x)) is a solution to the differential equation. Let's see if we can use the differential equations technique of separation of variables to get the same answer.

y * y' = 2*cos(x)

y * dy/dx = 2*cos(x)

y * dy = 2*cos(x) * dx

Now we integrate both sides:

(1/2) y^2 = 2*sin(x) + C

y^2 = 4*sin(x) + C

y = sqrt(C + 4*sin(x))

If C = 4, then we get y = 2*sqrt(1 + sin(x)) as a solution to the differential equation, which matches our previous answer.

A Deceptive Area Problem

Here is a typical integral calculus problem that is trickier than it seems. Find the area under the curve y = sqrt(1 + cos(x)) between π and 3π, shaded in yellow in the figure above.

Since we know the antiderivative of sqrt(1 + cos(x)) to be 2*sqrt(1 - cos(x)), we could simply plug the endpoints into the antiderivative and subtract to find the area. But this gives us

2*sqrt(1 - cos(3π)) - 2*sqrt(1 - cos(π)) = 2*sqrt(2) - 2*sqrt(2) = 0.

Clearly the area under the curve is not zero, so what went wrong? Perhaps instead of using the first form of the antiderivative, we should use the alternative form 2*tan(x/2)*sqrt(1+cos(x)). Using this form gives us

2*tan(3π/2)*sqrt(1 + cos(3π)) - 2*tan(π/2)*sqrt(1 + cos(π))

= 2(±∞)*0 - 2(±∞)*0

= indeterminant form

So again we run into trouble trying to evaluate the derivative. As a third attempt, let's take advantage of the symmetry of the function and find the integral from 2π to 3π, then multiply the result by 2. We'll use the first form of the antiderivative, 2*sqrt(1 - cos(x)). This gives us

2 * [2*sqrt(1 - cos(3π)) - 2*sqrt(1 - cos(2π))]

= 2 * [2*sqrt(2) - 0]

= 4*sqrt(2)

≈ 5.657

So finally we have successfully evaluated the definite integral of sqrt(1 + cos(x)) from between π and 3π.


    0 of 8192 characters used
    Post Comment

    • profile image

      ∆▼∆▼∆▼∆ 3 years ago

      what if the constant is not 1 but some other number? how do i integrate sqrt(2+sin(x))?

    • calculus-geometry profile image

      TR Smith 3 years ago from Eastern Europe

      If you have sqrt(A±cos(x)) or sqrt(A±sin(x)) and A is not equal to 1, then it's not integrable. Meaning you can't write out the antiderivative in terms of elementary functions. You can express the indefinite integral in terms of elliptic functions, a commonly encountered type of non-elementary function.


    • profile image

      ∆▼∆▼∆▼∆ 3 years ago

      ok...thanks. another question...the function f(x) = sqrt(A+sin(x)) has maximum value sqrt(A+1), minimum value sqrt(A-1), midline of (sqrt(A+1)+sqrt(A-1))/2, and amplitude of (sqrt(A+1)-sqrt(A-1))/2 the period of f(x) is the same as sin(x), then can you approximate f(x) via

      f(x) ≈ ((sqrt(A+1)-sqrt(A-1))/2)sin(x)+(sqrt(A+1)+sqrt(A-1))/2


      with that approximation is approximate antiderivative

      ∫f(x)dx = -((sqrt(A+1)-sqrt(A-1))/2)cos(x) + x(sqrt(A+1)+sqrt(A-1))/2 + C

      can you do that?

    • calculus-geometry profile image

      TR Smith 3 years ago from Eastern Europe

      Yes, that approximation works very well for larger values of A, and the greater A is the smaller the maximum difference is between f(x) and the approximation. For example, if A = 10, then the maximum error is about 0.00397, and when A = 100 the maximum error is only about 0.000125. So if A is large and you want to estimate the integral of sqrt(A+sin(x)) you can use the approximation formula.

    Click to Rate This Article