How To Evaluate ∫1/(1+x2n)dx For An Arbitrary Positive Integer N?

    1. Home
    2. Questions
    3. Tags
    4. Users
    5. Unanswered
  1. Teams

    Ask questions, find answers and collaborate at work with Stack Overflow for Teams.

    Try Teams for free Explore Teams
  2. Teams
  3. Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams How to evaluate $\int 1/(1+x^{2n})\,dx$ for an arbitrary positive integer $n$? [duplicate] Ask Question Asked 12 years, 4 months ago Modified 6 months ago Viewed 11k times 7 $\begingroup$ This question already has answers here: What is the primitive function of $\int 1/(x^{2n} +1)dx$? (3 answers) Closed 7 months ago.

How to find $$\int\dfrac{dx}{1+x^{2n}}$$ where $n \in \mathbb N$?

Remark

When $n=1$, the antiderivative is $\tan^{-1}x+C$. But already with $n=2$ this is something much more complicated. Is there a general method?

Share Cite Follow edited Jun 12, 2020 at 10:38 Community's user avatar CommunityBot 1 asked Jul 15, 2012 at 7:46 Madrit Zhaku's user avatar Madrit ZhakuMadrit Zhaku 5,3244 gold badges17 silver badges19 bronze badges $\endgroup$ 5
  • 1 $\begingroup$ This feels very hypergeometric to me. Is that what you're looking for? Or perhaps you have bounds? $\endgroup$ – davidlowryduda Commented Jul 15, 2012 at 7:59
  • 2 $\begingroup$ If the integral ranges from $-\infty$ to $\infty$ there's a nice trick with the Residue theorem. $\endgroup$ – Cocopuffs Commented Jul 15, 2012 at 8:20
  • $\begingroup$ @GerryMyerson : It's not always a good thing. $\endgroup$ – Michael Hardy Commented Jul 17, 2012 at 0:30
  • 1 $\begingroup$ @Michael, OP is zero-for-ten (and unfortunately unable to do anything about it, having been suspended for the next few weeks), I'm zero-for-one, and I try to make up for it in other ways. $\endgroup$ – Gerry Myerson Commented Jul 17, 2012 at 5:17
  • $\begingroup$ See THIS ANSWER and THIS ONE for a closed-from anti-derivative. $\endgroup$ – Mark Viola Commented May 18 at 2:39
Add a comment |

4 Answers 4

Sorted by: Reset to default Highest score (default) Date modified (newest first) Date created (oldest first) 8 $\begingroup$

If the integral is taken from $0$ to $\infty$, there is more than one way to evaluate this. One is $$ \begin{align} \int_0^\infty\frac{\mathrm{d}t}{1+t^{2n}} &=\int_0^1\frac{\mathrm{d}t}{1+t^{2n}}+\int_0^1\frac{t^{2n-2}\,\mathrm{d}t}{1+t^{2n}}\\ &=\int_0^1(1-t^{2n}+t^{4n}-t^{6n}+\dots)\,\mathrm{d}t\\ &+\int_0^1(t^{2n-2}-t^{4n-2}+t^{6n-2}+\dots)\,\mathrm{d}t\\ &=1-\frac{1}{2n+1}+\frac{1}{4n+1}-\frac{1}{6n+1}+\dots\\ &+\frac{1}{2n-1}-\frac{1}{4n-1}+\frac{1}{6n-1}-\dots\\ &=\frac{1}{2n}\left(\frac{1}{0+\frac{1}{2n}}-\frac{1}{1+\frac{1}{2n}}+\frac{1}{2+\frac{1}{2n}}-\frac{1}{3+\frac{1}{2n}}+\dots\right)\\ &+\frac{1}{2n}\left(-\frac{1}{-1+\frac{1}{2n}}+\frac{1}{-2+\frac{1}{2n}}-\frac{1}{-3+\frac{1}{2n}}-\dots\right)\\ &=\frac{1}{2n}\sum_{k=-\infty}^\infty\frac{(-1)^k}{k+\frac{1}{2n}}\\ &=\frac{\pi}{2n}\csc\left(\frac{\pi}{2n}\right)\tag{1} \end{align} $$ The last step uses the result from "An Infinite Alternating Harmonic Series" on this page.

Another method is to use contour integration to evaluate $$ \frac12\int_{-\infty}^\infty\frac{\mathrm{d}t}{1+t^{2n}} =\frac12\oint_\gamma\frac{\mathrm{d}z}{1+z^{2n}}\tag{2} $$ where $\gamma$ is the path from $-\infty$ to $\infty$ along the real axis (which picks up the integral in question), then circling back counter-clockwise around the upper half-plane (which vanishes). The countour integral in $(2)$ is $2\pi i$ times the sum of the residues of $\frac{1}{1+z^{2n}}$ in the upper half-plane.

The poles of the integrand in $(2)$ are given by $$ \zeta_k=e^{\frac{\pi i}{2n}(2k+1)}\tag{3} $$ where $k=0\dots n-1$ represent the roots in the upper half-plane. All the poles are simple, so the residues are $$ \begin{align} \mathrm{Res}_{z=\zeta_k}\left(\frac{1}{1+z^{2n}}\right) &=\lim_{z\to\zeta_k}\frac{z-\zeta_k}{1+z^{2n}}\\ &=-\frac{1}{2n}\zeta_{k}\\ &=-\frac{1}{2n}e^{\frac{\pi i}{2n}(2k+1)}\tag{4} \end{align} $$ Thus, we get $$ \begin{align} \int_0^\infty\frac{\mathrm{d}t}{1+t^{2n}} &=-\frac{2\pi i}{4n}\sum_{k=0}^{n-1}e^{\frac{\pi i}{2n}(2k+1)}\\ &=-\frac{\pi i}{2n}e^{\frac{\pi i}{2n}}\frac{1-(-1)}{1-e^{\frac{\pi i}{n}}}\\ &=\frac{\pi}{2n}\csc\left(\frac{\pi}{2n}\right)\tag{5} \end{align} $$

Share Cite Follow edited Jul 17, 2012 at 1:56 answered Jul 17, 2012 at 0:57 robjohn's user avatar robjohnrobjohn 350k38 gold badges485 silver badges882 bronze badges $\endgroup$ 7
  • $\begingroup$ How was the first equality calculated? (the change in the limits of integration) $\endgroup$ – Joshua Bunce Commented May 4, 2016 at 23:15
  • $\begingroup$ Apply the substitution $t\mapsto\frac1t$ to the integral $\int_1^\infty\frac{\mathrm{d}t}{1+t^{2n}}$ $\endgroup$ – robjohn Commented May 4, 2016 at 23:54
  • $\begingroup$ See I applied that and it didn't work out - but then I've just noticed I didn't take d(1/t). Thx!! $\endgroup$ – Joshua Bunce Commented May 5, 2016 at 0:04
  • $\begingroup$ I think your answer is off by a factor of 2. When you calculate the residue, you get a fraction -\frac{1}{2n}, but when you sum 2\pi i times the residues you have -\frac{2\pi i}{4n} in front. Where is that extra multiple of \frac{1}{2} coming from? $\endgroup$ – TheEmptyFunction Commented Sep 28, 2022 at 22:02
  • 1 $\begingroup$ @TheEmptyFunction: Notice that the contour integral is for $(-\infty,\infty)$, but the integral is for $(0,\infty)$. The $\frac12$ comes from equation $(2)$ using the fact that the integrand is even. $\endgroup$ – robjohn Commented Sep 28, 2022 at 23:37
| Show 2 more comments 8 $\begingroup$

The following papers will be useful. Note that Gopalan/Ravichandran is freely available on the internet.

M. A. Gopalan and V. Ravichandran, Note on the evaluation of $\int \frac{1}{\;1\;+\;t^{2^{n}}\;}dt$, Mathematics Magazine 67 #1 (February 1994), 53-54.

Judith A. Palagallo and Thomas E. Price, Some remarks on the evaluation of $\int \frac{dt}{\;t^{m}\;+\;1\;}$, Mathematics Magazine 70 #1 (February 1997), 59-63.

V. Ravichandran, On a series considered by Srinivasa Ramanujan, Mathematical Gazette 88 #511 (March 2004), 105-110.

Share Cite Follow answered Jul 16, 2012 at 20:23 Dave L. Renfro's user avatar Dave L. RenfroDave L. Renfro 37.8k4 gold badges69 silver badges129 bronze badges $\endgroup$ 1
  • $\begingroup$ See THIS ANSWER and THIS ONE for a closed-from anti-derivative. $\endgroup$ – Mark Viola Commented May 18 at 2:39
Add a comment | 5 $\begingroup$

I realized after I wrote this up that this is given in one of the papers mentioned by Dave L. Renfro, but I did all this work and the approach is not exactly the same, so here goes.

We wish to evaluate $$ \int \frac{1}{1+x^n}\ dx. $$

We will do this by partial fraction decomposition. Note that the roots of $1+x^n$ are the $2n$-th roots of unity that are not $n$-th roots of unity. That is to say $x^{2n}-1=(x^n-1)(x^n+1)$. It follows that the set of roots of $1+x^n$ is $$ \left\{\exp\left(\frac{(2k-1)\pi i}{n} \right):0\leq k\leq n-1\right\}. $$ If we consider the roots (excluding -1 if $n$ is odd) we have that $$ \left(x-\exp\left(\frac{(2k+1)\pi i}{n} \right)\right)\left(x-\exp\left(\frac{(2(n-k)-1)\pi i}{n} \right)\right)=\left(x-\exp\left(\frac{(2k+1)\pi i}{n} \right)\right)\left(x-\exp\left(\frac{-(2k+1)\pi i}{n} \right)\right) $$ $$ =x^2-\left(\exp\left(\frac{(2k+1)\pi i}{n}\right)+\exp\left(\frac{-(2k+1)\pi i}{n} \right) \right)x+1=x^2-2\cos\left(\frac{(2k+1)\pi}{n}\right)x+1. $$ Let $x_k=\frac{(2k+1)\pi}{n}$ and $\alpha_k=\exp((2k+1)\pi i/n)$, then by partial fraction decomposition (for $n$ even) we have that $$ \frac{1}{1+x^n}=\sum_{k=0}^{n/2-1}\frac{a_kx+b_k}{x^2-2\cos(x_k)x+1}=\sum_{k=0}^{n/2-1}\frac{(a_kx+b_k)\prod_{\overset{j\neq k}{j\neq n-1-k}}(x-\alpha_j)}{1+x^n}=\sum_{k=0}^{n/2-1}\frac{\frac{a_kx+b_k}{x-\alpha_{n-1-k}}\prod_{j\neq k}(x-\alpha_j)}{1+x^n}. $$ Furthermore $$ 1=\sum_{k=0}^{n/2-1}\frac{a_kx+b_k}{x-\alpha_{k}^{-1}}\prod_{j\neq k}(x-\alpha_j). $$ If we set $x=\alpha_k$ for $0\leq k\leq n/2$ we obtain $$ \frac{a_k\alpha_k+b_k}{\alpha_k-\alpha_{k}^{-1}}\prod_{j\neq k}(\alpha_k-\alpha_j)=1. $$ Note that $$ \prod_{k=1}^{n-1}(x-\exp(k2\pi i/n))=(1+x+\cdots+x^{n-1}) $$ so $$ \prod_{k=1}^{n-1}(1-\exp(k2\pi i/n))=n. $$ Furthermore $$ \prod_{j\neq k}(\alpha_k-\alpha_j)=\prod_{j\neq k}\alpha_k(1-\frac{\alpha_j}{\alpha_k})=\alpha_k^{n-1}\prod_{k=1}^{n-1}(1-\exp(k2\pi i/n))=n\alpha_k^{n-1}=-n\alpha^{-1}. $$ So we are left with $$ \frac{(a_k\alpha_k+b_k)(-n\alpha_k^{-1})}{\alpha_k-\alpha_{k}^{-1}}=1. $$ and $$ -n(a_k+\alpha_k^{-1}b_k)=\alpha_k-\alpha_{k}^{-1}=2i\sin(x_k) $$ implying that $$ a_k+\cos(x_k)b_k-i\sin(x_k)b_k=-\frac{2i}{n}\sin(x_k). $$ Hence $b_k=\frac{2}{n}$ and $a_k=-\frac{2}{n}\cos(x_k)$. So for even $n$ we have. $$ \frac{1}{1+x^n}=-\frac{1}{n}\sum_{k=0}^{n/2-1}\frac{2\cos(x_k)x-2}{x^2-2\cos(x_k)x+1} $$ If $n$ is odd we have the additional term $$ \frac{a}{1+x} $$ and it follows that $a\prod_{\alpha_k\neq 1}(x-\alpha_k)=a(1-x+\cdots-x^{n-2}+x^{n-1})=1$. Setting $x=-1$ we obtain $a=\frac{1}{n}$.

Noticing that $$ \frac{2\cos(x_k)x-2}{x^2-2\cos(x_k)x+1}=\frac{\cos(x_k)(2x-2\cos(x_k))}{x^2-2\cos(x_k)x+1}+\frac{2\cos^2(x_k)-2}{(x-\cos(x_k))^2+1-\cos^2(x_k)} $$ $$ =\frac{\cos(x_k)(2x-2\cos(x_k))}{x^2-2\cos(x_k)x+1}-2\frac{\sin^2(x_k)}{(x-\cos(x_k))^2+\sin^{2}(x_k)} $$ $$ =\cos(x_k)\frac{(2x-2\cos(x_k))}{x^2-2\cos(x_k)x+1}-2\sin(x_k)\frac{\csc(x_k)}{(\frac{x-\cos(x_k)}{\sin(x_k)})^2+1}. $$ So we have for even $n$ $$ \int\frac{1}{1+x^n}\ dx=-\frac{1}{n}\sum_{k=0}^{n/2-1}\left\{\cos(x_k)\int\frac{(2x-2\cos(x_k))}{x^2-2\cos(x_k)x+1}\ dx-2\sin(x_k)\int\frac{\csc(x_k)}{(\frac{x-\cos(x_k)}{\sin(x_k)})^2+1}\ dx\right\} $$ $$ =-\frac{1}{n}\sum_{k=0}^{n/2-1}\left\{\cos(x_k)\log|x^2-2\cos(x_k)x+1|-2\sin(x_k)\arctan\left(\frac{x-\cos(x_k)}{\sin(x_k)}\right)\right\}, $$ and for odd $n$ $$ \int\frac{1}{1+x^n}\ dx=\frac{1}{n}\log|x+1|-\frac{1}{n}\sum_{k=0}^{(n-1)/2-1}\left\{\cos(x_k)\log|x^2-2\cos(x_k)x+1|-2\sin(x_k)\arctan\left(\frac{x-\cos(x_k)}{\sin(x_k)}\right)\right\} $$ where $x_k=(2k+1)\pi/n$, $n\in\mathbb{Z}_{>0}$.

Share Cite Follow answered Dec 13, 2015 at 5:04 Eric's user avatar EricEric 7034 silver badges6 bronze badges $\endgroup$ 1
  • $\begingroup$ See THIS ANSWER and THIS ONE for a closed-from anti-derivative. $\endgroup$ – Mark Viola Commented May 18 at 2:40
Add a comment | 1 $\begingroup$

Eric's answer can be futher generalized to integrals like $\int\frac{x^{m}}{x^{n}\pm 1}\mathop{\mathrm{d}x}$ where $m\in\mathbb{N},n\in\mathbb{N}_+\land m<n$

$$\begin{aligned} \int\frac{x^{m-1}}{x^{2n}+1}\mathop{\mathrm{d}x}&=\boxed{-\frac{1}{2n}\sum_{k=1}^{n}\left(\cos\left(\frac{\left(2k-1\right)m}{2n}\pi\right)\ln\left(\left|x^{2}-2\cos\left(\frac{2k-1}{2n}\pi\right)x+1\right|\right)\\ +2\sin\left(\frac{\left(2k-1\right)m}{2n}\pi\right)\tan^{-1}\left(\cot\left(\frac{2k-1}{2n}\pi\right)-\csc\left(\frac{2k-1}{2n}\pi\right)x\right)\right)+C}\\ \int\frac{x^{m-1}}{x^{2n+1}+1}\mathop{\mathrm{d}x}&=\boxed{\frac{\left(-1\right)^{m+1}\ln\left(\left|x+1\right|\right)}{2n+1}\\ -\frac{1}{2n+1}\sum_{k=1}^{n}\left(\cos\left(\frac{\left(2k-1\right)m}{2n+1}\pi\right)\ln\left(\left|x^{2}-2\cos\left(\frac{2k-1}{2n+1}\pi\right)x+1\right|\right)\\ +2\sin\left(\frac{\left(2k-1\right)m}{2n+1}\pi\right)\tan^{-1}\left(\cot\left(\frac{2k-1}{2n+1}\pi\right)-\csc\left(\frac{2k-1}{2n+1}\right)x\right)\right)+C}\\ \int\frac{x^{m-1}}{x^{2n+2}-1}\mathop{\mathrm{d}x}&=\boxed{\frac{\ln\left(\left|x-1\right|\right)+\left(-1\right)^{m}\ln\left(\left|x+1\right|\right)}{2n+2}\\ +\frac{1}{2n+2}\sum_{k=1}^{n}\left(\cos\left(\frac{km}{n+1}\pi\right)\ln\left(\left|x^{2}-2\cos\left(\frac{k}{n+1}\pi\right)x+1\right|\right)\\ +2\sin\left(\frac{km}{n+1}\pi\right)\tan^{-1}\left(\cot\left(\frac{k}{n+1}\pi\right)-\csc\left(\frac{k}{n+1}\pi\right)x\right)\right)+C}\\ \int\frac{x^{m-1}}{x^{2n+1}-1}\mathop{\mathrm{d}x}&=\boxed{\frac{\ln\left(\left|x-1\right|\right)}{2n+1}\\ +\frac{1}{2n+1}\sum_{k=1}^{n}\left(\cos\left(\frac{2km}{2n+1}\pi\right)\ln\left(\left|x^{2}-2\cos\left(\frac{2k}{2n+1}\pi\right)x+1\right|\right)\\ +2\sin\left(\frac{2km}{2n+1}\pi\right)\tan^{-1}\left(\cot\left(\frac{2k}{2n+1}\pi\right)-\csc\left(\frac{2k}{2n+1}\pi\right)x\right)\right)+C} \end{aligned}$$

Bonus

  1. If $m,n\in\mathbb{Q}_+\setminus\mathbb{N}_+$, the integral can be rewritten as

    $$\int\frac{x^{\frac{r}{s}}}{x^\frac{p}{q}\pm 1}\mathop{\mathrm{d}x}$$

    where $p,q,r,s\in\mathbb{N}_+$.

    Let $u^{\operatorname{lcm}(s,q)}=x\rightarrow{\mathop{\mathrm{d}x}}={\operatorname{lcm}}(s,q)u^{\operatorname{lcm}(s,q)-1}$, substitute it back and both of the exponent of the numerator and denominator become integrals, optionally convert it to a proper rational function via long division, then apply the formulas above.

  2. If $m\in\mathbb{R}\setminus\mathbb{Q}\lor n\in\mathbb{R}\setminus\mathbb{Q}$, the integral cannot be expressed in elementary functions. One way to express is to use hypergeometric funcions $$\begin{aligned} \int\frac{x^{\alpha-1}}{x^{\beta}\pm 1}\mathop{\mathrm{d}x}&=\boxed{\pm\frac{x^{\alpha}}{\alpha}\operatorname{_2F_1}(1,\frac{\alpha}{\beta};1+\frac{\alpha}{\beta};\mp x^{\beta})+C} \end{aligned}$$

Share Cite Follow edited May 21 at 7:08 answered May 14 at 12:49 El Mismo Sol's user avatar El Mismo SolEl Mismo Sol 3051 silver badge5 bronze badges $\endgroup$ 2
  • $\begingroup$ See THIS ANSWER and THIS ONE for a closed-from anti-derivative. $\endgroup$ – Mark Viola Commented May 18 at 2:40
  • $\begingroup$ @MarkViola My answer is also in closed form, and generalized your answer the case where the degree of the numerator is greater than zero. $\endgroup$ – El Mismo Sol Commented May 18 at 3:02
Add a comment |

Not the answer you're looking for? Browse other questions tagged .

  • Featured on Meta
  • More network sites to see advertising test [updated with phase 2]
  • We’re (finally!) going to the cloud!

Linked

15 What is the primitive function of $\int 1/(x^{2n} +1)dx$? 0 Integrate $\frac{1}{1+x^k}$ 1 Is there any trick to evaluate this integral? 45 Evaluate $\int\frac1{1+x^n}dx$ for $n\in\mathbb R$ 4 Finding closed form of $\int_{-\infty}^{\infty}\frac{dx}{x^{2n}+1}$ 1 Integral of $\frac{1}{x^{n}+1}$ for odd $n$ 6 evaluate $\int \frac{\tan x}{x^2+1}\:dx$ 2 Evaluate $\int \frac{x+1}{(x^2-x+8)^3}\, dx$ 6 How can I evaluate $\int \frac{x^3+2x-7}{\sqrt{x^2+1}}\mathrm dx?$ 14 How to evaluate $\int \frac{dx}{\sin(\ln(x))}$? 8 Evaluate integral $\int (x^2-1)(x^3-3x)^{4/3} \mathop{dx}$ 1 How would I evaluate $\int{x!}dx$?

Hot Network Questions

  • What is the length scale of correlated errors observed on the 72-qubit google chip used in the quantum memory experiment
  • What are the pros & cons of downdraft ventilation?
  • turn wire frame of ico sphere into a cage
  • Isekai mahwa with silver haired male lead who is an illegitimate prince
  • Hearing the cry of a baby - abandoning practice for action?
  • Is it possible to use NAS hard drives in a desktop?
  • What style/Form is the Stranger's Poem in, from The Magnus Archives?
  • Polynomial.java - a Java class for dealing with polynomials with BigDecimal coefficients
  • What happens when a ranger uses Favored Foe with Hunter's Mark?
  • If Occam's razor supports naturalism over theism, then why was William of Ockham, its author, a theist and not a naturalist?
  • The sum of multiple irrational numbers can be rational, even when they're not conjugates. Is this normal?
  • Replacement chain looks different from factory chain
  • What is the proper way to say "voice direction" in German?
  • From exponent of sum to product of exponents
  • What is the wave icon with a dot on the call screen?
  • Likehood ratio test vs wald test multicolinearity
  • How to find file names but only with grep .html OR .php?
  • A fantasy story with an imp in a box that paints pictures
  • Understanding the definition of the covariant derivative
  • Is there a way to forecast by subgroup without forecasting each subgroup separately?
  • Is there a Prüfer domain that is a UFD but not a PID?
  • What exactly is the cornerstone that Mark 12:10 speaks of?
  • Why does Jesus tell the Jews to follow the Pharisees teaching while elsewhere He speaks of them creating unnecessary rules?
  • Does the Truth not exists or does it seems to not exists due to our abstraction?
more hot questions

Từ khóa » (x^(n-1)tan^(-1)x^(n))/(1+x^(2n))