Yes they can. Example: y = x2 where -1 <= x <= 1; y = -2x + 3 where x < -1, and y = 2x - 1 where x > 1. Not only is this piecewise-defined function continuous, it is also differentiable. Basically, for continuity, you need that the functions have the same value at the border between them.
Is a piecewise continuous function differentiable?
A piecewise continuously differentiable function is referred to in some sources as a piecewise smooth function. However, as a smooth function is defined on Pr∞fWiki as being of differentiability class ∞, this can cause confusion, so is not recommended.
How do you know if a function is differentiable?
A function is said to be differentiable if the derivative of the function exists at all points in its domain. Particularly, if a function f(x) is differentiable at x = a, then f′(a) exists in the domain.