probability: nonlinear best predictor $\hat{Y} = g(X)$ Consider $X\sim\mathcal{U}(-1,1)$ and $Y = X^2$. The nonlinear predictor is defined as
$$
\hat{Y} = g(X) = E_{Y|X}[Y|x_i]
$$
Now $E_{Y|X}[Y|x_i] = \int_{-\infty}^{\infty}y\frac{f_{X, Y}(x, y)}{f_X(x)}dy$. How do I find $f_{X, Y}(x, y)$? 
\begin{align}
f_Y(y) &= \frac{1}{2\sqrt{y}}(f_X(\sqrt{y}) + f_X(-\sqrt{y}))\\
&= \begin{cases}
1/\sqrt{y}, & 0<y<1\\
0, & \text{otherwise}
\end{cases}
\end{align}
Should it actually be $\frac{1}{2\sqrt{y}}$ instead?

$\forall x_i\in [-1,1]$   When given $X=x_i$ then $Y$ is certainly equal to $x_i^2$, so we have a probability mass with a support of one point:
$$\begin{align}
\mathsf P[Y=y\mid X=x_i] & = \begin{cases} 1 & : y=x_i^2 \\ 0 & : y\neq x_i^2\end{cases} 
\\[4ex]
\mathsf E_{Y\mid X}(Y\mid x_i) & = \sum_{y=x_i^2} y\, \mathsf P(Y=y\mid X=x_i)
\\ & = x_i^2 
\end{align}$$

Remark   It is usually considered that clearly: $\mathsf E[h(X)\mid X] = h(X)$ , so you needn't bother showing this work.
$$\mathsf E\left(X^2\,\middle|\, X=x_i\right) = x_i^2$$
