INDEFINITE INTEGRAL 1/(1+x^n)

Today´s post we will evaluate an indefinite integral, namely

I_n=\int\frac{1}{1+x^n}dx

As a special case we will compute

I_5=\int\frac{1}{1+x^5}dx


I_n=\int\frac{1}{1+x^n}dx(1)

By partial fractions we have that

\frac{1}{1+x^n}=\sum_{k=1}^{n}\frac{a_k}{x-x_k}

\frac{1}{1+x^n}=\frac{a_1}{x-x_1}+\frac{a_2}{x-x_2}+\cdots+\frac{a_n}{x-x_n}

where x_k=e^{\frac{i(2k-1)\pi}{n}}\,\,\text{for}\,\,1 \leq k \leq n

It comes from  solving the equation x^n+1=0 and finding it´s  complex roots

Without loss of generalty, we will consider n to be odd here, then, one of the roots of the polynomial

  x^n+1 is -1, and the other n-1 roots will form \frac{n-1}{2}  pairs of complex conjugate roots.


To find the coefficients a_k lets do the following


\lim_{x \rightarrow x_m}\frac{x-x_m}{1+x^n}=\lim_{x \rightarrow x_m}\left[\frac{a_1 (x-x_m)}{x-x_1}+\frac{a_2 (x-x_m)}{x-x_2}+\cdots+\frac{a_m(x-x_m)}{x-x_m}+\cdots\frac{a_n(x-x_m)}{x-x_n}\right]


The right hand side is just a_m, to evaluate the L.H.S. we apply l`Hopital´s rule to evaluate the limit,


a_m=\lim_{x \rightarrow x_m}\frac{\frac{d}{dx}(x-x_m)}{\frac{d}{dx}(1+x^n)}

=\lim_{x \rightarrow x_m}\frac{1}{nx^{n-1}}=\frac{x_m}{nx_m^{n}}

But     x_m=e^{\frac{i(2m-1)\pi}{n}}\,\,\text{so}\,\,\,\,x_m^{n}=-1\,\,\,\text{and}


a_m=-\frac{x_m}{n}

Therefore

\frac{1}{1+x^n}=-\frac{1}{n}\left[\frac{1}{x+1}+\frac{x_2}{x-x_2}+\cdots+\frac{x_n}{x-x_n}\right](2)

As mentioned above we have  \frac{n-1}{2}   pairs of complex conjugate roots, so if we call x_k^*  the conjugate 

pair of x_k we may rewrite (1) as


\frac{1}{1+x^n}=-\frac{1}{n}\left[\frac{1}{x+1}+\frac{x_2}{x-x_2}+\frac{x_2^*}{x-x_2^*}+\cdots+\frac{x_n}{x-x_n}+\frac{x_n^*}{x-x_n^*}\right](3)


Lets focus in one generic pair and the result obtained can be extended to the others

\frac{x_k}{x-x_k}+\frac{x_k^*}{x-x_k^*}=\frac{x_k(x-x_k^*)+x_k^*(x-x_k)}{(x-x_k)(x-x_k^*)}

=\frac{x(x_k+x_k^*)-2x_k^*x_k}{x^2-(x_k+x_k*)x+x_k x_k*}(4)


Now note that x_k has the form x_k=e^{i \theta_k} and x_k*=e^{-i \theta_k}, so we obtain that


x_kx_k^*=1

and


(x_k+x_k*)x=2x \cos(\theta_k)

Where     \theta_k=\frac{(2k-1)\pi}{n}


To simplify the notation, lets call   \cos(\theta_k)=c_k \,\,\text{and}\,\,\sin(\theta_k)=d_k,  therefore (4) becomes

 \frac{x_k}{x-x_k}+\frac{x_k^*}{x-x_k^*}=\frac{xc_k-2}{x^2-2xc_k+1}

Then (2) becomes

\frac{1}{1+x^n}=-\frac{1}{n}\left[\frac{-1}{x+1}+\sum_{k=1}^{ \lfloor\frac{n-1}{2}\rfloor}\frac{xc_k-2}{x^2-2xc_k+1}\right](5)

Integrating both side of (5) w.r. to  x

\int\frac{1}{1+x^n}dx=\frac{1}{n}\int\frac{1}{x+1}dx-\frac{1}{n}\sum_{k=1}^{ \lfloor\frac{n-1}{2}\rfloor}\int\frac{xc_k-2}{x^2-2xc_k+1}dx

=\frac{1}{n}\ln(x+1)-\frac{1}{n}\sum_{k=1}^{ \lfloor\frac{n-1}{2}\rfloor}\int\frac{xc_k-2c_k^2+2c_k^2-2}{x^2-2xc_k+1}dx

=\frac{1}{n}\ln(x+1)-\frac{1}{n}\sum_{k=1}^{ \lfloor\frac{n-1}{2}\rfloor}\left[c_k\int\frac{x-2c_k}{x^2-2xc_k+1}dx+2\int\frac{c_k^2-1}{x^2-2xc_k+1}dx\right]

=\frac{1}{n}\ln(x+1)-\frac{1}{n}\sum_{k=1}^{ \lfloor\frac{n-1}{2}\rfloor}\left[c_k\ln\left(x^2-2xc_k+1\right)-2\int\frac{(1-c_k^2)}{(1-c_k^2)+(x-c_k)^2}dx\right]

=\frac{1}{n}\ln(x+1)-\frac{1}{n}\sum_{k=1}^{ \lfloor\frac{n-1}{2}\rfloor}\left[c_k\ln\left(x^2-2xc_k+1\right)-2\sqrt{1-c_k^2}\arctan\left(\frac{x-c_k}{\sqrt{1-c_k^2}}\right)+C\right]

Now recall that c_k=\cos(\theta_k) and therefore \sqrt{1-c_k^2}=\sin(\theta_k), to get the finall form


\boxed{\int\frac{1}{1+x^n}dx=\frac{1}{n}\ln(x+1)-\frac{1}{n}\sum_{k=1}^{ \lfloor\frac{n-1}{2}\rfloor}\left[\cos(\theta_k)\ln\left(x^2-2x\cos(\theta_k)+1\right)-2\sin(\theta_k)\arctan\left(\frac{x-\cos(\theta_k)}{\sin(\theta_k)}\right)\right]+C}(6)





Special case

I_5=\int\frac{1}{1+x^5}dx

Applying (6)

\int\frac{1}{1+x^5}dx=\frac{1}{5}\ln(x+1)-\frac{1}{5}\sum_{k=1}^{ 2}\left[\cos(\theta_k)\ln\left(x^2-2x\cos(\theta_k)+1\right)-2\sin(\theta_k)\arctan\left(\frac{x-\cos(\theta_k)}{\sin(\theta_k)}\right)+C\right]

Where \theta_k=\frac{(2k-1)\pi}{n}\,\,\text{for k=1,2}

I=\frac{1}{5}\ln(x+1)-\frac{1}{5}\cos\left(\frac{\pi}{5}\right)\ln\left(x^2-2x\cos\left(\frac{\pi}{5}\right)+1\right)+\frac{2}{5}\sin\left(\frac{\pi}{5}\right)\arctan\left(\frac{x-\cos\left(\frac{\pi}{5}\right)}{\sin\left(\frac{\pi}{5}\right)}\right)-\frac{1}{5}\cos\left(\frac{3\pi}{5}\right)\ln\left(x^2-2x\cos\left(\frac{3\pi}{5}\right)+1\right)+\frac{2}{5}\sin\left(\frac{3\pi}{5}\right)\arctan\left(\frac{x-\cos\left(\frac{3\pi}{5}\right)}{\sin\left(\frac{3\pi}{5}\right)}\right)+C

Substituting the values of Sine and cosine proved in the appendix, we get the nasty closed form:


\boxed{\int\frac{1}{1+x^5}dx=\frac{1}{5}\ln(x+1)-\left(\frac{1+\sqrt{5}}{20}\right)\ln\left(x^2-\frac{1+\sqrt{5}}{2}x+1\right)+\left( \frac{\sqrt{5-\sqrt{5}}}{5\sqrt{2}}\right)\arctan\left(\frac{x-\frac{1+\sqrt{5}}{4}}{\frac{\sqrt{5-\sqrt{5}}}{2\sqrt{2}}}\right)-\left( \frac{1-\sqrt{5}}{20}\right)\ln\left(x^2-\frac{1-\sqrt{5}}{2}x+1\right)+\left(\frac{(\sqrt{5+\sqrt{5}})}{5\sqrt{2}} \right)\arctan\left(\frac{x-\frac{1-\sqrt{5}}{4}}{\frac{\sqrt{5+\sqrt{5}}}{2\sqrt{2}}}\right)+C}

Appendix

Consider the integral:

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

Let    \frac{x-c}{\sqrt{d}}=t, then

\sqrt{d}\int\frac{1}{1+t^2}dt=\sqrt{d}\arctan\left(\frac{x-c}{\sqrt{d}}\right)+C


\boxed{\int\frac{d}{d+(x-c)^2}dx=\sqrt{d}\arctan\left(\frac{x-c}{\sqrt{d}}\right)+C}


Values of   \cos \left(\frac{\pi}{5}\right),\sin \left(\frac{\pi}{5}\right),\cos \left(\frac{3\pi}{5}\right),\sin \left(\frac{3\pi}{5}\right)


We will need the following trig relations proved here. The triple angle formula is proved below.


\sin (x-y)= \sin x \cos y-\cos x \sin y(A.1)

\sin 2x = 2 \sin x \cos x(A.2)

\sin 3 x=3 \sin x-4 \sin ^{3} x(A.3)

\sin^2 x + \cos^2 x =1(A.4)

\cos 2x= \cos^2 x-\sin^2 x(A.5)


\sin \left(\frac{\pi}{5}\right)=\,\,?

First note that

\frac{2\pi}{5}=\pi-\frac{3\pi}{5}

Then, by (A.2)

\sin \left(\frac{2\pi}{5}\right)= \underbrace{\sin \pi \cos \left(\frac{3\pi}{5}\right)}_{=0}-\cos \pi \sin \left(\frac{3\pi}{5}\right)

Then

\sin \left(\frac{2\pi}{5}\right)=\sin \left(\frac{3\pi}{5}\right)(A.6)

applying (A.2) and (A.3) to (A.5)

2 \sin \left(\frac{\pi}{5}\right) \cos \left(\frac{\pi}{5}\right)=3 \sin \left(\frac{\pi}{5}\right)-4 \sin ^{3} \left(\frac{\pi}{5}\right)

Dividing both sides by \sin \left(\frac{\pi}{5}\right) we obtain

2 \cos \left(\frac{\pi}{5}\right)=3 -4 \sin ^{2} \left(\frac{\pi}{5}\right)

From (A.4) we get

2 \cos \left(\frac{\pi}{5}\right)=3 -4 \left(1-\cos ^{2} \left(\frac{\pi}{5}\right)\right)

4\cos ^{2} \left(\frac{\pi}{5}\right)-2 \cos \left(\frac{\pi}{5}\right)-1=0

Call \cos \left(\frac{\pi}{5}\right)=x, then

4x^2-2x-1=0

Solving this quadratic equation we obtain

\begin{aligned}
&x_1=\frac{1+\sqrt{5}}{4}>0\\
&x_2=\frac{1-\sqrt{5}}{4}<0\\
\end{aligned}

Since \cos \left(\frac{\pi}{5}\right)>0, we conclude that

\boxed{\cos \left(\frac{\pi}{5}\right)=\frac{1+\sqrt{5}}{4}}(A.7)

From (4) and (6) we obtain

\sin \left(\frac{\pi}{5}\right)=\sqrt{1-\left(\frac{1+\sqrt{5}}{4}\right)^2}

=\sqrt{\frac{5-\sqrt{5}}{8}}

\boxed{\sin \left(\frac{\pi}{5}\right)=\frac{\sqrt{5-\sqrt{5}}}{2\sqrt{2}}}(A.8)

\cos ^2\left(\frac{\pi}{5}\right)=\frac{1}{16}\left(1+\sqrt{5} \right)^2

\boxed{\cos ^2\left(\frac{\pi}{5}\right)=\frac{3+\sqrt{5}}{8}}(A.9)

\boxed{\sin ^2\left(\frac{\pi}{5}\right)=\frac{5-\sqrt{5}}{8}}(A.10)

From (A.5), (A.9) and (A.10) we obtain

\boxed{\cos \left(\frac{2\pi}{5}\right)=\frac{\sqrt{5}-1}{4}}(A.11)

\cos \left(\frac{3\pi}{5}\right)=\cos \left(\pi-\frac{2\pi}{5}\right)

=-\cos \left(\frac{2\pi}{5}\right)=\frac{1-\sqrt{5}}{4}

\boxed{\cos \left(\frac{3\pi}{5}\right)=\frac{1-\sqrt{5}}{4}}(A.12)

From (A.2) and (A.6) we obtain

\boxed{\sin \left(\frac{2\pi}{5}\right)=\frac{\sqrt{5+\sqrt{5}}}{2\sqrt{2}}}
(A.13)

           \boxed{\sin \left(\frac{3\pi}{5}\right)=\frac{\sqrt{5+\sqrt{5}}}{2\sqrt{2}}}
(A.14)


Triple angle formula for sine

\begin{aligned}
\sin 3 x=\sin (2 x+x) &=\cos x \sin 2 x+\sin x \cos 2 x \\
&=\cos x(2 \sin x \cos x)+\sin x\left(1-2 \sin ^{2} x\right) \\
&=2 \sin x \cos ^{2} x+\sin x-2 \sin ^{3} x \\
&=2 \sin x\left(1-\sin ^{2} x\right)+\sin x-2 \sin ^{3} x \\
&=2 \sin x-2 \sin ^{3} x+\sin x-2 \sin ^{3} x \\
&=3 \sin x-4 \sin ^{3} x .
\end{aligned}


Triple angle formula for cosine

\begin{aligned}
\cos 3 x=\cos (2 x+x) &=\cos 2 x \cos x-\sin 2 x \sin x \\
&=\left(1-2 \sin ^{2} x\right) \cos x-2 \sin ^{2} x \cos x \\
&=\cos x-2 \sin ^{2} x \cos x-2 \sin ^{2} x \cos x \\
&=\cos x-4 \sin ^{2} x \cos x\\
&=\cos x-4 \left(1-\cos ^{2}x\right)  \cos x\\
&=4\cos ^{3}x-3 \cos x
\end{aligned}


Reference:

Mark Viola: https://math.stackexchange.com/a/1354485/238708

Comments

Popular posts from this blog