Repository navigation
Commit 3dc5ac6
Integrate a power beside an exponential of a power as an incomplete gamma function (#2083)
int x^m F^(a + b x^n) dx is -F^a x^(m + 1) z^(-s) gamma(s, z)/n with z = -b ln(F) x^n
and s = (m + 1)/n, and int (c + d x)^m F^(a + b x) dx the same with n = 1 under
t = c + d x: x^(m + 1) z^(-s) is constant between the cuts, and gamma(s, z)
differentiates to -z^(s - 1) e^(-z) z'. Only where s is neither whole nor half a
whole number, whose integrals are elementary, exponential integrals or error
functions and keep those answers, or where it is past 30, where parts would take s
steps: x^100 e^(-a x) is -a^(-101) gamma(101, a x). Where the constant factor is
one number on both half-lines it is written so, and the answer has a value at 0:
e^(x^3) is gamma(1/3, -x^3)/3.
Two costs this exposed, each fixed here. By parts integrated (a + b ln(c x^n))^p
into a gamma function of a logarithm and handed its remainder on, which nothing
integrates and the searches sampled thousands of times: three by-parts paths now
decline a gamma function of an argument that is not linear. And a definite
integral of an answer undefined at a bound, x^2 e^(x^4) from 0, took a limit
through l'Hopital's rule for over a minute; it is left as written there. gamma's
own limit is taken by continuity where its value is finite.
The order is read through Simplify where its symbols cancel: (-1 + n + 1)/n is 1,
and (p x)^(n - 1) e^(x^n) keeps its elementary answer.
Rubi's suite on the harness that reads GAMMA, against master e62a56d:
48,502 -> 48,634 of 49,052, 0 wrong, 0 rows lost, timeouts 5 -> 2; the gains are
68 in 2.3, 24 in 3.1.2, 12 in 8.6 and the logarithm files. Two rows' allocation grew
in the run and is identical alone on both builds.
Four tests that pinned a decline answer now, each checked by value.
Part of #2075; answers #180's item 22.
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent e62a56d commit 3dc5ac6
10 files changed
Lines changed: 439 additions & 15 deletions
File tree
- Sources
- AngouriMath/Functions/Continuous
- Integration
- Limits/Solvers
- Tests/UnitTests/Calculus
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| |||
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
159 | 167 | | |
160 | 168 | | |
161 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
263 | 266 | | |
264 | | - | |
| 267 | + | |
265 | 268 | | |
266 | 269 | | |
267 | 270 | | |
| |||
5166 | 5169 | | |
5167 | 5170 | | |
5168 | 5171 | | |
| 5172 | + | |
| 5173 | + | |
| 5174 | + | |
5169 | 5175 | | |
5170 | 5176 | | |
5171 | 5177 | | |
| |||
5194 | 5200 | | |
5195 | 5201 | | |
5196 | 5202 | | |
| 5203 | + | |
| 5204 | + | |
| 5205 | + | |
| 5206 | + | |
| 5207 | + | |
| 5208 | + | |
5197 | 5209 | | |
5198 | 5210 | | |
5199 | 5211 | | |
| |||
50047 | 50059 | | |
50048 | 50060 | | |
50049 | 50061 | | |
| 50062 | + | |
| 50063 | + | |
| 50064 | + | |
| 50065 | + | |
| 50066 | + | |
| 50067 | + | |
| 50068 | + | |
| 50069 | + | |
| 50070 | + | |
| 50071 | + | |
| 50072 | + | |
| 50073 | + | |
| 50074 | + | |
| 50075 | + | |
| 50076 | + | |
| 50077 | + | |
| 50078 | + | |
50050 | 50079 | | |
50051 | 50080 | | |
50052 | 50081 | | |
| |||
0 commit comments