Tangents at a point

Point P on this function, which is a combination of functions f and g, is literally a point on the function; it is not smooth there. Observe what happens when GeoGebra tries to draw a tangent line at P. Depending on which of the two pieces of the function GeoGebra tries to follow, it creates two very different tangent lines with very different slopes. If you check the "Show secant lines" option, you can view secant lines between C and P and between C and D, respectively. Drag points C and D closer to P to observe what happens.