Find the absolute maximum of the function

f(x)=2x+1, where -2<x<0
(-x^2)+1, where x>0