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 1566841
Browse filesBrowse the repository at this point in the historyBrowse files
Read half-odd powers of a hyperbolic sine beside an exponential as a derivative (#2054)
Rubi's 6.7.1 e^(a + b x) sinh(c + d x)^(3/2) - 3/4 e^(a + b x) d^2/
((b^2 - 9/4 d^2) sqrt(sinh(c + d x))) was declined: each term alone is not
elementary, and the sum is the derivative of
e^(a + b x) (4 b sinh^(3/2) - 6 d cosh sinh^(1/2))/(4 b^2 - 9 d^2). With
E = e^(a + b x), S = sinh(u), C = cosh(u), u = c + d x,
(E S^p C^q)' = E (b S^p C^q + d p S^(p - 1) C^(q + 1) + d q S^(p + 1) C^(q - 1))
with C^2 = 1 + S^2, so the answer is a sum of E S^p C^q over the integrand's
monomials and the partners their derivative reaches, and its coefficients
are a linear system: square, one row per monomial of the ansatz, with each
compound coefficient of the integrand named while it is solved, since the
elimination with symbols declined a row reducing to a zero it could not
decide. Powers of one sine multiply on every branch, and no power of a power
is taken. Last in the dispatch; checked by its derivative.
Part of #233.
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
var into = new Dictionary<(ERational, int), Entity>();
30048
+
Add(into, m.P, m.Q, b);
30049
+
if (!m.P.IsZero)
30050
+
Add(into, m.P.Subtract(ERational.One), m.Q + 1, d * Number.Rational.Create(m.P));
30051
+
if (m.Q > 0)
30052
+
Add(into, m.P.Add(ERational.One), m.Q - 1, d * m.Q);
30053
+
return into;
30054
+
}).ToList();
30055
+
// Square, one row for each monomial of the ansatz, which holds every one of the integrand's: the
30056
+
// rows past it, the lowest power the derivative reaches, are zero for a solution, which an
30057
+
// elimination with symbols does not decide; the derivative is checked at the end instead.
30058
+
var keys = basis.Select(m => (m.P, m.Q)).ToList();
30059
+
var matrix = keys.Select(key => derivatives.Select(map => map.TryGetValue(key, out var v) ? v.InnerSimplified : Number.Integer.Zero).ToArray()).ToArray();
30060
+
// Each compound coefficient of the integrand a name while the system is solved: the elimination
30061
+
// with symbols reduces a row to `0 = c` with c zero only as a value, `-3/4 d^2/(b^2 - 9/4 d^2)`
30062
+
// less `d/2` times the second unknown, and declines.
30063
+
var named = new List<(Variable Name, Entity Value)>();
30064
+
Entity Named(Entity value)
30065
+
{
30066
+
if (value is Number or Variable)
30067
+
return value;
30068
+
var name = Variable.CreateUnique(expr + named.Aggregate((Entity)Number.Integer.Zero, (all, pair) => all + pair.Name), "k_es");
30069
+
named.Add((name, value));
30070
+
return name;
30071
+
}
30072
+
var rhs = keys.Select(key => target.TryGetValue(key, out var v) ? Named(v.InnerSimplified) : Number.Integer.Zero).ToArray();
30073
+
if (!Functions.PartialFractions.TrySolveLinearWithSymbols(matrix, rhs, out var values))
30074
+
return null;
30075
+
var sine = (MathS.Pow(MathS.e, u) - MathS.Pow(MathS.e, -u)) / 2;
30076
+
var cosine = (MathS.Pow(MathS.e, u) + MathS.Pow(MathS.e, -u)) / 2;
30077
+
Entity sum = Number.Integer.Zero;
30078
+
for (var j = 0; j < basis.Count; j++)
30079
+
{
30080
+
var value = Functions.PartialFractions.InLowestTermsOverTheSymbols(named.Aggregate(values[j], (all, pair) => all.Substitute(pair.Name, pair.Value)));
0 commit comments