Let $([0,1],\mathscr B[0,1],Leb)$ be a probability space. Define $f(x):= x^2 /2$ and $g(x):=2(x-1/2)^2$. Find $$E[f|g], E[g|f]$$
What I have tried:
It is clear that $E[g|f]=g$ as $\sigma(f)=\mathscr B[0,1]$.
I think the same goes for $E[f|g]=f$ as follows;
$f=1/2 (\sqrt {g/2} +1/2)^2 $ so $f$ is composition of $g$ with continuous functions so that $f$ is $\sigma (g)$-m'ble. Thus we get $E[f|g]=f$.
However, I know that this should not be true as $\sigma (g) \neq \mathscr B[0,1]$. Where is my argument wrong?
Any help is appreciated.
Let $h:=1/2 (\sqrt {g/2} +1/2)^2$. Since $\sqrt{t^2}=\left\lvert t\right\vert$, the following equality holds
$$h(x) =\frac 12 \left( \left\lvert x-\frac 12 \right\rvert +\frac 12 \right)^2 $$ and if $x-1/2$ is negative, this is not equal to $f(x)$.
Since $g(x)=g(1-x)$, the $\sigma$-algebra generated by $g$ should contains all the Borel sets symmetric at $1/2$ (that is, the sets $B$ such that $B=1-B$, where $1-B$ denotes the set $\left\{1-x,x \in B\right\}$).