Timeline for Changing the integration limits takes a long time to evaluate
Current License: CC BY-SA 4.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 29, 2020 at 15:01 | vote | accept | CasperYC | ||
May 29, 2020 at 13:53 | history | edited | J. M.'s missing motivation♦ | CC BY-SA 4.0 |
edited title
|
May 28, 2020 at 16:24 | comment | added | J. M.'s missing motivation♦ | @QuantumDot, will edit later; just leaving it up for a while for fun ;) | |
May 28, 2020 at 16:21 | comment | added | QuantumDot | @J.M.'stechnicaldifficulties lol your edit comment "so many o's you forgot the n". But for the sake of future search, shouldn't it be edited to just "long"? | |
May 28, 2020 at 14:04 | history | edited | J. M.'s missing motivation♦ | CC BY-SA 4.0 |
so many o's, you forgot the n.
|
May 28, 2020 at 13:49 | answer | added | yarchik | timeline score: 5 | |
Jan 31, 2020 at 0:27 | comment | added | Michael E2 |
This one, which differs by the fast one by a scalar multiple, is nearly as slow as the OP's slow one: Integrate[-2 x*Sin[x]/(1 + Cos[x]^2), {x, 0, Pi}]
|
|
Jan 30, 2020 at 1:05 | comment | added | Michael E2 |
Integrate[x*Sin[x]/(1 + Cos[x]^2), {x, Pi, 2 Pi}] is slow, too. So my 1-1 comment is probably not relevant. Integrate[x*Sin[x]/(1 + Cos[x]^2), {x, -Pi, 0}] is fast, and the integral over {x, -Pi/2, Pi/2} is medium-slow, about half the time as over {x, Pi, 2 Pi} . I'm thinking at this point it's not worth going much deeper into why....
|
|
Jan 29, 2020 at 15:00 | history | tweeted | twitter.com/StackMma/status/1222535005106245632 | ||
Jan 29, 2020 at 14:29 | comment | added | Michael E2 | I suspect branch cut checking has gotten more extensive and careful over time. | |
Jan 29, 2020 at 14:27 | comment | added | Bob Hanlon | With v12 on my Mac, the second integral took 68 times as long. | |
Jan 29, 2020 at 14:20 | history | edited | J. M.'s missing motivation♦ | CC BY-SA 4.0 |
deleted 15 characters in body
|
Jan 29, 2020 at 14:17 | comment | added | Michael E2 |
@J.M. In the first case Integrate uses by-parts to get an integral in terms of ArcTan[Cos[x]] , which is 1-1 over {x, 0, Pi} but not over {x, 0, 2 Pi} . I can't tell if that's the reason or not that a different approach is used. Nonetheless more extensive checking is done in the second case.
|
|
Jan 29, 2020 at 13:52 | comment | added | J. M.'s missing motivation♦ | On the computer I am borrowing, versions 8, 10, and 11 are able to evaluate both integrals, but the second takes about five times as long as the first in version 8, about eight times as long in version 10, and about 35 times as long in version 11. Make of it what you will. (Additionally, only version 10 produced the simple answer.) | |
Jan 29, 2020 at 13:34 | comment | added | Michael E2 |
Some folks here prefer the quoted environment (> output ) for output. (I don't because it doesn't format properly is less readable.) Others prefer quoted-code (> `output` ), which is how I altered it, because it formats correctly; some dislike the two-tone formatting. (I prefer commented code, (* output *) , because I can copy the input and output, and switch to M to run it without editing, and I have the output to compare with there in M. But some seem to prefer the look of the other styles over the functionality of this one.) To each their own.
|
|
Jan 29, 2020 at 13:25 | history | edited | Michael E2 | CC BY-SA 4.0 |
Improved formatting
|
Jan 29, 2020 at 13:09 | history | edited | J. M.'s missing motivation♦ |
edited tags
|
|
Jan 29, 2020 at 13:04 | history | asked | CasperYC | CC BY-SA 4.0 |