Hello, Kaitosan!
Can piecewise functions be differentiable throughout? They certainly can . . . We can easily create one.
The graph must be continuous throughout and have equal derivatives at the "junctions".
Consider the graph of the parabola
Bisect it through its axis of symmetry.
Move each "half" one unit to the left and right, respectively.
The graph looks like this: Code:

*  *

*  *
*  *
*  *
      *+*      
1  1
And we have: .
This is the example I gave when asked this very question
. . on an exam while in college . . . centuries ago.
Yes . . . a silly typo . . . Thanks for the headsup.