Differentiability requires that their first derivatives also match. Differentiating the solutions and then plugging in x=0 and x=L gives: