Given a joint density function, I want to calculate CEF and best linear predictor (This is problem from Bruce Hansen's Econometric Lecture notes (2.16). But there's no solution there and I have no one to ask because I am not a student.)
The joint density function is given as $(3/2)(x^2+y^2)$ on the support $[0,1]$ ($x,y$ both). I want to calculate best linear predictor for equation $y=a+bx+e$
and conditional mean function $m(x)=E(y|x)$. Here's what I've tried:

*

*Computing best linear predictor
$\newcommand{\cov}{{\rm Cov}}\newcommand{\var}{{\rm Var}}\newcommand{\ahat}{{\hat a}}\newcommand{\bhat}{{\hat b}} \bhat=\cov(x,y)/\var(x)$
$\cov(x,y)$ is integration of $f(x,y)(x-E(x))(y-E(y))dxdy$, $x$ and $y=0$ to $1$
$\var(x)$ is integration of $f(x)(x-E(x))dx$, $x=0$ to $1$
$\ahat=E(y)-\bhat E(x)$
(I calculated $E(x)$ ($E(y)$ respectively) by integration of  $x[f(x,y)dy]dx$, $x$ and $y=0$ to $1$)


*Computing conditional mean function:
Integration of $y[f(x,y)/f(x)]dy$ $y=0$ to $1$
I have the best linear predictor as $\ahat+\bhat x=(45/146)+(5/73)x$ and conditional mean function $m(x)=(1/2)+[1/(12x^2+4)]$
However, I am not sure that I have reached to correct answer. My first doubt is that computation is too messy and second is that BLP has positive slope on $[0,1]$ and CEF has negative slope on $[0,1]$.
The following is a picture of CEF and BLP, based on my calculation.

 A: A more step-by-step approach could be:
The joint distribution function is
$$F(x,y) = \frac 32\int_0^y \int_0^x (s^2 + t^2)dsdt = \frac 32\int_0^y \left[\int_0^x s^2 ds+\int_0^x t^2ds\right]dt$$
Continue the simple integration to obtain
$$F(x,y) = \frac 12 x^3y + \frac 12 xy^3$$
That's the mother of everything. 
Set each variable equal to the upper bound of the support to obtain the marginal distribution function of the other. Then differentiate to get the marginal densities (they should be structurally the same since the variables enter the joint distribution symmetrically). Calculate mean ($5/8$) and variance (they will be the same for both variables). Calculate covariance, and you can get your Best Linear Predictor.  
As for the Conditional Expectation (or mean) Function, it can indeed be easily calculated from
$$E(Y\mid X) = \int_0^1 y\frac {f_{XY}(x,y)}{f_X(x)}dy$$
and after a clever simplification one gets the result that the OP provides in the question.
This appears to be an exercise to show how the linear formulation of co-movement and the resulting predictor may differ from the actual relationship.
