Thoughts on Infinity (Part 2a)

Last summer, Math With Bad Drawings had a nice series on the notion of infinity that I recommend highly. This topic is a perennial struggle for math majors to grasp, and I like the approach that the author uses to sell this difficult notion.

Here’s Part 2 on the harmonic series, which is extremely well-written and which I recommend highly. Here’s a brief summary: the infinite harmonic series

\displaystyle \sum_{n=1}^\infty \frac{1}{n}

diverges. This is a perennial head-scratcher for students, as the terms become smaller and smaller yet the infinite series diverges.

To show this, notice that

\displaystyle \frac{1}{3} + \frac{1}{4} > \displaystyle \frac{1}{4} + \frac{1}{4} = \displaystyle \frac{1}{2},

\displaystyle \frac{1}{5} + \frac{1}{6} + \frac{1}{7} + \frac{1}{8} > \displaystyle \frac{1}{8} + \frac{1}{8} + \frac{1}{8} + \frac{1}{8} = \displaystyle \frac{1}{2},

and so on. Therefore,

\displaystyle 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} > \displaystyle 1 + \frac{1}{2} + \frac{1}{2} = 2,

\displaystyle 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} +\frac{1}{5} + \frac{1}{6} + \frac{1}{7} + \frac{1}{8} > \displaystyle 1 + \frac{1}{2} + \frac{1}{2} + \frac{1}{2} = \displaystyle \frac{5}{2},

and, in general,

\displaystyle 1 + \frac{1}{2} + \frac{1}{3} + \dots + \frac{1}{2^n} > \displaystyle 1+\frac{n}{2}.

Since \displaystyle \lim_{n \to \infty} \left(1 + \frac{n}{2} \right) = \infty, we can conclude that the harmonic series diverges.

However, here’s an amazing fact which I hadn’t known before the Math With Bad Drawings post: if you eliminate from the harmonic series all of the fractions whose denominator contains a 9, then the new series converges!

I’ll discuss the proof of this fact in tomorrow’s post. Until then, here’s a copy of the comic used in the Math With Bad Drawings post.

Source: http://smbc-comics.com/index.php?id=3777

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

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

Also, as long as x \ne 1 and x \ne -1, there is an alternative answer:

\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.

In this concluding post of this series, I’d like to talk about the practical implications of the assumptions that x \ne 1 and x \ne -1.

For the sake of simplicity for the rest of this post, let

F(x) = \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)

and

G(x) = \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).

If I evaluate a definite integral of \displaystyle \frac{1}{x^4+1} over an interval that contains neither x = 1 or x = -1, then either F or G can be used. Courtesy of Mathematica:

integral1

green line

However, if the region of integration contains either x = -1 or x =1 (or both), then only using F returns the correct answer.

integral2So this should be a cautionary tale about solving for angles, as the innocent-looking +n\pi that appeared several posts ago ultimately makes a big difference in the final answers that are obtained.

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

In the course of evaluating the antiderivative

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

I have stumbled across a very curious trigonometric identity:

\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 < x_2,

\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 x_2 < x < 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> x_1,

where x_1 and x_2 are the unique values so that

\tan^{-1} ( x_1\sqrt{2} - 1 ) + \tan^{-1}( x_1 \sqrt{2} + 1) = \displaystyle \frac{\pi}{2},

\tan^{-1} ( x_2\sqrt{2} - 1 ) + \tan^{-1}( x_2 \sqrt{2} + 1) = -\displaystyle \frac{\pi}{2}.

I will now show that x_1 = 1 and x_2 = -1. Indeed, it’s apparent that these have to be the two transition points because these are the points where \displaystyle \frac{x \sqrt{2}}{1 - x^2} is undefined. However, it would be more convincing to show this directly.

To show that x_1 = 1, I need to show that

\tan^{-1} (\sqrt{2} - 1 ) + \tan^{-1}( \sqrt{2} + 1) = \displaystyle \frac{\pi}{2}.

I could do this with a calculator…

arctangent…but that would be cheating.

Instead, let \alpha = \tan^{-1} (\sqrt{2} - 1 ) and \beta = \tan^{-1} (\sqrt{2} + 1 ), so that

\tan \alpha = \sqrt{2} - 1,

\tan \beta = \sqrt{2} + 1.

Indeed, by SOHCAHTOA, the angles \alpha and \beta can be represented in the figure below:

arctangenttriangle2The two small right triangles make one large triangle, and I will show that the large triangle is also a right triangle. To do this, let’s find the lengths of the three sides of the large triangle. The length of the longest side is clearly \sqrt{2} - 1 + \sqrt{2} + 1 = 2\sqrt{2}. I will use the Pythagorean theorem to find the lengths of the other two sides. For the small right triangle containing \alpha, the missing side is

\sqrt{ \left(\sqrt{2} - 1 \right)^2 + 1^2} = \sqrt{2 - 2\sqrt{2} + 1 + 1} = \sqrt{4-2\sqrt{2}}

Next, for the small right triangle containing \beta, the missing side is

\sqrt{ \left(\sqrt{2} + 1 \right)^2 + 1^2} = \sqrt{2 + 2\sqrt{2} + 1 + 1} = \sqrt{4+2\sqrt{2}}

So let me redraw the figure, eliminating the altitude from the previous figure:

arctangenttriangle3

Notice that the condition of the Pythagorean theorem is satisfied, since

\left( \sqrt{4-2\sqrt{2}} \right)^2 + \left( \sqrt{4+2\sqrt{2}} \right)^2 = 4 - 2\sqrt{2} + 4 + 2 \sqrt{2} = 8,

or

\left( \sqrt{4-2\sqrt{2}} \right)^2 + \left( \sqrt{4+2\sqrt{2}} \right)^2 = \left( 2\sqrt{2} \right)^2.

Therefore, by the converse of the Pythagorean theorem, the above figure must be a right triangle (albeit a right triangle with sides of unusual length), and so \alpha + \beta = \pi/2. In other words, x_1 = 1, as required.

To show that x_2 = -1, I will show that the function f(x) = \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) is an odd function using the fact that \tan^{-1} x is also an odd function:

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

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

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

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

= -f(x).

Therefore, f(-1) = -f(1) = -\displaystyle \frac{\pi}{2}, and so x_2 = -1.

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

In the course of evaluating the antiderivative

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

I’ve accidentally stumbled on a very curious looking trigonometric identity:

\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.

The extra -\pi and \pi are important. Without them, the graphs of the left-hand side and right-hand sides are clearly different if x < -1 or x > 1:

TwoArctangents1

However, they match when those constants are included:

TwoArctangents2

Let’s see if I can explain why this trigonometric identity occurs without resorting to the graphs.

Since \tan^{-1} x assumes values between -\pi/2 and \pi/2, I know that

-\displaystyle \frac{\pi}{2} < \tan^{-1} ( x\sqrt{2} - 1 ) < \frac{\pi}{2},

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

and so

-\pi< \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1} ( x\sqrt{2} + 1 ) < \pi.

However,

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

and so \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1} ( x\sqrt{2} + 1 ) and \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) must differ if \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1} ( x\sqrt{2} + 1) is in the interval [-\pi,-\pi/2] or in the interval [\pi/2,\pi].

I also notice that

-\pi< \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1} ( x\sqrt{2} + 1 ) < \pi,

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

and so

-\displaystyle \frac{3\pi}{2} < \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1} ( x\sqrt{2} + 1 )-\tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) < \frac{3\pi}{2}.

However, this difference can only be equal to a multiple of \pi, and there are only three multiples of \pi in the interval \displaystyle \left( -\frac{3\pi}{2}, \frac{3\pi}{2} \right), namely -\pi, 0, and \pi.

To determine the values of x where this happens, I also note that f_1(x) = x \sqrt{2} - 1, f_2(x) = x \sqrt{2} + 1, and f_3(x) = \tan^{-1} x are increasing functions, and so f(x) = \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) must also be an increasing function. Therefore, to determine where f(x) lies in the interval [\pi/2,\pi],it suffices to determine the unique value x_1 so that f(x_1) = \pi/2. Likewise, to determine where f(x) lies in the interval [-\pi,-\pi/2],it suffices to determine the unique value x_2 so that f(x_2) = -\pi/2.

In summary, I have shown so far 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) -\pi if x < x_2,

\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 x_2 < x < 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> x_1,

where x_1 and x_2 are the unique values so that

\tan^{-1} ( x_1\sqrt{2} - 1 ) + \tan^{-1}( x_1 \sqrt{2} + 1) = \displaystyle \frac{\pi}{2},

\tan^{-1} ( x_2\sqrt{2} - 1 ) + \tan^{-1}( x_2 \sqrt{2} + 1) = -\displaystyle \frac{\pi}{2}.

So, to complete the proof of the trigonometric identity, I need to show that x_1 = 1 and x_2 = -1. I will do this in tomorrow’s post.

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.