i need help finding the first and second derivative of this peicewise function

f(x)= { 2(x+1)^2 , x<1

{ -x^2 +9 , x >= 1

the two { are supposed to be one big {

oh and when you want to check for concavity and increasing and decreasing, do you check each function of the peicewise seperately?

thanks in advance