You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b13dbf4
Browse filesBrowse the repository at this point in the historyBrowse files
An exponential times a trigonometric at the same frequency no longer divides by zero, and a phase is expanded (#1472)
`x e^(-i x) cos(x)` was answered NaN at every point of its domain. The
closed form `int e^(ax)(c cos(bx) + d sin(bx))` divides by `a^2 + b^2`,
and both places that use it guard the resonance `a = ±i b` -- where the
product is a sum of two exponentials -- by asking whether `a^2 + b^2`
*evaluates* to a number. With a symbolic frequency it does not:
`(-i f)^2 + f^2` is `-f^2 + f^2`, which `InnerSimplified` does not
collect. The guard passed, the formula divided by a zero it could not
see, and the answer was NaN -- a wrong answer, not a decline. Both now
test the resonance symbolically.
On that footing, two capabilities. A phase in the trigonometric's
argument is expanded by the angle-sum identity where an exponential
stands beside it, since the closed rule reads one frequency and no
phase -- an exponential's own offset is a constant factor, a
trigonometric's is not. And `A + i A tan(z)` below the bar is written as
`A e^(i z)/cos(z)`, `A + i A cot(z)` as `i A e^(-i z)/sin(z)`, exactly,
since `cos z + i sin z` is `e^(i z)`: beside a polynomial that is the
shape the closed rule answers, where the imaginary unit in the
coefficient is read by nothing else. Below the bar only -- above it the
tangent's own rules answer in the tangent and more shortly, and the
rewrite made one such row two and a half times slower before it was
restricted.
Family 4 of the Rubi suite: 284 -> 286 of 422, 0 wrong, and eight rows
that produced nothing now produce answers; family 6 377/417 and the
1774-problem suite 1707 unchanged. Suite 12641 passed; allocation gate
passed on all 19 gated benchmarks. Every new row verified as a complex
function, the answer's derivative against the integrand at five points.
Part of #718.
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: BREAKING-CHANGES.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1131,6 +1131,33 @@ quotients that nothing below reads. Rubi's 6.3.2 and 6.5.3
1131
1131
|`"sech(a+2*ln(c/x^(1/2)))^3".Integrate("x")`| left unevaluated | the antiderivative |
1132
1132
|`"x*tanh(a+2*ln(x))^2".Integrate("x")`| left unevaluated | the antiderivative |
1133
1133
1134
+
### An exponential times a trigonometric at the same frequency no longer divides by zero, and a phase is expanded
1135
+
1136
+
`x e^(-i x) cos(x)` was answered `NaN` at every point of its domain. The closed form
1137
+
`int e^(a x)(c cos(b x) + d sin(b x)) = e^(a x)(...)/(a^2 + b^2)` is guarded against the resonance
1138
+
`a = ±i b`, where the product is a sum of two exponentials and the formula divides by zero -- but
1139
+
the guard tested whether `a^2 + b^2`*evaluates* to a number, and with a symbolic frequency
1140
+
`(-i f)^2 + f^2` is `-f^2 + f^2`, which `InnerSimplified` does not collect. So the guard passed,
1141
+
the formula divided by a zero it could not see, and the answer was `NaN`: a wrong answer, not a
1142
+
decline. Both places that test it -- the table pattern and the polynomial route -- see the
1143
+
resonance symbolically now.
1144
+
1145
+
With that fixed, two capabilities: a **phase** in the trigonometric's argument is expanded by the
1146
+
angle-sum identity where an exponential stands beside it (`cos(f x + p)` is
1147
+
`cos(p) cos(f x) - sin(p) sin(f x)`; the rule reads one frequency and no phase, an exponential's
1148
+
own offset being a constant factor where a trigonometric's is not), and **`A + i A tan(z)` below
1149
+
the bar** is written as `A e^(i z)/cos(z)`, with `A + i A cot(z)` as `i A e^(-i z)/sin(z)` --
1150
+
exactly, since `cos z + i sin z` is `e^(i z)`. Beside a polynomial that is the shape the closed
1151
+
rule answers, where the imaginary unit in the coefficient is read by nothing else. Rubi's 4.3.10,
1152
+
4.4.1 and 4.4.10 ([#718](https://github.com/asc-community/AngouriMath/issues/718)).
1153
+
1154
+
| Input | Was (2.5.0) | Now |
1155
+
|---|---|---|
1156
+
|`"x*e^(-i*x)*cos(x)".Integrate("x")`| left unevaluated |`x^2/4 + e^(-2 i x)(1 + 2 i x)/8` up to the form -- where `master` between the releases answered `NaN`|
1157
+
|`"x*e^(2*x)*cos(3*x+1)".Integrate("x")`| left unevaluated | the antiderivative |
1158
+
|`"x/(2+2*i*tan(x))".Integrate("x")`| left unevaluated | the antiderivative |
1159
+
|`"(c+d*x)/(a+i*a*tan(pe+f*x))".Integrate("x")`| left unevaluated | the antiderivative |
1160
+
1134
1161
### `binomial(n, k)` is a function
1135
1162
1136
1163
**Addition, not silent.** The binomial coefficient is a node, `Entity.Binomialf`, spelled
0 commit comments