Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions BREAKING-CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ as `a - b = 0`, as a statement's own solve reads it: `"x + 1 = 3".Solve("x")` wa
- **Exact forms.** A whole `a >= 1` and `a = 1/2` are elementary.
- **Integrals.** Of a linear `u`, beside a polynomial, or beside any power of `x` but `1/x` where `u` is a multiple
of `x`, by parts, in gamma functions of `u`.
And of a whole `a <= 0` over a power of another linear, by parts, where what is left is an exponential over
linears.
([#2075](https://github.com/asc-community/AngouriMath/issues/2075))

| Input | Was (2.6.0) | Now |
Expand All @@ -153,6 +155,7 @@ as `a - b = 0`, as a statement's own solve reads it: `"x + 1 = 3".Solve("x")` wa
| `"gamma(1/3, -2)".EvalNumerical()` | a `FunctionArgumentCountException` | `10.212552064243320672…`, real |
| `"x^2*gamma(0, a*x)".ToEntity().Integrate("x")` | a `FunctionArgumentCountException` | `x ^ 3 / 3 * gamma(0, a * x) - 1 / (3 * a ^ 3) * 2 * e ^ (-a * x) * (1 + a * x + (a * x) ^ 2 / 2) + C` |
| `"x^m*gamma(n, b*x)".ToEntity().Integrate("x")` | a `FunctionArgumentCountException` | `(x ^ (m + 1) * gamma(n, b * x) - x ^ m * (b * x) ^ (-m) * gamma(n + m + 1, b * x) / b) / (m + 1) + C` |
| `"gamma(0, a + b*x)/(c + d*x)^2".ToEntity().Integrate("x")` | a `FunctionArgumentCountException` | `-gamma(0, a + b x)/(d (c + d x))` and two exponential integrals, of `a + b x` and of `b (c + d x)/d` |

### Numerical equality is to half the evaluation's digits

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5039,6 +5039,11 @@ Logf or Entity.Arcsinf or Entity.Arccosf
or Entity.Arctanf or Entity.Arccotanf
or Entity.Arcsecantf or Entity.Arccosecantf => true,
_ when IsASpecialFunction(factor) => true,
// And the upper incomplete gamma function, whose derivative -u^(n - 1) e^(-u) u' leaves
// an exponential beside what was integrated: against 1/(c + d x)^2, a rational function
// of x times e^(-a - b x) for a whole n <= 0, which partial fractions and the exponential
// integral answer. https://github.com/asc-community/AngouriMath/issues/2075
Entity.IncompleteGammaf => true,
// And a whole power of one, which is the same function for this purpose:
// differentiating ln(x)^2 gives 2ln(x)/x, whose x cancels against the integrated
// polynomial exactly as ln(x)'s does, leaving x*ln(x) -- one step simpler, and
Expand Down
12 changes: 12 additions & 0 deletions Sources/Tests/UnitTests/Calculus/IncompleteGammaIntegrationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ private static readonly (string Name, string Value)[] Pins =
[InlineData("x*(x + 1)*gamma(n, a + b*x)")]
public void BesideAPolynomialWithAnOffset(string integrand) => DifferentiatesBack(integrand, Positive);

/// <summary>
/// Of a whole order <c>n &lt;= 0</c> over a power of another linear, by parts with the function differentiated: the
/// remainder is <c>(a + b x)^(n - 1) e^(-a - b x)</c> over a power of <c>c + d x</c>, a rational function times an
/// exponential, which partial fractions and the exponential integral answer. Rubi's 8.6.
/// </summary>
[Theory]
[InlineData("gamma(0, a + b*x)/(c + d*x)^2")]
[InlineData("gamma(0, a + b*x)/(c + d*x)^4")]
[InlineData("gamma(-1, a + b*x)/(c + d*x)^3")]
[InlineData("gamma(-3, a + b*x)/(c + d*x)^2")]
public void AWholeOrderOverAPowerOfAnotherLinear(string integrand) => DifferentiatesBack(integrand, Positive);

/// <summary>
/// As the function it is, rather than expanded: <c>Gamma(100, a x)</c> is a polynomial of degree 99 times
/// <c>e^(-a x)</c>, and a hundred rounds of parts.
Expand Down
Loading