You have the functions f(x) = 3x + 1 and g(x) = |x − 1|

Let h(x) = f(x)g(x),

now find h`(0) two ways: first, using the product rule, and then by rewriting h(x) as a piecewise function and taking the derivative directly. Confirm that you get the same answer using both methods.