# Antiderivative of Sqrt(Cos(x)) and Sqrt(Sin(x))

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

Though they look simple, the square root of cosine and square root of sine are non-integrable functions, meaning their antiderivatives cannot be expressed in closed-form in terms of elementary functions. No matter how many times you apply integration by parts or u-substitution on the integrals of sqrt(cos(x)) and sqrt(sin(x)), it's impossible to reduce it to an integrable form. This is someone surprising, since the more complicated function sqrt(tan(x)) is integrable. (See link below for integration tutorial).

Nonetheless, it is possible to estimate definite integrals of sqrt(sin(x)) and sqrt(cos(x)) using convergent series, such as Taylor series. Truncating the series after several terms gives you a reasonable approximation of the antiderivative.

The functions sqrt(cos(x)) and sqrt(sin(x)) are also related to elliptic integrals (see last section), so it is possible to estimate definite integrals of sqrt(cos(x) and sqrt(sin(x)) using elliptic integral algorithms. A simple change of variables will put the integrals in standard elliptic form.

## Step 1: Taylor Series of Sqrt(Cos(x))

To find the series representation of the integral of sqrt(cos(x)), we start by finding the Taylor series of sqrt(cos(x)) centered at x = 0. The Taylor series of a function f(x) is given by the formula

f(x) = ∑ f(n)(0) * x^n / n!, from n = 0 to n = ∞

where f(n)(x) is the nth derivative of f(x) and f(n)(0) is the nth derivative evaluated at x = 0. Taking f(x) = sqrt(cos(x)) we have

f(0) = 1
f'(0) = 0
f''(0) = -1/2
f'''(0) = 0
f''''(0) = -1/4

As it turns out, all the odd derivatives of sqrt(cos(x)) are 0 at x = 0, since sqrt(cos(x)) is an even function. The next several even derivatives are

f(6)(0) = -19/8
f(8)(0) = -559/16
f(10)(0) = -29161/32
f(12)(0) = -2368081/64

This means the Taylor series expansion of sqrt(cos(x)) is

1 - (x^2)/4 - (x^4)/96 - (19x^6)/5760 - (559x^8)/645120
- (29161x^10)/116121600 - (236808x^12)/30656102400 - ...

The larger the value of n, the more unwieldy the coefficients of x^n become.

## Step 2: Term by Term Integration

Once you've found a series expansion for a non-integrable function, the final step is to integrate the series term by term, using the simple formula for the antiderivative of a power function. The integral of x^n is [x^(n+1)]/(n+1). Applying this simple rule to each term of the power series for sqrt(cos(x)) gives us

∫ sqrt(cos(x)) dx =

x - (x^3)/12 - (x^5)/480 - (19x^7)/40320 - (559x^9)/5806080
- (29161x^11)/1277337600 - (236808x^13)/398529331200 - ...

This may not be the prettiest antiderivative, but if you truncate the series at seven or eight terms, it offers a good approximation of the integral. The radius of convergence is everywhere the function sqrt(cos(x)) is defined. Since sqrt(cos(x)) is periodic, the only range you need to consider is [-π/2, π/2].

## Integral of Sqrt(Sin(x))

Since sin(x) = cos(x - π/2), you can construct the power series representation of the integral of sqrt(sin(x)) by taking the power series for sqrt(cos(x)) and replacing the variable "x" with the shifted variable "x - π/2" everywhere x occurs. This gives us the equations

sqrt(sin(x)) =

1 - ((x - π/2)^2)/4 - ((x - π/2)^4)/96 - (19(x - π/2)^6)/5760 - (559(x - π/2)^8)/645120
- (29161(x - π/2)^10)/116121600 - (236808(x - π/2)^12)/30656102400 - ...

and ∫ sqrt(sin(x)) dx =

(x - π/2) - ((x - π/2)^3)/12 - ((x - π/2)^5)/480 - (19(x - π/2)^7)/40320
- (559(x - π/2)^9)/5806080 - (29161(x - π/2)^11)/1277337600
- (236808(x - π/2)^13)/398529331200 - ...

## Example Integration

Find the approximate area between the curves sqrt(sin(x)) and sqrt(cos(x)).

The graph above shows the function y = sqrt(cos(x)) in red and the function y = sqrt(sin(x)) in blue. The area between the two curves is highlighted in yellow and spans from x = 0 to x = π/2. Because the curves of the two functions are identical and symmetric, the shaded region is also symmetric. Thus, the area between the curves is equal to the integral

2 * ∫ sqrt(cos(x)) dx, π/4 ≤ x ≤ π/2

in other words, you only need to integrate over half the interval, from π/4 to π/2, and then double the result to get the full area. To find that number we use the antiderivative series for sqrt(cos(x)) truncated at seven terms, plug in the end points π/4 and π/2, subtract, and multiply by 2. This gives us

2* [π/2 - ((π/2)^3)/12 - ((π/2)^5)/480 - (19(π/2)^7)/40320 - (559(π/2)^9)/5806080
- (29161(π/2)^11)/1277337600 - (236808(π/2)^13)/398529331200] -

2*[π/4 - ((π/4)^3)/12 - ((π/4)^5)/480 - (19(π/4)^7)/40320 - (559(π/4)^9)/5806080
- (29161(π/4)^11)/1277337600 - (236808(π/4)^13)/398529331200]

= 2*(1.207676 - 0.744303)

= 0.926746

The series integral formula gives us an approximate area of 0.926746, and a numerical integrator gives the closer approximation 0.907674. The more terms you use in the integral series, the closer the approximation. A few more definite integrals are shown below.

## Relation to Elliptic Integrals

An elliptic integral is any integral of the form

∫ R( T(x), sqrt(P(x)) )

where R() is a rational function, T() is a polynomial, and P() is a polynomial of degree 3 or 4. Generally, elliptic integrals are non-integrable. So how can you convert sqrt(cos(x)) into an elliptic form? If you make the substitution x = arccos(u^2), and dx = -2u/sqrt(1 - u^4) du, then the integral of sqrt(cos(x)) is transformed into

∫ sqrt(cos(x)) dx

= ∫ (2u^2)/sqrt(1 - u^4) du

which is a rational function involving a polynomial and the square root of a quartic polynomial. Since sqrt(sin(x)) = sqrt(cos(x - π/2)), the integral of sqrt(sin(x)) is also equivalent to an elliptic integral.

4

9

0

3

0

## Popular

3

1

• ### Useful Vector Properties and Proofs for Calculus

0

0 of 8192 characters used

• sehrm 2 years ago from Los Angeles

This is solved by understanding the elliptic integral. According to Wolfram, the solution is in the form of the second kind.

• Author

TR Smith 2 years ago from Eastern Europe

yes, these are reducible to standard elliptic integral forms.