Example OW.FDPC.4 Continuous functions defined with cases. [Removing discontinuities.]

Suppose $C$ is a constant with $f(x) = x +C $  when $x \ge 0$ and $f(x) = -2x +1$ otherwise.
Find a value for $C$ so that the function $f$ is continuous at $x=0$.

Solution: For this function to be continuous at $x=0$ the value of $f$ for A number $x$ close to be $0$ to the value of $f(0) =C$.  When $x<0$  but close to $0$ the value of $f(x)=-2x+1$ which is close to $1$. Thus the value for $C$ that will make $f$ continuous at $x=0$ is $C =1$.

Martin Flashman, Nov. 9, 2013, Created with GeoGebra


Check the box in Geogebra to see more points and arrows corresponding to data on the table.
When the point in the domain is $[0,\infty) $, the arrow points to $f (x)= x +C$, while otherwise the arrow points to $-2x+1$ on the target axis.  Notice  the "step"  on the graph at $(0,C)$ which is the "Y-intercept" where there the graph is disconnected unless $C=1$

You can check this by moving $x$ and $C$ on the GeoGebra mapping diagram.
You can change the function and the value of $a$ where the "step" occurs to explore this further.
Notice how the use of an additive parameter makes the removal of the discontinuity possible.