Saturday, March 1, 2025

Calculus: Indefinite Integrals of x^n / (x^2 + 1)

Calculus: Indefinite Integrals of x^n / (x^2 + 1)



Task: Calculate the indefinite integrals taking the form of:


∫ x^n / (x^2 + 1) dx for n for n = 0, 1, 2, 3, 4, 5



x^0 / (x^2 + 1) dx (n = 0)


∫ x^0 / (x^2 + 1) dx

= ∫ 1 / (x^2 + 1) dx

= arctan(x) + C


where C is a constant. This is a simple integral where we just have the derivative of arctan(x) in the integrand.



x^1 / (x^2 + 1) dx (n = 1)


∫ x^1 / (x^2 + 1) dx

= ∫ x / (x^2 + 1) dx


Let u = x^2 + 1, then:

du = 2 * x dx

1 /2 du = x * dx.


Continuing:

= ∫ 1 / 2 * 1 / u du

= 1 / 2 * ∫ 1 / u du

= 1 / 2 * (ln |u| + C)


Substituting back:

= 1 / 2 * (ln |x^2 + 1| + C)


Since C is an arbitrary constant:

= 1 / 2 * ln |x^2 + 1| + C



x^2 / (x^2 + 1) dx (n = 2)


∫ x^2 / (x^2 + 1) dx

It took me a bit to figure this out…. Start by adding and subtracting 1:

= ∫ (x^2 + 1 – 1) / (x^2 + 1) dx

= ∫ (x^2 + 1) / (x^2 + 1) - 1 / (x^2 + 1) dx

= ∫ 1 - 1 / (x^2 + 1) dx

= x – arctan(x) + C



x^3 / (x^2 + 1) dx (n = 3)


∫ x^3 / (x^2 + 1) dx

Since the degree of the numerator is greater than the degree of the denominator, we can divide as so:


x^3 / (x^2 + 1) = x – x / (x^2 + 1)


This is going to be case from here on out.


∫ x^3 / (x^2 + 1) dx

= ∫ x – x / (x^2 + 1) dx

= x^2 / 2 – 1 / 2 * ln |x^2 + 1 | + C



x^4 / (x^2 + 1) dx (n = 4)


x^4 / (x^2 + 1) = x^2 – 1 + 1 / (x^2 + 1)


∫ x^4 / (x^2 + 1) dx

= ∫ x^2 – 1 + 1 / (x^2 + 1) dx

= x^3 / 3 – x + arctan(x) + C



x^5 / (x^2 + 1) dx (n = 5)


x^5 / (x^2 + 1) = x^3 – x + x / (x^2 + 1)


∫ x^5 / (x^2 + 1) dx

= ∫ x^3 – x + x / (x^2 + 1) dx

= x^4 / 4 – x^2 / 2 + 1 / 2 * ln |x^2 + 1| + C


Interesting point, I put this problem to Wolfram Alpha:

https://www.wolframalpha.com/input?i2d=true&i=Integrate%5BDivide%5BPower%5Bx%2C5%5D%2CPower%5Bx%2C2%5D%2B1%5D%2Cx%5D


∫ x^5 / (x^2 + 1) dx

= 1 / 4 ((x^2 – 1)^2 + 2 * log(x^2 + 1)) + C


Note in computer language log(x) = ln (x), and x^2 + 1 > 0 for all x. (x^2 + 1) = |x^2 + 1|.


Multiply and simplify:

= 1 / 4 ((x^4 – 2 * x^2 + 1) + 2 * log(x^2 + 1)) + C

= x^4 / 4 – x^2 / 2 + 1 / 4 + 1 / 2 * ln |x^2 + 1| + C


Again, C is an arbitrary constant, hence C + 1 / 4 is also a constant.

= x^4 / 4 – x^2 / 2 + 1 / 2 * ln |x^2 + 1| + C’

(where C’ = C + 1 / 4)


So answers match. We’re OK. Sigh of relief.



x^6 / (x^2 + 1) dx (n = 6)



x^6 / (x^2 + 1) = x^4 – x^2 + 1 – 1 / (x^2 + 1)


∫ x^6 / (x^2 + 1) dx

= ∫ x^4 – x^2 + 1 – 1 / (x^2 + 1) dx

= x^5 / 5 – x^3 / 3 + x – arctan(x) + C



Observations


I present this without proof. From what the pattern suggests:


∫ x^n / (x^2 + 1) dx


If n is odd, the integral ends in ± 1 / 2 * ln |x^2 + 1| + C

If n is even, the integral ends in ± arctan(x) + C


Hope you find this helpful. Welcome to March,



Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Calculus: Indefinite Integrals of x^n / (x^2 + 1)

Calculus: Indefinite Integrals of x^n / (x^2 + 1) Task: Calculate the indefinite integrals taking the form of: ∫ x^n / (x^2 + 1...