Skip to content

HeavisideLambda ​

The Heaviside-family triangle function: 1 - |x| for -1 <= x <= 1, 0 otherwise.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageHeavisideLambda✓
HeavisideLambda(x)max(1 - |x|, 0).
Typed signatures
TypePackageApplies
(real) -> numberanalyticalways

Domain: Elementary functions

Details
  • Continuous everywhere, so HeavisideLambda(±1) = 0 falls out of the formula, no special case.
  • The same function as UnitTriangle -- Wolfram gives it a second name for the Heaviside/Dirac generalized-function family it belongs to (it is HeavisideTheta convolved with itself).
  • N(x, d) past a double's digits keeps the bignum operand and returns 1−∣x∣1 - |x| in its digits.

Examples

1 more kept as data, checked against the oracles
Basic #
live ↗
InHeavisideLambda(0)\mathrm{HeavisideLambda}(0)Out11

Zero at the endpoint

live ↗
InHeavisideLambda(1)\mathrm{HeavisideLambda}(1)Out00
live ↗
InHeavisideLambda(−1)\mathrm{HeavisideLambda}(-1)Out00
Scope #
live ↗
InHeavisideLambda(2)\mathrm{HeavisideLambda}(2)Out00

Exact rational input, exact rational output

live ↗
InHeavisideLambda(14)\mathrm{HeavisideLambda}(\frac{1}{4})Out34\frac{3}{4}

An exact irrational input: 1 - |v| stays exact

live ↗
InHeavisideLambda(π4)\mathrm{HeavisideLambda}(\frac{π}{4})Out1−π41-\frac{π}{4}

Known value · 1 - |v| for |v| = π/4 < 1

Matrix function of the triangle function, with entries 00 and 12\frac12

live ↗
InMatrixFunction(HeavisideLambda,[[−1,0],[−12,12]])\mathrm{MatrixFunction}(\mathrm{HeavisideLambda}, \bigl\lbrack\bigl\lbrack-1, 0\bigr\rbrack, \bigl\lbrack-\frac{1}{2}, \frac{1}{2}\bigr\rbrack\bigr\rbrack)Out[[0,0],[−16,12]]\bigl\lbrack\bigl\lbrack0, 0\bigr\rbrack, \bigl\lbrack-\frac{1}{6}, \frac{1}{2}\bigr\rbrack\bigr\rbrack
live ↗
InN(HeavisideLambda(517),50)N(\mathrm{HeavisideLambda}(\frac{5}{17}), 50)Out0.7058823529411764‾0.\overline{7058823529411764}
About
Examples9
Checked againstWolfram Language 9 agree
CrosswalkWolfram Language