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

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.