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

Different ways of computing a limit (Part 5)

One of my colleagues placed the following problem on an exam for his Calculus II course…

\displaystyle \lim_{x \to \infty} \frac{\sqrt{x^2+1}}{x}

and was impressed by the variety of correct responses that he received. I thought it would be fun to discuss some of the different ways that this limit can be computed.

Method #5. Another geometric approach. The numbers x and \sqrt{x^2+1} can be viewed as two sides of a right triangle with legs 1 and x and hypotenuse \sqrt{x^2+1}. Therefore, the length of the hypotenuse must be larger than the length of one leg but less than the sum of the lengths of the two legs. In other words,

x < \sqrt{x^2+1} < x+1,

or

1 < \displaystyle \frac{\sqrt{x^2+1}}{x} < \displaystyle 1+\frac{1}{x}.

 Clearly \displaystyle \lim_{x \to \infty} 1 = 1 and \displaystyle \lim_{x \to \infty} \left( 1 + \frac{1}{x} \right) = 1. Therefore, by the Sandwich Theorem, we can conclude that \displaystyle \lim_{x \to \infty} \frac{\sqrt{x^2+1}}{x} = 1.

Different ways of computing a limit (Part 4)

One of my colleagues placed the following problem on an exam for his Calculus II course…

\displaystyle \lim_{x \to \infty} \frac{\sqrt{x^2+1}}{x}

and was impressed by the variety of correct responses that he received. I thought it would be fun to discuss some of the different ways that this limit can be computed.

Method #4. The geometric approach. The numbers x and \sqrt{x^2+1} can be viewed as two sides of a right triangle with legs 1 and x and hypotenuse \sqrt{x^2+1}. So as x gets larger and larger, the longer leg x will get closer and closer in length to the length of the hypotenuse. Therefore, the ratio of the length of the hypotenuse to the length of the longer leg must be 1.

 

Different ways of computing a limit (Part 3)

One of my colleagues placed the following problem on an exam for his Calculus II course…

\displaystyle \lim_{x \to \infty} \frac{\sqrt{x^2+1}}{x}

and was impressed by the variety of correct responses that he received. I thought it would be fun to discuss some of the different ways that this limit can be computed.

Method #3. A trigonometric identity. When we see \sqrt{x^2+1} inside of an integral, one kneejerk reaction is to try the trigonometric substitution x = \tan \theta. So let’s use this here. Also, since x \to \infty, we can change the limit to be \theta \to \pi/2:

\displaystyle \lim_{x \to \infty} \frac{\sqrt{x^2+1}}{x} = \displaystyle \lim_{\theta \to \pi/2} \frac{\sqrt{\tan^2 \theta+1}}{\tan \theta}

= \displaystyle \lim_{\theta \to \pi/2} \frac{\sqrt{\sec^2 \theta}}{\tan \theta}

= \displaystyle \lim_{\theta \to \pi/2} \frac{ \sec \theta}{\tan \theta}

= \displaystyle \lim_{\theta \to \pi/2} \frac{ ~~\displaystyle \frac{1}{\cos \theta} ~~}{ ~~ \displaystyle \frac{\sin \theta}{\cos \theta} ~~ }

= \displaystyle \lim_{\theta \to \pi/2} \frac{ 1}{\sin \theta}

= 1.

Different ways of computing a limit (Part 2)

One of my colleagues placed the following problem on an exam for his Calculus II course…

\displaystyle \lim_{x \to \infty} \frac{\sqrt{x^2+1}}{x}

and was impressed by the variety of correct responses that he received. I thought it would be fun to discuss some of the different ways that this limit can be computed.

Method #2. Using L’Hopital’s Rule. The limit has the indeterminant form \infty/\infty, and so I can differentiate the top and the bottom with respect to x:

\displaystyle \lim_{x \to \infty} \frac{\sqrt{x^2+1}}{x} = \displaystyle \lim_{x \to \infty} \frac{ \displaystyle \frac{d}{dx} \left( \sqrt{x^2+1} \right) }{\displaystyle \frac{d}{dx} \left( x \right)}

= \displaystyle \lim_{x \to \infty} \frac{ \displaystyle \frac{1}{2} \left( x^2+1 \right)^{-1/2} \cdot 2x }{1}

= \displaystyle \lim_{x \to \infty} \frac{x}{\sqrt{x^2+1}}.

Oops… it looks like I just got the reciprocal of the original limit! Indeed, if I use L’Hopital’s Rule again, I’ll just return back to the original limit.

So that doesn’t look very helpful… except it is. If I define the value of this limit to be equal to L, then I’ve just shown that L = 1/L (assuming that the limit exists in the first place, of course). That means that L = 1 or L = -1. Well, clearly the limit of this nonnegative function can’t be negative, and so we conclude that the limit is equal to 1.

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.

How I Impressed My Wife: Part 6f

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},

where C_R is the contour in the complex plane shown below (graphic courtesy of Mathworld).

Amazingly, contour integrals can be simply computed by evaluating the residues at every pole located inside of the contour. (See Wikipedia and Mathworld for more details.) I have already handled the case of |b| = 1 and |b| > 1. Today, I begin the final case of |b| < 1.

Earlier in this series, I showed that

z^4 + (4b^2 - 2) z^2 + 1 = (z^2 + 2z \sqrt{1-b^2} + 1)(z^2 - 2z \sqrt{1-b^2} + 1)

if |b| < 1, and so the quadratic formula can be used to find the four poles of the integrand:

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

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

r_3 = \sqrt{1-b^2} - |b|i,

r_4 = -\sqrt{1-b^2} - |b|i.

Of these, only two lie (r_1 and r_2) within the contour for sufficiently large R (actually, for R > 1 since all four poles lie on the unit circle in the complex plane).

As shown earlier in this series, the residue at each pole is given by

\displaystyle \frac{r^2 + 1}{2r^3 + (4b^2-2)r}

I’ll now simplify this considerably by using the fact that r^4 + (4b^2-2)r^2 + 1 = 0 at each pole:

\displaystyle \frac{r^2 + 1}{2r^3 + (4b^2-2)r} = \displaystyle \frac{r(r^2+1)}{2r^4+(4b^2)-r^2}

= \displaystyle \frac{r(r^2+1)}{r^4+r^4 + (4b^2)-r^2}

= \displaystyle \frac{r(r^2+1)}{r^4-1}

= \displaystyle \frac{r(r^2+1)}{(r^2+1)(r^2-1)}

= \displaystyle \frac{r}{r^2-1}.

Therefore, to evaluate the contour integral, I simply the sum of the residues within the contour and multiply the sum by 2\pi i:

Q = \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].

green lineSo, to complete the evaluation of Q, I need to simplify the right-hand side. I’ll complete this in tomorrow’s post.