Absolute Value and Piecewise Function Calculator
Solves absolute value equations and inequalities step by step, evaluates expressions, writes them piecewise and evaluates piecewise functions.
The set covered by conditions does not exclude singularities of the expressions. Continuity checks compare endpoint substitutions in adjacent expressions. Limits at singularities are not evaluated.
What does this tool do?
It has three tabs. The equation and inequality tab solves an equation or inequality that contains absolute values and shows the solution set on a number line. The value tab evaluates an absolute value expression at a given x step by step and rewrites it as a piecewise function. The piecewise tab evaluates a function made of up to four pieces at a given point.
What is an absolute value?
The absolute value of a number is its distance from zero on the number line, so it is never negative: |5| = 5 and |−5| = 5. If the inside is not negative it is left as it is, and if it is negative its sign is changed. Type the bars with the | key or write abs(x).
Rules for equations and inequalities
Let k be a positive number.
- |u| = k means u = k or u = −k
- |u| < k means −k < u < k
- |u| > k means u < −k or u > k
If k is negative, |u| = k and |u| < k have no solution, while |u| > k is true for every number.
Example
Type |2x - 3| = 5. The inside can be 5 or −5. From 2x − 3 = 5 we get x = 4 and from 2x − 3 = −5 we get x = −1. The solution set is {−1, 4}. An inequality: |x + 1| < 4 means −4 < x + 1 < 4, and subtracting 1 everywhere leaves −5 < x < 3.
Several absolute values
For expressions such as |x - 1| + |x + 2| = 5 the tool finds the critical points, the values of x where the inside of an absolute value is zero (here −2 and 1). They split the number line into intervals. In each interval the sign of every absolute value is known, so the expression becomes a linear equation that can be solved. A solution is kept only if it lies inside that interval. Equations with x on the right side, such as |x - 1| = 2x + 3, are solved the same way.
Piecewise functions
For each piece type an expression and a condition, such as x < 0, 0 <= x < 2 or x >= 2. The last piece may have the condition "otherwise". The tool shows which condition your x satisfies and evaluates that piece. It also gives the set covered by the conditions and the values from the left and from the right where two pieces meet: Continuity requires both side values and the defined point value to agree. Different side values indicate a jump. Equal sides with a missing or different point value indicate a removable discontinuity.
Limits
The equation and inequality tab only handles absolute values of linear expressions: equations such as |x² − 1| = 3 and nested absolute values are not supported. Coefficients must be whole numbers, fractions or decimals. In a piecewise function the conditions use a single variable and number bounds. The continuity check at the end points compares the values of the neighbouring pieces at that point.
Related calculators
-
Mathematics
Inequality Solver
Solves linear, quadratic, polynomial and rational inequalities step by step: critical points, sign chart, interval notation and a number line. -
Mathematics
Equation Solver
Type an equation and see the roots step by step: linear, quadratic and cubic, discriminant, complex roots, numeric roots and systems in 2, 3 or 4 unknowns. -
Mathematics
Function Graph Plotter
Type f(x) and see its graph: several functions at once, zoom and pan, roots and intersection points. Download the graph as SVG or PNG. -
Mathematics
Function Value and Inverse Function Calculator
Finds f(a), the composition f(g(x)) and the inverse function step by step. For linear functions and (ax+b)/(cx+d) the inverse is given in symbols. -
Mathematics
Algebraic Expression Simplifier
Simplifies an algebraic expression step by step: expands brackets, combines like terms, cancels common factors in rational expressions and evaluates at given values. -
Mathematics
Arithmetic and Geometric Sequence Calculator
The nth term, the sum of the first n terms, the infinite sum, finding a sequence from two terms and the position of a term. Exact fractions, step by step.
Found a mistake or something missing?
If a value looks wrong, a size is missing or you need a feature, write to us and we will fix it.