The function graphed on the axes as a piecewise function is

In Mathematics and Euclidean Geometry, the intercept form of the equation of a standard line can be modeled by the following formula;
x/a + y/b = 1
Where:
a and b are x-intercept and y-intercept respectively.
Since the graph of this function has an x-intercept of (2, 0) and a y-intercept of (0, 4), an equation that represents the line can be written as follows;
x/2 + y/4 = 1
(2x + y)/4 = 1
By cross-multiplying, we have the following;
2x + y = 4
y = -2x + 4
f(x) = -2x + 4, if x > 0
f(x) = -2x + 4, if x < 0
Since there is a solid dot above the point (3, -2), a function to model the situation can be written as follows;
f(x) = -1, if x = 3.
Therefore, the piecewise function can be written as follows;
