Piecewise functions let you define equations that only apply within specific ranges.
Use curly braces {} to add conditions.
| Equation | Description | Try |
|---|---|---|
y = x {x > 0} |
Line only for positive x | |
y = x^2 {x >= 0} |
Right half of parabola | |
y = x {0 < x < 5} |
Line between x=0 and x=5 | |
y = sin(x) {x > 0} |
Sine wave for positive x | |
y = -x + 5 {0 < x < 5} |
Slanted ramp segment |
| Operator | Meaning | Example |
|---|---|---|
> |
Greater than | x > 0 |
< |
Less than | x < 5 |
>= |
Greater than or equal | x >= -2 |
<= |
Less than or equal | x <= 10 |
0 < x < 5 |
Range (between) | y = x {0 < x < 5} |
| Equation | Description | Try |
|---|---|---|
y = x |
Diagonal line through origin | |
y = 2x + 1 |
Line with slope 2, y-intercept 1 | |
y = x^2 |
Parabola opening upward | |
y = -x^2 + 5 |
Upside-down parabola | |
y = x^3 |
Cubic curve | |
x = 5 |
Vertical line at x=5 | |
y = 3 |
Horizontal line at y=3 |
| Equation | Description | Try |
|---|---|---|
x^2 + y^2 = 25 |
Circle, radius 5, centered at origin | |
(x-2)^2 + (y-3)^2 = 9 |
Circle centered at (2, 3) | |
x^2/9 + y^2/4 = 1 |
Ellipse | |
x = y^2 |
Parabola opening right |
| Equation | Description | Try |
|---|---|---|
y = sin(x) |
Sine wave | |
y = cos(x) |
Cosine wave | |
y = tan(x) |
Tangent (with asymptotes) | |
y = 2*sin(x) |
Taller sine wave (amplitude 2) | |
y = sin(2*x) |
Compressed sine wave | |
y = sin(x) + 2 |
Sine wave shifted up |
Use r for radius and theta for angle ΞΈ.
| Equation | Description | Try |
|---|---|---|
r = 5 |
Circle (radius 5) | |
r = theta |
Spiral | |
r = sin(3*theta) |
3-petal rose | |
r = cos(4*theta) |
8-petal rose | |
r = 1 + cos(theta) |
Cardioid (heart shape) | |
r = 2 + sin(theta) |
LimaΓ§on |
| Equation | Description | Try |
|---|---|---|
y = sqrt(x) |
Square root curve | |
y = abs(x) |
Absolute value (V shape) | |
y = ln(x) |
Natural logarithm | |
y = log(x) |
Logarithm base 10 | |
y = e^x |
Exponential growth | |
y = 2^x |
Power of 2 | |
y = floor(x) |
Step function (floor) | |
y = 1/x |
Hyperbola | |
y = log_2(x) |
Logarithm with custom base | |
y = clamp(x, -2, 2) |
Limits output between two values | |
y = max(sin(x), cos(x)) |
Upper envelope of two functions | |
y = sec(x) |
Reciprocal trigonometric function | |
y = sin(30deg) * x |
Degree notation |