Indeed, that is possible. From the points where the RHS is not differentiable one can determine the zeroes of
f(x)
and
g(x)
.