Skip to content

FunctionExpand ​

Rewrite special functions in expr in terms of more elementary or better-known ones. Provided by @enumeratio/analytic.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageFunctionExpand!
FunctionExpand(expr)expr with a handful of named special-function identities applied.
Typed signatures
TypePackageApplies
(expression) -> expressionanalyticalways

Domain: Transformations

Details
  • Not a general special-function identity engine: DirichletEta and DirichletBeta rewrite in terms of the (Hurwitz) zeta this package already declares, BarnesG(½) in Glaisher's constant, and two special angles (Sin(π/15), Cos(π/24)) past compute-engine's automatic table -- each is a named identity, not a derivation.
  • The two special angles are pinned lookups at exactly those arguments, not a general nested-radical solver for an arbitrary rational multiple of π.
  • Pochhammer(x, 3) and Binomial(n, 2) need no rule here: compute-engine's own evaluator already expands a concrete nonnegative integer length into the product before FunctionExpand runs.

Examples

1 more kept as data, checked against the oracles
Basic #

η(s)=(1−21−s)ζ(s)\eta(s) = (1 - 2^{1-s})\zeta(s)

live ↗
InFunctionExpand(DirichletEta(s))\mathrm{FunctionExpand}(\mathrm{DirichletEta}(s))Out(1−21−s)ζ(s)(1-2^{1-s})ζ(s)

β(s)=4−s(ζ(s,14)−ζ(s,34))\beta(s) = 4^{-s}(\zeta(s, \tfrac14) - \zeta(s, \tfrac34))

live ↗
InFunctionExpand(DirichletBeta(s))\mathrm{FunctionExpand}(\mathrm{DirichletBeta}(s))Outζ(s,14)−ζ(s,34)4s\frac{ζ(s, \frac{1}{4})-ζ(s, \frac{3}{4})}{4^{s}}

G(12)G(\tfrac12) in Glaisher's constant

live ↗
InFunctionExpand(BarnesG(12))\mathrm{FunctionExpand}(\mathrm{BarnesG}(\frac{1}{2}))Out224e8ConstGlaisher3π4\frac{\sqrt[24]{2}\sqrt[8]{e}}{\sqrt{\mathrm{ConstGlaisher}}^{3}\sqrt[4]{π}}

Radicals past the automatic special-angle table

live ↗
InFunctionExpand(sin⁡(π15))\mathrm{FunctionExpand}(\sin(\frac{π}{15}))Out18(−15+3+10+25)\frac{1}{8}(-\sqrt{15}+\sqrt{3}+\sqrt{10+2\sqrt{5}})

Half-angle radicals: cos⁡π24=122+2+62\cos\frac{\pi}{24} = \tfrac12\sqrt{2 + \tfrac{\sqrt2 + \sqrt6}{2}}

live ↗
InFunctionExpand(cos⁡(π24))\mathrm{FunctionExpand}(\cos(\frac{π}{24}))Out14(24+2+6)\frac{1}{4}(\sqrt{2}\sqrt{4+\sqrt{2}+\sqrt{6}})
Scope #

A rising factorial with an integer length becomes a polynomial

live ↗
InFunctionExpand(Pochhammer(x,3))\mathrm{FunctionExpand}(\mathrm{Pochhammer}(x, 3))Outx×(x+1)(x+2)x×(x+1)(x+2)

(n2)=n(n−1)2\binom n2 = \frac{n(n-1)}{2}

live ↗
InFunctionExpand((n2))\mathrm{FunctionExpand}(\binom{n}{2})Outn×(n−1)2\frac{n×(n-1)}{2}

Nothing to expand, the square root of a square stays

live ↗
InFunctionExpand(sin⁡(x2)x2)\mathrm{FunctionExpand}(\frac{\sin(\sqrt{x^2})}{\sqrt{x^2}})Outsin⁡(x2)x2\frac{\sin(\sqrt{x^2})}{\sqrt{x^2}}

The reflection factor is left as written, not expanded

live ↗
InFunctionExpand(ζ(1−z)ζ(z))\mathrm{FunctionExpand}(\frac{ζ(1-z)}{ζ(z)})Outζ(1−z)ζ(z)\frac{ζ(1-z)}{ζ(z)}
live ↗
InFunctionExpand([−x2,ln⁡(1−x2)])\mathrm{FunctionExpand}(\bigl\lbrack\sqrt{-x^2}, \ln(\sqrt{1-x^2})\bigr\rbrack)Out[−x2,12(ln⁡(1−x2))]\bigl\lbrack\sqrt{-x^2}, \frac{1}{2}(\ln(1-x^2))\bigr\rbrack
live ↗
InFunctionExpand(Ai⁡(x×(−1)43))\mathrm{FunctionExpand}(\operatorname{Ai}(x×(-1)^{\frac{4}{3}}))OutAi⁡(x)\operatorname{Ai}(x)
Properties #

Only ζ(2)\zeta(2) expands, to π2/6\pi^2/6; the reflection formula is not applied

live ↗
InFunctionExpand(Li⁡2(z)+Li⁡2(1−z)−ζ(2))\mathrm{FunctionExpand}(\operatorname{Li}_{2}(z)+\operatorname{Li}_{2}(1-z)-ζ(2))OutLi⁡2(z)+Li⁡2(1−z)−π26\operatorname{Li}_{2}(z)+\operatorname{Li}_{2}(1-z)-\frac{π^2}{6}
About
Examples13
Checked againstWolfram Language 11 agree2 differ
CrosswalkWolfram Language

See also: FullSimplify, DirichletEta, DirichletBeta, BarnesG