The antiderivative of 1/(x^4+1): Part 7

This antiderivative has arguable the highest ratio of “really hard to compute” to “really easy to write”:

\displaystyle \int \frac{1}{x^4 + 1} dx

As we’ve seen in this series, the answer is

\displaystyle \frac{\sqrt{2}}{8} \ln \left(\frac{x^2 + x\sqrt{2} + 1}{x^2 - x\sqrt{2} + 1} \right) + \frac{\sqrt{2}}{4} \tan^{-1} ( x\sqrt{2} - 1 ) + \frac{\sqrt{2}}{4} \tan^{-1}( x \sqrt{2} + 1) + C

It turns out that this can be simplified somewhat as long as x \ne 1 and x \ne -1. I’ll use the trig identity

\tan(\alpha + \beta) = \displaystyle \frac{\tan \alpha + \tan \beta}{1 - \tan \alpha \tan \beta}

When I apply this trig identity for \alpha = \tan^{-1} ( x\sqrt{2} - 1 ) and \beta = \tan^{-1} ( x\sqrt{2} + 1 ) , I obtain

\tan \left[ \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) \right] = \displaystyle \frac{x \sqrt{2} - 1 + x \sqrt{2} + 1}{1 - (x\sqrt{2} - 1)(x\sqrt{2} + 1)}

= \displaystyle \frac{2x \sqrt{2}}{1 - (2x^2 - 1)}

= \displaystyle \frac{2x \sqrt{2}}{2 - 2x^2}

= \displaystyle \frac{x \sqrt{2}}{1 - x^2}.

So we can conclude that

\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) + n\pi

for some integer n that depends on x. The +n\pi is important, as a cursory look reveals that y = \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) and y = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) have different graphs. (The vertical lines in the orange graph indicate where the right-hand side is undefined when x = 1 or x = -1.

TwoArctangents1

The two graphs coincide when -1 < x < 1 but differ otherwise. However, it appears that the two graphs differ by a constant. Indeed, if I subtract \pi from the orange graph if x < -1 and add \pi to the orange graph if x > 1, then they match:

TwoArctangents2

So, evidently

\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) -\pi if x < -1,

\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) if -1 < x < 1,

\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) + \pi if x> 1.

So as long as x \ne 1 and x \ne -1, this constant -\pi, 0, or \pi can be absorbed into the constant C:

\displaystyle \int \frac{1}{x^4 + 1} dx = \displaystyle \frac{\sqrt{2}}{8} \ln \left(\frac{x^2 + x\sqrt{2} + 1}{x^2 - x\sqrt{2} + 1} \right) + \frac{\sqrt{2}}{4} \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) + C.

However, a picture may be persuasive but is not a proof, and there are some subtle issues with this simplification. I’ll discuss these further details in tomorrow’s post.

The antiderivative of 1/(x^4+1): Part 6

This antiderivative has arguable the highest ratio of “really hard to compute” to “really easy to write”:

\displaystyle \int \frac{1}{x^4 + 1} dx

So far, I’ve shown that the denominator can be factored over the real numbers:

\displaystyle \int \frac{dx}{x^4 + 1} = \displaystyle \int \frac{dx}{\left(x^2 - x \sqrt{2} + 1 \right) \left(x^2 + x \sqrt{2} + 1\right)}

= \displaystyle \int \frac{ -\displaystyle \frac{\sqrt{2}}{4} x + \frac{1}{2}}{ x^2 - x \sqrt{2} + 1 } dx + \int \frac{ \displaystyle \frac{\sqrt{2}}{4} x + \frac{1}{2}}{ x^2 - x \sqrt{2} + 1 } dx

= \displaystyle \frac{\sqrt{2}}{8} \ln \left( \frac{x^2 + x\sqrt{2} + 1}{x^2 - x\sqrt{2} + 1} \right) + \frac{1}{4} \int \frac{ dx }{ x^2 - x \sqrt{2} + 1 } + \frac{1}{4} \int \frac{ dx }{ x^2 + x \sqrt{2} + 1 } dx

To evaluate the remaining two integrals, I’ll use the antiderivative

\displaystyle \int \frac{dx}{x^2 + k^2} = \displaystyle \frac{1}{k} \tan^{-1} \left( \frac{x}{k} \right).

To begin, I’ll complete the squares:

\displaystyle \frac{1}{4} \int \frac{ dx }{ x^2 - x \sqrt{2} + 1 } + \frac{1}{4} \int \frac{ dx }{ x^2 + x \sqrt{2} + 1 } dx = \displaystyle \frac{1}{4} \int \frac{ dx }{ x^2 - x \sqrt{2} + \displaystyle \frac{1}{2} + \displaystyle \frac{1}{2} } + \frac{1}{4} \int \frac{ dx }{ x^2 + x \sqrt{2} + \displaystyle \frac{1}{2} + \displaystyle \frac{1}{2} }

= \displaystyle \frac{1}{4} \int \frac{ dx }{ \left(x - \displaystyle \frac{ \sqrt{2}}{2} \right)^2 + \left(\displaystyle \frac{\sqrt{2}}{2} \right)^2 } + \frac{1}{4} \int \frac{ dx }{\left(x + \displaystyle \frac{ \sqrt{2}}{2} \right)^2 + \left(\displaystyle \frac{\sqrt{2}}{2} \right)^2 }

Applying the substitutions u = x - \displaystyle \frac{ \sqrt{2}}{2} and v = x + \displaystyle \frac{ \sqrt{2}}{2}, I can continue:

= \displaystyle \frac{1}{4} \int \frac{ du }{ u^2 + \left(\displaystyle \frac{\sqrt{2}}{2} \right)^2 } + \frac{1}{4} \int \frac{ dv }{v^2 + \left(\displaystyle \frac{\sqrt{2}}{2} \right)^2 }

= \displaystyle \frac{\sqrt{2}}{4} \tan^{-1} \left( \frac{u}{\sqrt{2}/2} \right) + \frac{\sqrt{2}}{4} \tan^{-1} \left( \frac{v }{\sqrt{2}/2} \right) + C

= \displaystyle \frac{\sqrt{2}}{4} \tan^{-1} \left( \frac{x - \displaystyle \frac{ \sqrt{2}}{2}}{\sqrt{2}/2} \right) + \frac{\sqrt{2}}{4} \tan^{-1} \left( \frac{x + \displaystyle \frac{ \sqrt{2}}{2} }{\sqrt{2}/2} \right) + C

= \displaystyle \frac{\sqrt{2}}{4} \tan^{-1} \left( x\sqrt{2} - 1 \right) + \frac{\sqrt{2}}{4} \tan^{-1} \left( x \sqrt{2} + 1 \right) + C

Combining, I finally arrive at the answer for \displaystyle \int \frac{dx}{x^4 + 1}:

\displaystyle \frac{\sqrt{2}}{8} \ln \left(\frac{x^2 + x\sqrt{2} + 1}{x^2 - x\sqrt{2} + 1} \right) + \frac{\sqrt{2}}{4} \tan^{-1} ( x\sqrt{2} - 1 ) + \frac{\sqrt{2}}{4} \tan^{-1}( x \sqrt{2} + 1) + C

 Naturally, this can be checked by differentiation, but I’m not going type that out.

The antiderivative of 1/(x^4+1): Part 5

This antiderivative has arguable the highest ratio of “really hard to compute” to “really easy to write”:

\displaystyle \int \frac{1}{x^4 + 1} dx

So far, I’ve shown that the denominator can be factored over the real numbers:

\displaystyle \int \frac{dx}{x^4 + 1} = \displaystyle \int \frac{dx}{\left(x^2 - x \sqrt{2} + 1 \right) \left(x^2 + x \sqrt{2} + 1\right)}

= \displaystyle \int \frac{ -\displaystyle \frac{\sqrt{2}}{4} x + \frac{1}{2}}{ x^2 - x \sqrt{2} + 1 } dx + \int \frac{ \displaystyle \frac{\sqrt{2}}{4} x + \frac{1}{2}}{ x^2 + x \sqrt{2} + 1 } dx

after finding the partial fractions decomposition.

Let me start with the first of the two integrals. It’d be nice to use the substitution u = x^2 - x \sqrt{2} + 1. However, du = (2x - \sqrt{2}) dx, and so this substitution can’t be used cleanly. So, let me force the numerator to have this form, at least in part:

= \displaystyle \int \frac{ -\displaystyle \frac{\sqrt{2}}{4} x + \frac{1}{2}}{ x^2 - x \sqrt{2} + 1 } dx = \displaystyle -\frac{\sqrt{2}}{4} \int \frac{ x - \sqrt{2}}{ x^2 - x \sqrt{2} + 1 } dx

= \displaystyle -\frac{\sqrt{2}}{8} \int \frac{2x - 2\sqrt{2}}{ x^2 - x \sqrt{2} + 1 } dx

= \displaystyle -\frac{\sqrt{2}}{8} \int \frac{ 2x - \sqrt{2} - \sqrt{2} }{ x^2 - x \sqrt{2} + 1 } dx

= \displaystyle -\frac{\sqrt{2}}{8} \int \frac{ 2x - \sqrt{2} }{ x^2 - x \sqrt{2} + 1 } dx + \frac{1}{4} \int \frac{ dx }{ x^2 - x \sqrt{2} + 1 }

The substitution can now be applied to the first integral:

\displaystyle -\frac{\sqrt{2}}{8} \int \frac{2x - \sqrt{2} }{ x^2 - x \sqrt{2} + 1 } dx = \displaystyle -\frac{\sqrt{2}}{8} \int \frac{du}{u}

= \displaystyle -\frac{\sqrt{2}}{8} \ln |u| + C

= \displaystyle -\frac{\sqrt{2}}{8} \ln |x^2 - x\sqrt{2} + 1| + C

= \displaystyle -\frac{\sqrt{2}}{8} \ln (x^2 - x\sqrt{2} + 1) + C.

On the last line, I was able to remove the absolute value signs because x^2 - x \sqrt{2} + 1 is an irreducible quadratic and hence is never equal to zero for any real number x.

Similarly, I’ll try to apply the substitution v = x^2 + x \sqrt{2} + 1 to the second integral:

= \displaystyle \int \frac{ \displaystyle \frac{\sqrt{2}}{4} x + \frac{1}{2}}{ x^2 + x \sqrt{2} + 1 } dx = \displaystyle \frac{\sqrt{2}}{4} \int \frac{ x + \sqrt{2}}{ x^2 + x \sqrt{2} + 1 } dx

= \displaystyle \frac{\sqrt{2}}{8} \int \frac{ 2x + 2\sqrt{2}}{ x^2 + x \sqrt{2} + 1 } dx

= \displaystyle \frac{\sqrt{2}}{8} \int \frac{2x + \sqrt{2} + \sqrt{2} }{ x^2 + x \sqrt{2} + 1 } dx

= \displaystyle \frac{\sqrt{2}}{8} \int \frac{2x + \sqrt{2} }{ x^2 + x \sqrt{2} + 1 } dx + \frac{1}{4} \int \frac{ dx }{ x^2 + x \sqrt{2} + 1 } dx

The substitution can now be applied to the first integral:

\displaystyle \frac{\sqrt{2}}{8} \int \frac{2x + \sqrt{2} }{ x^2 + x \sqrt{2} + 1 } dx = \displaystyle \frac{\sqrt{2}}{8} \int \frac{dv}{v}

= \displaystyle \frac{\sqrt{2}}{8} \ln |v| + C

= \displaystyle \frac{\sqrt{2}}{8} \ln |x^2 + x\sqrt{2} + 1| + C

= \displaystyle \frac{\sqrt{2}}{8} \ln (x^2 + x\sqrt{2} + 1) + C.

So, thus far, I have shown that

\displaystyle \int \frac{dx}{x^4 + 1} = \displaystyle -\frac{\sqrt{2}}{8} \ln (x^2 - x\sqrt{2} + 1) + \frac{\sqrt{2}}{8} \ln (x^2 + x\sqrt{2} + 1)

\displaystyle + \frac{1}{4} \int \frac{ dx }{ x^2 - x \sqrt{2} + 1 } + \frac{1}{4} \int \frac{ dx }{ x^2 + x \sqrt{2} + 1 } dx

= \displaystyle \frac{\sqrt{2}}{8} \ln \left( \frac{x^2 + x\sqrt{2} + 1}{x^2 - x\sqrt{2} + 1} \right) + \frac{1}{4} \int \frac{ dx }{ x^2 - x \sqrt{2} + 1 } + \frac{1}{4} \int \frac{ dx }{ x^2 + x \sqrt{2} + 1 } dx

I’ll consider the evaluation of the remaining two integrals in tomorrow’s post.

The antiderivative of 1/(x^4+1): Part 4

This antiderivative has arguable the highest ratio of “really hard to compute” to “really easy to write”:

\displaystyle \int \frac{1}{x^4 + 1} dx

So far, I’ve shown that the denominator can be factored over the real numbers:

\displaystyle \int \frac{dx}{x^4 + 1} = \displaystyle \int \frac{dx}{\left(x^2 - x \sqrt{2} + 1 \right) \left(x^2 + x \sqrt{2} + 1\right)} ,

so that the technique of partial fractions can be applied. Since both quadratics in the denominator are irreducible (and the degree of the numerator is less than the degree of the denominator), the partial fractions decomposition has the form

\displaystyle \frac{1}{\left(x^2 - x \sqrt{2} + 1 \right) \left(x^2 + x \sqrt{2} + 1\right)} = \displaystyle \frac{Ax + B}{\left(x^2 - x \sqrt{2} + 1 \right)} + \displaystyle \frac{Cx + D}{ \left(x^2 + x \sqrt{2} + 1\right)}

Clearing out the denominators, I get

1 = (Ax + B) \left(x^2 + x \sqrt{2} + 1\right) + (Cx + D) \left(x^2 - x \sqrt{2} + 1\right)

or

1 = Ax^3 + Bx^2 + Ax^2 \sqrt{2} + Bx\sqrt{2} + Ax + B + Cx^3 + Dx^2 - Cx^2 \sqrt{2} - Dx\sqrt{2} + Cx + D

or

0x^3 + 0x^2 + 0x + 1 = (A + C)x^3 + (A \sqrt{2} + B - C \sqrt{2} + D)x^2 + (A + B\sqrt{2} + C - D \sqrt{2} ) x + (B+D)

Matching coefficients yields the following system of four equations in four unknowns:

A + C = 0

A\sqrt{2} + B - C\sqrt{2} + D = 0

A + B \sqrt{2} + C - D\sqrt{2} = 0

B + D = 1

Ordinarily, four-by-four systems of linear equations are somewhat painful to solve, but this system isn’t too bad. Since A + C = 0 from the first equation, the third equation becomes

0 + B \sqrt{2} - D \sqrt{2} = 0, or B = D.

From the fourth equation, I can conclude that B = 1/2 and D = 1/2. The second and third equations then become

A\sqrt{2} + \displaystyle \frac{1}{2} - C\sqrt{2} + \frac{1}{2} = 0

A + \displaystyle \frac{\sqrt{2}}{2} + C - \frac{\sqrt{2}}{2} = 0,

or

A - C = \displaystyle -\frac{\sqrt{2}}{2},

A + C = 0.

Adding the two equations yields 2A = -\displaystyle \frac{\sqrt{2}}{4}, so that A = -\displaystyle \frac{\sqrt{2}}{4} and C = \displaystyle \frac{\sqrt{2}}{4}.

Therefore, the integral can be rewritten as

\displaystyle \int \left( \frac{ -\displaystyle \frac{\sqrt{2}}{4} x + \frac{1}{2}}{ x^2 - x \sqrt{2} + 1 } + \frac{ \displaystyle \frac{\sqrt{2}}{4} x + \frac{1}{2}}{ x^2 + x \sqrt{2} + 1 } \right) dx

I’ll start evaluating this integral in tomorrow’s post.

The antiderivative of 1/(x^4+1): Part 3

This antiderivative has arguable the highest ratio of “really hard to compute” to “really easy to write”:

\displaystyle \int \frac{1}{x^4 + 1} dx

To compute this integral, I will use the technique of partial fractions. In yesterday’s post, I used De Moivre’s Theorem to factor the denominator over the complex plane, which then led to the factorization of the denominator over the real numbers.

In today’s post, I present an alternative way of factoring the denominator by completing the square. However, unlike the ordinary method of completing the square, I’ll do this by adding and subtracting the middle term and not the final term:

x^4 + 1= x^4 + 2x^2 + 1 - 2x^2

= (x^2 + 1)^2 - (x \sqrt{2})^2

= (x^2 + 1 + x\sqrt{2})(x^2 + 1 - x \sqrt{2}).

The quadratic formula can then be used to confirm that both of these quadratics have complex roots and hence are irreducible over the real numbers, and so I have thus factored the denominator over the real numbers:

\displaystyle \int \frac{dx}{x^4 + 1} = \displaystyle \int \frac{dx}{\left(x^2 - x \sqrt{2} + 1 \right) \left(x^2 + x \sqrt{2} + 1\right)} .

and the technique of partial fractions can be applied.

There’s a theorem that says that any polynomial over the real numbers can be factored over the real numbers using linear terms and irreducible quadratic terms. However, as seen in this example, there’s no promise that the terms will have rational coefficients.

I’ll continue the calculation of this integral with tomorrow’s post.

The antiderivative of 1/(x^4+1): Part 2

This antiderivative has arguable the highest ratio of “really hard to compute” to “really easy to write”:

\displaystyle \int \frac{1}{x^4 + 1} dx

To compute this integral, I will use the technique of partial fractions. This requires factoring the denominator over the real numbers, which can be accomplished by finding the roots of the denominator. In other words, I need to solve

x^4 + 1 = 0,

or

z^4 = -1.

I switched to the letter z since the roots will be complex. The four roots of this quartic equation can be found with De Moivre’s Theorem by writing

z = r (\cos \theta + i \sin \theta),

where r is a real number, and

-1 + 0i = 1(\cos \pi + \i \sin \pi)

By De Moivre’s Theorem, I obtain

r^4 (\cos 4\theta + i \sin 4 \theta) = 1 (\cos \pi + i \sin \pi).

Matching terms, I obtain the two equations

r^4 = 1 and 4\theta = \pi + 2\pi n

or

r = 1 and \theta = \displaystyle \frac{\pi}{4} + \displaystyle \frac{\pi n}{2}

or

r = 1 and \theta = \displaystyle \frac{\pi}{4}, \frac{3\pi}{4}, \frac{5\pi}{4}, \frac{7\pi}{4}.

This yields the four solutions

z = 1 \left[ \cos \displaystyle \frac{\pi}{4} + i \sin \frac{\pi}{4} \right] = \displaystyle \frac{\sqrt{2}}{2} + i \frac{\sqrt{2}}{2}

z = 1 \left[ \cos \displaystyle \frac{3\pi}{4} + i \sin \frac{3\pi}{4} \right] = -\displaystyle \frac{\sqrt{2}}{2} + i \frac{\sqrt{2}}{2}

z = 1 \left[ \cos \displaystyle \frac{5\pi}{4} + i \sin \frac{5\pi}{4} \right] = -\displaystyle \frac{\sqrt{2}}{2} - i \frac{\sqrt{2}}{2}

z = 1 \left[ \cos \displaystyle \frac{7\pi}{4} + i \sin \frac{7\pi}{4} \right] = \displaystyle \frac{\sqrt{2}}{2} - i \frac{\sqrt{2}}{2}

Therefore, the denominator x^4 + 1 can be written as the following product of linear factors over the complex plane:

\displaystyle \left(x - \left[ \displaystyle \frac{\sqrt{2}}{2} + i \frac{\sqrt{2}}{2} \right] \right)\left(x - \left[ \displaystyle \frac{\sqrt{2}}{2} - i \frac{\sqrt{2}}{2} \right] \right) \left(x - \left[ -\displaystyle \frac{\sqrt{2}}{2} + i \frac{\sqrt{2}}{2} \right] \right) \left(x - \left[ - \displaystyle \frac{\sqrt{2}}{2} - i \frac{\sqrt{2}}{2} \right] \right)

or

\displaystyle \left(\left[x - \displaystyle \frac{\sqrt{2}}{2} \right] - i \frac{\sqrt{2}}{2} \right)\left( \left[ x - \displaystyle \frac{\sqrt{2}}{2} \right] + i \frac{\sqrt{2}}{2} \right) \left( \left[ x + \displaystyle \frac{\sqrt{2}}{2} \right] - i \frac{\sqrt{2}}{2} \right) \left( \left[ x + \displaystyle \frac{\sqrt{2}}{2} \right] + i \frac{\sqrt{2}}{2} \right)

or

\displaystyle \left(\left[x - \displaystyle \frac{\sqrt{2}}{2} \right]^2 - \left[ i \frac{\sqrt{2}}{2} \right]^2 \right) \left( \left[ x + \displaystyle \frac{\sqrt{2}}{2} \right]^2 - \left[i \frac{\sqrt{2}}{2} \right]^2 \right)

or

\displaystyle \left(x^2 - x \sqrt{2} + \displaystyle \frac{1}{2} + \displaystyle \frac{1}{2}\right) \left(x^2 + x \sqrt{2} + \displaystyle \frac{1}{2} + \displaystyle \frac{1}{2}\right)

or

\displaystyle \left(x^2 - x \sqrt{2} + 1 \right) \left(x^2 + x \sqrt{2} + 1\right).

We have thus factored the denominator over the real numbers:

\displaystyle \int \frac{dx}{x^4 + 1} = \displaystyle \int \frac{dx}{\left(x^2 - x \sqrt{2} + 1 \right) \left(x^2 + x \sqrt{2} + 1\right)} ,

and the technique of partial fractions can be applied.

I’ll continue the calculation of this integral with tomorrow’s post.

The antiderivative of 1/(x^4+1): Part 1

Here’s an innocuous looking integral:

\displaystyle \int \frac{1}{x^4 + 1} dx

This integral arguably has the highest ratio of “really hard to compute” to “really easy to write” of any indefinite integral, since it is merely a rational function without any powers with non-integer exponents, trigonometric functions, exponential functions, or logarithms. Furthermore, the numerator is a constant while the denominator has only two terms. It doesn’t look that hard.

But this integral is really hard to compute. Indeed, in my experience, this integral is often held as the gold standard for Calculus II (or AP Calculus) students who are learning the various techniques of integration. In this series, I will discuss the various methods that have to be employed to find this antiderivative.

I’ll begin this tomorrow. In the meantime, I’ll leave a thought bubble if you’d like to think about how to compute this integral.

green_speech_bubble

How I Impressed My Wife: Part 7

And so I’ve finally arrived at the end of this series, describing what one of my professors called the art of integration. I really liked that phrase, and I’ve passed that on to my own students.

I really like the integral

\displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x}

because there are so many different ways of evaluating it, as discussed in this series. Indeed, when I started typing out this series, I never imagined that I had enough material to fill a series with more than 40 entries! These techniques include:

  • Ordinary substitutions
  • Trigonometric substitutions
  • Trigonometric identities… lots of trigonometric identities
  • The magic substitution u = \tan x/2
  • Completing the square
  • Eliminating unneeded parameters
  • Differentiation under the integral sign (see Wikipedia for more details about this most untaught way of computing integrals)
  • Partial fractions… and different ways of obtaining a partial fractions decomposition
  • The substitution z = e^{i x}, converting an integral on [0,2\pi] to a contour integral over the unit circle in the complex plane.
  • Converting an integral on (-\infty,\infty) to the limit of a contour integral over a semicircle in the complex plane.
  • Residues… and different ways of computing the residue at a pole

I don’t claim to have exhausted all of the ways that this integral can be computed; please leave a comment if you think you’ve found a technique that is substantially different than those I’ve already presented.

Back when I was a student, my calculus professor said that differentiation was a science. There are rules to follow (the Chain Rule, the Product Rule, the Quotient Rule, etc.), but that any function can be differentiated through the careful application of these rules. Integration, on the other hand, is more of an art. Yes, there are some techniques that need to be known, but often great creativity is needed in order to compute an integral. Differentiation does not require much creativity, but integration does. I thought that this was a profound insight for students just learning calculus, and so I’ve been passing this insight to my own students.

There are a couple loose threads in this series that I’d like to resolve one of these days:

  • I’d love to figure out a better way of showing that the above integral does not depend on a without doing so much work toward computing it explicitly.
  • I’d love to figure out a way of computing the integral that results after the magic substitution is performed. The denominator becomes a messy quartic polynomial, and I haven’t figured out a good way of determining the roots of this polynomial. (I avoided this complication in this series by setting a = 0, which did not ultimately affect the value of the integral.)

At the start of this series, I mentioned that this integral was original posed to me by my wife, who was trying to resolve a difference in the way that Mathematica 4 and Mathematica 8 computed it. In conclusion, I end with the Newton’s Three Laws story which was publicized in the following article that UNT publicized about my wife and me for Valentine’s Day 2015.

 

How I Impressed My Wife: Part 6g

This series was inspired by a question that my wife asked me: calculate

Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x}

Originally, I multiplied the top and bottom of the integrand by \tan^2 x and performed a substitution. However, as I’ve discussed in this series, there are four different ways that this integral can be evaluated.
Starting with today’s post, I’ll begin a fifth method. I really like this integral, as it illustrates so many different techniques of integration as well as the trigonometric tricks necessary for computing some integrals.

green lineSince Q is independent of a, I can substitute any convenient value of a that I want without changing the value of Q. As shown in previous posts, substituting a =0 yields the following simplification:

Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x}

= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + 2 \cdot 0 \cdot \sin x \cos x + (0^2 + b^2) \sin^2 x}

= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\pi}^{\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 b^2 - 2) u^2 + 1}

= \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1}

= 2\pi i \left[\displaystyle \frac{r_1}{r_1^2-1} + \displaystyle \frac{r_2}{r_2^2-1} \right],

where I’ve made the assumption that |b| < 1. In the above derivation, C_R is the contour in the complex plane shown below (graphic courtesy of Mathworld).

Also,

r_1 = \sqrt{1-b^2} + |b|i

and

r_2 = -\sqrt{1-b^2} + |b|i

are the two poles of the final integrand that lie within this contour.

It now remains to simplify the final algebraic expression. To begin, I note

\displaystyle \frac{r_1}{r_1^2-1} = \displaystyle \frac{\sqrt{1-b^2} + |b|i}{[\sqrt{1-b^2} + |b|i]^2 - 1}

= \displaystyle \frac{\sqrt{1-b^2} + |b|i}{1-b^2 + 2|b|i\sqrt{1-b^2} - |b|^2 - 1}

= \displaystyle \frac{\sqrt{1-b^2} + |b|i}{-2|b|^2 + 2|b|i\sqrt{1-b^2}}

= \displaystyle \frac{\sqrt{1-b^2} + |b|i}{2|b|i(|b|i +\sqrt{1-b^2})}

= \displaystyle \frac{1}{2|b|i}.

Similarly,

\displaystyle \frac{r_2}{r_2^2-1} = \displaystyle \frac{-\sqrt{1-b^2} + |b|i}{[-\sqrt{1-b^2} + |b|i]^2 - 1}

= \displaystyle \frac{-\sqrt{1-b^2} + |b|i}{1-b^2 - 2|b|i\sqrt{1-b^2} - |b|^2 - 1}

= \displaystyle \frac{-\sqrt{1-b^2} + |b|i}{-2|b|^2 - 2|b|i\sqrt{1-b^2}}

= \displaystyle \frac{-\sqrt{1-b^2} + |b|i}{2|b|i(|b|i -\sqrt{1-b^2})}

= \displaystyle \frac{1}{2|b|i}.

Therefore,

Q = 2\pi i \left[\displaystyle \frac{r_1}{r_1^2-1} + \displaystyle \frac{r_2}{r_2^2-1} \right] = 2\pi i \left[ \displaystyle \frac{1}{2|b|i} + \frac{1}{2|b| i} \right] = 2\pi i \displaystyle \frac{2}{2|b|i} = \displaystyle \frac{2\pi}{|b|}.

green lineAnd so, at long last, I’ve completed a fifth different evaluation of Q.