Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: SourceForge.net <noreply@so...>  20080312 21:06:39

Bugs item #1913067, was opened at 20080312 21:06 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080312 21:07:11

Bugs item #1913067, was opened at 20080312 21:06 Message generated for change (Settings changed) made by infinity0x You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080312 22:16:25

Bugs item #1913067, was opened at 20080312 17:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  >Comment By: Raymond Toy (rtoy) Date: 20080312 18:16 Message: Logged In: YES user_id=28849 Originator: NO Maxima can't give an answer because it doesn't know the roots of (x^7+1)/(x+1). If you set integrate_use_rootsof:true, then maxima can return an answer, but unless you can compute the roots of the above equation, it's probably not very helpful.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080312 22:32:46

Bugs item #1913067, was opened at 20080312 21:06 Message generated for change (Comment added) made by infinity0x You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  >Comment By: Ximin Luo (infinity0x) Date: 20080312 22:32 Message: Logged In: YES user_id=2003896 Originator: YES The point is that Maxima does not NEED to know the roots of that equation. Sorry for making this unclear. By doing the integral using a different algorithm which doesn't involve taking partial fractions, you can avoid the above, and get a purely symbolic integral, like Mathematic does.  Comment By: Raymond Toy (rtoy) Date: 20080312 22:16 Message: Logged In: YES user_id=28849 Originator: NO Maxima can't give an answer because it doesn't know the roots of (x^7+1)/(x+1). If you set integrate_use_rootsof:true, then maxima can return an answer, but unless you can compute the roots of the above equation, it's probably not very helpful.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080313 00:30:31

Bugs item #1913067, was opened at 20080312 17:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  >Comment By: Raymond Toy (rtoy) Date: 20080312 20:30 Message: Logged In: YES user_id=28849 Originator: NO Actually, the roots are obviously the seven roots of 1, which maxima does know, and it could have done the partial fraction expansion to find the value of the integral. Not sure how or where to teach maxima about this, though. Some thought needed.  Comment By: Ximin Luo (infinity0x) Date: 20080312 18:32 Message: Logged In: YES user_id=2003896 Originator: YES The point is that Maxima does not NEED to know the roots of that equation. Sorry for making this unclear. By doing the integral using a different algorithm which doesn't involve taking partial fractions, you can avoid the above, and get a purely symbolic integral, like Mathematic does.  Comment By: Raymond Toy (rtoy) Date: 20080312 18:16 Message: Logged In: YES user_id=28849 Originator: NO Maxima can't give an answer because it doesn't know the roots of (x^7+1)/(x+1). If you set integrate_use_rootsof:true, then maxima can return an answer, but unless you can compute the roots of the above equation, it's probably not very helpful.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080317 13:37:41

Bugs item #1913067, was opened at 20080312 17:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  >Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080312 20:30 Message: Logged In: YES user_id=28849 Originator: NO Actually, the roots are obviously the seven roots of 1, which maxima does know, and it could have done the partial fraction expansion to find the value of the integral. Not sure how or where to teach maxima about this, though. Some thought needed.  Comment By: Ximin Luo (infinity0x) Date: 20080312 18:32 Message: Logged In: YES user_id=2003896 Originator: YES The point is that Maxima does not NEED to know the roots of that equation. Sorry for making this unclear. By doing the integral using a different algorithm which doesn't involve taking partial fractions, you can avoid the above, and get a purely symbolic integral, like Mathematic does.  Comment By: Raymond Toy (rtoy) Date: 20080312 18:16 Message: Logged In: YES user_id=28849 Originator: NO Maxima can't give an answer because it doesn't know the roots of (x^7+1)/(x+1). If you set integrate_use_rootsof:true, then maxima can return an answer, but unless you can compute the roots of the above equation, it's probably not very helpful.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080317 13:37:54

Bugs item #1913067, was opened at 20080312 17:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  >Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080312 20:30 Message: Logged In: YES user_id=28849 Originator: NO Actually, the roots are obviously the seven roots of 1, which maxima does know, and it could have done the partial fraction expansion to find the value of the integral. Not sure how or where to teach maxima about this, though. Some thought needed.  Comment By: Ximin Luo (infinity0x) Date: 20080312 18:32 Message: Logged In: YES user_id=2003896 Originator: YES The point is that Maxima does not NEED to know the roots of that equation. Sorry for making this unclear. By doing the integral using a different algorithm which doesn't involve taking partial fractions, you can avoid the above, and get a purely symbolic integral, like Mathematic does.  Comment By: Raymond Toy (rtoy) Date: 20080312 18:16 Message: Logged In: YES user_id=28849 Originator: NO Maxima can't give an answer because it doesn't know the roots of (x^7+1)/(x+1). If you set integrate_use_rootsof:true, then maxima can return an answer, but unless you can compute the roots of the above equation, it's probably not very helpful.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080317 13:37:58

Bugs item #1913067, was opened at 20080312 17:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  >Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080312 20:30 Message: Logged In: YES user_id=28849 Originator: NO Actually, the roots are obviously the seven roots of 1, which maxima does know, and it could have done the partial fraction expansion to find the value of the integral. Not sure how or where to teach maxima about this, though. Some thought needed.  Comment By: Ximin Luo (infinity0x) Date: 20080312 18:32 Message: Logged In: YES user_id=2003896 Originator: YES The point is that Maxima does not NEED to know the roots of that equation. Sorry for making this unclear. By doing the integral using a different algorithm which doesn't involve taking partial fractions, you can avoid the above, and get a purely symbolic integral, like Mathematic does.  Comment By: Raymond Toy (rtoy) Date: 20080312 18:16 Message: Logged In: YES user_id=28849 Originator: NO Maxima can't give an answer because it doesn't know the roots of (x^7+1)/(x+1). If you set integrate_use_rootsof:true, then maxima can return an answer, but unless you can compute the roots of the above equation, it's probably not very helpful.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080317 14:27:20

Bugs item #1913067, was opened at 20080312 21:06 Message generated for change (Comment added) made by infinity0x You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  >Comment By: Ximin Luo (infinity0x) Date: 20080317 14:27 Message: Logged In: YES user_id=2003896 Originator: YES i don't know how to integrate these without knowing the roots of the equation; i thought mathematica was, because it could integrate 1/(1+x^n) without being able to integrate (that nasty rational function). (and i thought algorithms do to this would be available somewhere else.) also, i assumed maxima was already factorising the equation for arbitrarily large values of n. but your approach seems feasible. what do you mean by handcomputed though? as in, numerically instead of algebraically? wouldn't that give imprecise answers?  Comment By: Raymond Toy (rtoy) Date: 20080317 13:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 13:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 13:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080313 00:30 Message: Logged In: YES user_id=28849 Originator: NO Actually, the roots are obviously the seven roots of 1, which maxima does know, and it could have done the partial fraction expansion to find the value of the integral. Not sure how or where to teach maxima about this, though. Some thought needed.  Comment By: Ximin Luo (infinity0x) Date: 20080312 22:32 Message: Logged In: YES user_id=2003896 Originator: YES The point is that Maxima does not NEED to know the roots of that equation. Sorry for making this unclear. By doing the integral using a different algorithm which doesn't involve taking partial fractions, you can avoid the above, and get a purely symbolic integral, like Mathematic does.  Comment By: Raymond Toy (rtoy) Date: 20080312 22:16 Message: Logged In: YES user_id=28849 Originator: NO Maxima can't give an answer because it doesn't know the roots of (x^7+1)/(x+1). If you set integrate_use_rootsof:true, then maxima can return an answer, but unless you can compute the roots of the above equation, it's probably not very helpful.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080317 15:19:36

Bugs item #1913067, was opened at 20080312 17:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  >Comment By: Raymond Toy (rtoy) Date: 20080317 11:19 Message: Logged In: YES user_id=28849 Originator: NO By handcomputed, I mean someone wrote out the expansion of x^6+1 as (x^2+1)*(x^2+sqrt(3)*x+1)*(x^2sqrt(3)*x+1). I'm not sure maxima can figure that out itself. For the general case x^n+c, we would need to write that as a product of quadratics (and maybe a linear term). Easy to do since we know the roots are, more or less, the n roots of unity. I think the results will be pretty ugly for n >= 7.  Comment By: Ximin Luo (infinity0x) Date: 20080317 10:27 Message: Logged In: YES user_id=2003896 Originator: YES i don't know how to integrate these without knowing the roots of the equation; i thought mathematica was, because it could integrate 1/(1+x^n) without being able to integrate (that nasty rational function). (and i thought algorithms do to this would be available somewhere else.) also, i assumed maxima was already factorising the equation for arbitrarily large values of n. but your approach seems feasible. what do you mean by handcomputed though? as in, numerically instead of algebraically? wouldn't that give imprecise answers?  Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080312 20:30 Message: Logged In: YES user_id=28849 Originator: NO Actually, the roots are obviously the seven roots of 1, which maxima does know, and it could have done the partial fraction expansion to find the value of the integral. Not sure how or where to teach maxima about this, though. Some thought needed.  Comment By: Ximin Luo (infinity0x) Date: 20080312 18:32 Message: Logged In: YES user_id=2003896 Originator: YES The point is that Maxima does not NEED to know the roots of that equation. Sorry for making this unclear. By doing the integral using a different algorithm which doesn't involve taking partial fractions, you can avoid the above, and get a purely symbolic integral, like Mathematic does.  Comment By: Raymond Toy (rtoy) Date: 20080312 18:16 Message: Logged In: YES user_id=28849 Originator: NO Maxima can't give an answer because it doesn't know the roots of (x^7+1)/(x+1). If you set integrate_use_rootsof:true, then maxima can return an answer, but unless you can compute the roots of the above equation, it's probably not very helpful.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080317 15:19:59

Bugs item #1913067, was opened at 20080312 17:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  >Comment By: Raymond Toy (rtoy) Date: 20080317 11:19 Message: Logged In: YES user_id=28849 Originator: NO By handcomputed, I mean someone wrote out the expansion of x^6+1 as (x^2+1)*(x^2+sqrt(3)*x+1)*(x^2sqrt(3)*x+1). I'm not sure maxima can figure that out itself. For the general case x^n+c, we would need to write that as a product of quadratics (and maybe a linear term). Easy to do since we know the roots are, more or less, the n roots of unity. I think the results will be pretty ugly for n >= 7.  Comment By: Raymond Toy (rtoy) Date: 20080317 11:19 Message: Logged In: YES user_id=28849 Originator: NO By handcomputed, I mean someone wrote out the expansion of x^6+1 as (x^2+1)*(x^2+sqrt(3)*x+1)*(x^2sqrt(3)*x+1). I'm not sure maxima can figure that out itself. For the general case x^n+c, we would need to write that as a product of quadratics (and maybe a linear term). Easy to do since we know the roots are, more or less, the n roots of unity. I think the results will be pretty ugly for n >= 7.  Comment By: Ximin Luo (infinity0x) Date: 20080317 10:27 Message: Logged In: YES user_id=2003896 Originator: YES i don't know how to integrate these without knowing the roots of the equation; i thought mathematica was, because it could integrate 1/(1+x^n) without being able to integrate (that nasty rational function). (and i thought algorithms do to this would be available somewhere else.) also, i assumed maxima was already factorising the equation for arbitrarily large values of n. but your approach seems feasible. what do you mean by handcomputed though? as in, numerically instead of algebraically? wouldn't that give imprecise answers?  Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 09:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080312 20:30 Message: Logged In: YES user_id=28849 Originator: NO Actually, the roots are obviously the seven roots of 1, which maxima does know, and it could have done the partial fraction expansion to find the value of the integral. Not sure how or where to teach maxima about this, though. Some thought needed.  Comment By: Ximin Luo (infinity0x) Date: 20080312 18:32 Message: Logged In: YES user_id=2003896 Originator: YES The point is that Maxima does not NEED to know the roots of that equation. Sorry for making this unclear. By doing the integral using a different algorithm which doesn't involve taking partial fractions, you can avoid the above, and get a purely symbolic integral, like Mathematic does.  Comment By: Raymond Toy (rtoy) Date: 20080312 18:16 Message: Logged In: YES user_id=28849 Originator: NO Maxima can't give an answer because it doesn't know the roots of (x^7+1)/(x+1). If you set integrate_use_rootsof:true, then maxima can return an answer, but unless you can compute the roots of the above equation, it's probably not very helpful.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 
From: SourceForge.net <noreply@so...>  20080602 04:46:58

Bugs item #1913067, was opened at 20080312 22:06 Message generated for change (Comment added) made by robertmarik You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ximin Luo (infinity0x) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot integrate 1/(1+x^n) Initial Comment: 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^52*x^4+3*x^34*x^2+5*x6)/(x^6x^5+x^4x^3+x^2x+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.  Comment By: Robert Marik (robertmarik) Date: 20080602 06:46 Message: 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?  Comment By: Raymond Toy (rtoy) Date: 20080317 16:19 Message: Logged In: YES user_id=28849 Originator: NO By handcomputed, I mean someone wrote out the expansion of x^6+1 as (x^2+1)*(x^2+sqrt(3)*x+1)*(x^2sqrt(3)*x+1). I'm not sure maxima can figure that out itself. For the general case x^n+c, we would need to write that as a product of quadratics (and maybe a linear term). Easy to do since we know the roots are, more or less, the n roots of unity. I think the results will be pretty ugly for n >= 7.  Comment By: Raymond Toy (rtoy) Date: 20080317 16:19 Message: Logged In: YES user_id=28849 Originator: NO By handcomputed, I mean someone wrote out the expansion of x^6+1 as (x^2+1)*(x^2+sqrt(3)*x+1)*(x^2sqrt(3)*x+1). I'm not sure maxima can figure that out itself. For the general case x^n+c, we would need to write that as a product of quadratics (and maybe a linear term). Easy to do since we know the roots are, more or less, the n roots of unity. I think the results will be pretty ugly for n >= 7.  Comment By: Ximin Luo (infinity0x) Date: 20080317 15:27 Message: Logged In: YES user_id=2003896 Originator: YES i don't know how to integrate these without knowing the roots of the equation; i thought mathematica was, because it could integrate 1/(1+x^n) without being able to integrate (that nasty rational function). (and i thought algorithms do to this would be available somewhere else.) also, i assumed maxima was already factorising the equation for arbitrarily large values of n. but your approach seems feasible. what do you mean by handcomputed though? as in, numerically instead of algebraically? wouldn't that give imprecise answers?  Comment By: Raymond Toy (rtoy) Date: 20080317 14:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 14:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080317 14:37 Message: Logged In: YES user_id=28849 Originator: NO If you can, please describe how to integrate these without knowing the roots of the equation. FWIW, maxima has a special function to integrate functions of the form f(x)/(a*x^n+b). (See enprog and eprog in sinint.lisp.) It only handles the cases of n = 4, 5, 6. And it does this by essentially doing a partial fraction expansion with handcomputed quadratic factors. It seems feasible to extend this to any n.  Comment By: Raymond Toy (rtoy) Date: 20080313 01:30 Message: Logged In: YES user_id=28849 Originator: NO Actually, the roots are obviously the seven roots of 1, which maxima does know, and it could have done the partial fraction expansion to find the value of the integral. Not sure how or where to teach maxima about this, though. Some thought needed.  Comment By: Ximin Luo (infinity0x) Date: 20080312 23:32 Message: Logged In: YES user_id=2003896 Originator: YES The point is that Maxima does not NEED to know the roots of that equation. Sorry for making this unclear. By doing the integral using a different algorithm which doesn't involve taking partial fractions, you can avoid the above, and get a purely symbolic integral, like Mathematic does.  Comment By: Raymond Toy (rtoy) Date: 20080312 23:16 Message: Logged In: YES user_id=28849 Originator: NO Maxima can't give an answer because it doesn't know the roots of (x^7+1)/(x+1). If you set integrate_use_rootsof:true, then maxima can return an answer, but unless you can compute the roots of the above equation, it's probably not very helpful.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1913067&group_id=4933 