Due to symmetry we need to define $f(x)=x^2+2$ on $(-1,0)$. It remains to discuss the $2$-periodicity. One starts with "special points", for example $x=0$. Then
i.e. $f(2):=2$. To find the extension of $f$ on $(2,3)$ one continues with all $\delta\in (0,1)$, i.e.
where $\delta+2\in (2,3)$. Similarly, considering all points $-\delta\in(-1,0)$, using $2$-periodicity one finds the extension of $f$ on the interval $(1,2)$ via $-\delta+2\in (1,2)$, as we did above. The extension of $f$ for all other points easily follow by drawing.
Due to symmetry we need to define $f(x)=-x^2-2$ on $(-1,0)$. One selects once again
the "special points", for example $x=0$ as in the even case. The analysis is completely similar, with due changes.