Skip to content

Commit 5624049

Browse files
Exponentials of quadratics beside sines, cosines and hyperbolic functions of quadratics are integrated onto the Gaussian (#1521)
A product of exponentials of polynomials of degree at most two, whole powers of sines and cosines of such polynomials, whole powers of sums of those exponentials (the hyperbolic functions) and a polynomial, where some exponent is a quadratic: with each sine or cosine written as exponentials of i times its argument and the product multiplied out, every term is k P(x) e^(Q(x)) with Q of degree at most two, the Gaussian's moments where Q is a quadratic and elementary where it is not. A term's exponent is kept as whole multiples of the exponents the integrand writes, so that e^(i q) e^(-i q) is decidably e^0. Rubi's 4.7.6, 6.1.5 and 6.2.5, 6.1.4's x^2 sinh(a + b x + c x^2)^2, and 2.3's f^(q1) g^(q2). Part of #1501. Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 12ee980 commit 5624049

6 files changed

Lines changed: 514 additions & 0 deletions

File tree

‎BREAKING-CHANGES.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,6 +1725,26 @@ the exponential integral, as `x e^(-1/x^2)` does, is still left unintegrated
17251725
| `"f^(a + b/(c + d*x)^2)/(c + d*x)^4".Integrate("x")` | `integral(f ^ (a + b / (c + d * x) ^ 2) / (c + d * x) ^ 4, x)` | the antiderivative |
17261726
| `"sinh(a + b/x^2)".Integrate("x")` | `integral((e ^ (a + b / x ^ 2) - e ^ (-(a + b / x ^ 2))) / 2, x)` | the antiderivative |
17271727

1728+
### Exponentials of quadratics beside sines, cosines and hyperbolic functions of quadratics are integrated
1729+
1730+
`e^(x^2) sin(x)` was left unintegrated. A product of exponentials of polynomials of degree at most
1731+
two, whole powers of sines, cosines and hyperbolic functions of such polynomials, and a polynomial
1732+
is now integrated wherever some exponent is a quadratic. Each sine or cosine is written as
1733+
exponentials of `i` times its argument, and every term of the product multiplied out is the
1734+
Gaussian's. So the answer for a real integrand with a sine or cosine in it is written with the
1735+
imaginary unit, as Rubi's is: `e^(x^2) sin(x)` integrates to
1736+
`-i/2 e^(1/4) sqrt(pi)/2 erfi(x + i/2) + i/2 e^(1/4) sqrt(pi)/2 erfi(x - i/2)`. A sine or cosine of a
1737+
quadratic alone, or beside a polynomial only, is left to the rules that answered it before
1738+
([#1501](https://github.com/asc-community/AngouriMath/issues/1501)).
1739+
1740+
| Input | Was (2.5.0) | Now |
1741+
|---|---|---|
1742+
| `"e^(x^2)*sin(x)".Integrate("x")` | `integral(e ^ x ^ 2 * sin(x), x)` | the antiderivative, with `erfi` |
1743+
| `"f^(a + b*x + c*x^2)*cos(d + p*x + q*x^2)".Integrate("x")` | `integral(f ^ (a + b * x + c * x ^ 2) * cos(d + p * x + q * x ^ 2), x)` | the antiderivative, with `erf` |
1744+
| `"f^(a + c*x^2)*cosh(d + p*x)^2".Integrate("x")` | `integral(f ^ (a + c * x ^ 2) * ((e ^ (d + p * x) + e ^ (-(d + p * x))) / 2) ^ 2, x)` | the antiderivative |
1745+
| `"x^2*sinh(a + b*x + c*x^2)^2".Integrate("x")` | `integral(x ^ 2 * ((e ^ (a + b * x + c * x ^ 2) - e ^ (-(a + b * x + c * x ^ 2))) / 2) ^ 2, x)` | the antiderivative |
1746+
| `"2^(x^2)*3^(x + 1)".Integrate("x")` | `integral(2 ^ x ^ 2 * 3 ^ (x + 1), x)` | the antiderivative, with `erfi` |
1747+
17281748
### `binomial(n, k)` is a function
17291749

17301750
**Addition, not silent.** The binomial coefficient is a node, `Entity.Binomialf`, spelled

‎Sources/.editorconfig‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,3 +639,6 @@ file_header_template=\nCopyright (c) 2019-2026 Angouri.\nAngouriMath is licensed
639639

640640
[Tests/UnitTests/Calculus/HalfOddPowerOfALogarithmTest.cs]
641641
file_header_template=\nCopyright (c) 2019-2026 Angouri.\nAngouriMath is licensed under MIT.\nDetails: https://github.com/asc-community/AngouriMath/blob/master/LICENSE.md.\nWebsite: https://am.angouri.org.\n
642+
643+
[Tests/UnitTests/Calculus/ExponentialsOfQuadraticsTest.cs]
644+
file_header_template=\nCopyright (c) 2019-2026 Angouri.\nAngouriMath is licensed under MIT.\nDetails: https://github.com/asc-community/AngouriMath/blob/master/LICENSE.md.\nWebsite: https://am.angouri.org.\n

0 commit comments

Comments
 (0)