UnitTriangle: Unit triangle function—Wolfram Documentation
UnitTriangle[x]
represents the unit triangle function on the interval
.
UnitTriangle[x1,x2,…]
represents the multidimensional unit triangle function on the interval
.
Details
- UnitTriangle[x] is equivalent to Piecewise[{{x+1,-1≤x<0},{1-x,0≤x≤1}}].
- UnitTriangle can be used in integrals and integral transforms.
- UnitTriangle has attribute Orderless.
- UnitTriangle automatically threads over lists. »
Examples
open all close allBasic Examples (4)
UnitTriangle is a piecewise function:
Scope (36)
Numerical Evaluation (7)
For inputs between -1 and 1, the precision of the output tracks the precision of the input:
For inputs outside that range, the result is exact:
Evaluate efficiently at high precision:
UnitTriangle threads over lists:
Compute the elementwise values of an array using automatic threading:
Or compute the matrix UnitTriangle function using MatrixFunction:
Compute average-case statistical intervals using Around:
Specific Values (4)
Values of UnitTriangle at fixed points:
Find a value of x for which UnitTriangle[x]=0.4:
Visualization (4)
Function Properties (11)
Differentiation and Integration (6)
First derivative with respect to x:
Higher-order derivatives with respect to x:
First derivative with respect to z:
Series expansion at the origin:
Compute the indefinite integral using Integrate:
Integral Transforms (4)
Applications (4)
Integrate a piecewise function involving UnitTriangle symbolically and numerically:
Solve a differential equation involving UnitBox and UnitTriangle:
Visualize discontinuities in the wavelet domain:
Detail coefficients in the region of discontinuities have larger values:
Generate data from some distribution:
Apply mean shift until all data points have converged:
Properties & Relations (4)
Text
Wolfram Research (2008), UnitTriangle, Wolfram Language function, https://reference.wolfram.com/language/ref/UnitTriangle.html.
CMS
Wolfram Language. 2008. "UnitTriangle." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/UnitTriangle.html.
APA
Wolfram Language. (2008). UnitTriangle. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/UnitTriangle.html
BibTeX
@misc{reference.wolfram_2025_unittriangle, author="Wolfram Research", title="{UnitTriangle}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/UnitTriangle.html}", note=[Accessed: 22-February-2026]}
BibLaTeX
@online{reference.wolfram_2025_unittriangle, organization={Wolfram Research}, title={UnitTriangle}, year={2008}, url={https://reference.wolfram.com/language/ref/UnitTriangle.html}, note=[Accessed: 22-February-2026]}