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 f77c4ad
Browse filesBrowse the repository at this point in the historyBrowse files
Integrate a function of an inverse function of a linear beside its powers under the linear (#1929)
* Integrate a function of an inverse of a linear beside its powers under the linear
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
* Record the inverse functions of a linear beside its powers in BREAKING-CHANGES
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
// The linear: the argument of an inverse function, with a constant term, as in `arsinh(c + d x)`,
26666
+
// which arrives as `ln(c + d x + sqrt((c + d x)^2 + 1))`.
26667
+
Entity? linear = null;
26668
+
foreach (var node in expr.Nodes)
26669
+
{
26670
+
Entity? argument = node switch
26671
+
{
26672
+
Arcsinf(var y) => y, Arccosf(var y) => y, Arctanf(var y) => y,
26673
+
_ => null
26674
+
};
26675
+
// The logarithm's argument without its root: `c + d x` of `ln(c + d x + sqrt((c + d x)^2 + 1))`.
26676
+
if (argument is null && node is Logf(var b0, var of) && b0 == MathS.e && of is Sumf)
26677
+
{
26678
+
var terms = Sumf.LinearChildren(of).ToList();
26679
+
var roots = terms.Where(term => term is Powf(_, Number.Rational { ERational.Denominator: var den }) && den.Equals(EInteger.FromInt32(2))).ToList();
26680
+
if (roots.Count == 1)
26681
+
argument = terms.Where(term => term != roots[0]).Aggregate((Entity)Number.Integer.Zero, (sum, term) => sum == Number.Integer.Zero ? term : sum + term);
26682
+
}
26683
+
if (argument is null || !argument.ContainsNode(x))
26684
+
continue;
26685
+
if (!TreeAnalyzer.TryGetPolyLinear(argument, x, out var slope0, out var intercept0)
0 commit comments