I would like to solve an equation that looks like this
UPDATE
$E[(R^{1-\gamma})(r_k+\theta-r_z)]=0$ , where $R=\phi r_z+(1-\phi)(r_k+\theta)$ and $\phi\in[0,1]$,
$\theta$, is a random variable normaly distributed with zero mean, and some variance $\sigma^2$. Thus, the $E[.]$ stands for the expectation operator over this random variable.
An alternative version of the problem, solves a similar equation, but now $\theta$ is lognormally distributed.
The computational task, is to find $\phi$, such as the condition/equation above holds, for some given numbers/values for $r_z,r_k$ and $\gamma$ all of which are positive real numbers.
Can someone help on how I can calculate this, ideally in MATLAB ?