## #53 Cannot integrate 1/(1+x^n)

open
nobody
None
5
2009-11-16
2008-03-12
Ximin Luo
No

Maxima cannot integrate functions of the form

1/(1+x^n)

for n >= 7.

Mathematica is capable of this.

Maxima attempts the integration via an algorithm which seems to involve taking partial fractions. For example, if you try to integrate 1/(1+x^7) for example, Maxima gives:

log(1+x)/7 - integral(x^5-2*x^4+3*x^3-4*x^2+5*x-6)/(x^6-x^5+x^4-x^3+x^2-x+1) / 7

I'm guessing a different algorithm (such as that employed by Mathematica) is required to give a fully symbolic answer. For the record, the integral(1/(1+x^7)) is:

Log[1 + x]/7 - (Cos[Pi/7]*Log[1 + x^2 - 2*x*Cos[Pi/7]])/7 - (Cos[(3*Pi)/7]*Log[1 + x^2 - 2*x*Cos[(3*Pi)/7]])/7 - (Cos[(5*Pi)/7]*Log[1 + x^2 - 2*x*Cos[(5*Pi)/7]])/7 + (2*ArcTan[(x - Cos[Pi/7])*Csc[Pi/7]]* Sin[Pi/7])/7 + (2*ArcTan[(x - Cos[(3*Pi)/7])* Csc[(3*Pi)/7]]*Sin[(3*Pi)/7])/7 + (2*ArcTan[(x - Cos[(5*Pi)/7])* Csc[(5*Pi)/7]]*Sin[(5*Pi)/7])/7

----

Additionally, this also means that we can calculate the integral(that nasty rational function), by calculating

7 * ( log(1+x)/7 - integral(1/(1+x^7)) )

As a side note, Mathematica also cannot give integral(that nasty rational function) fully symbolically. Instead, it gives:

RootSum[1 - #1 + #1^2 - #1^3 + #1^4 - #1^5 + #1^6 & , (-6*Log[x - #1] + 5*Log[x - #1]*#1 - 4*Log[x - #1]*#1^2 + 3*Log[x - #1]* #1^3 - 2*Log[x - #1]*#1^4 + Log[x - #1]*#1^5)/(-1 + 2*#1 - 3*#1^2 + 4*#1^3 - 5*#1^4 + 6*#1^5) & ]

where RootSum[ f, form ] represents the sum of form[x] for all x that satisfy the polynomial equation f[x] == 0.

## Discussion

<< < 1 2 (Page 2 of 2)

• Robert Marik
2008-06-02

Logged In: YES
user_id=2033662
Originator: NO

This could be a similar problem (copied from Maxima discussion list)

Hello all, Maxima fails to evaluate integral of 1/(x^4+3*x^2+1).

Answers to this problem on Maxima list include:
-----------------------------------------------
BTW Maxima is able to factor x4+3*x2+1. To factor a polynomial over the
Gaussian integers, use "gfactor" instead of "factor":

gfactor(x4+3*x2+1) => (x2-%i*x+1)*(x2+%i*x+1)

itegrate doesn't handle 1/(x4+3*x2+1), but it does handle
1/gfactor(x4+3*x2+1).
-------------------------------------------------
Probably the integration code should be replaced. The commercial Macsyma
does the integral, which is kind of a mess, but
if you ev(%,numer) you get 0.72361 * atan(1.61804 * x) - 0.27639 *
atan(0.61803 * x)
--------------------------------------------------
The Horowitz method (1969) gives the rational part of the antiderivative of a rational function. The method for the logarithmic part is due to Trager (1976), I think. The residue method (at least for definite integration of rational functions) that Maxima might be using seems to be due to Wang (circa 1974). Maybe Maxima isn't using the best methods for
rational function integration?

• Dieter Kaiser
2009-11-16

As described in one of the postings the algorithm of Maxima handle the cases n=2, ..., 6. Furthermore, it is stated that it might be feasible to extend this.
I think this report is a feature request.

Setting the tracker to feature requests.

Dieter Kaiser

• Dieter Kaiser
2009-11-16

• labels: 840495 -->

<< < 1 2 (Page 2 of 2)