Can you help me find the first-order condition of the following problem with respect to α:
$max[u(C_t) + δ *E_t[u(C_{t+1})]]$, such that:
$C_t=e_t-αp_t$, and
$C_{t+1}=e_{t+1}+αX_{t+1}$
For context this is the consumer problem ,
$C_t$: consumption at t
$e_t$: endowments at t
$p_t$: price of the risky asset
$α$: nb of shares purchased of risky asset
$δ$: a subjective discounting factor
$X_{t+1}$: random payoff
so we can write:
$max[u(e_t-αp_t) + δ *E_t[u(e_{t+1}+αX_{t+1}]]$
For the FOC, I arrive to this:
$u'(c_t)+δ*E_t[u'(C_{t+1})]=0$
$-p_t+δ*E_t[X_{t+1}]=0$
But the answer in my notes is:
$-p_t*u'(C_t)+E_t[δ*u'(C_{t+1})*X_{t+1}]=0$
You have to apply the chain rule. Let's take the function $h(x)=f(g(x))$. Then the derivative is $h^{'}(x) = f'(g(x))\cdot g^{'}(x)$.
Now you want to differentiate $u(g(\alpha))=u(e_t-\alpha p_t)$ w.r.t. $\alpha$. This is $u^{'}(g(\alpha))\cdot g'(\alpha)=u^{'}(e_t-\alpha p_t)'\cdot (-p_t)=u^{'}(C_t)\cdot (-p_t)$.
Similar for the other summand:
$\delta\cdot \mathbb E_t[u(g(\alpha))]= δ \cdot \mathbb E_t[u(e_{t+1}+αX_{t+1})]$
$\left(\delta\cdot \mathbb E_t[u(g(\alpha))]\right)^{'}=\delta\cdot \mathbb E_t[u^{'}(g(\alpha))\cdot g^{'}(\alpha)]$
$= δ \cdot \mathbb E_t[u'(e_{t+1}+αX_{t+1})\cdot X_{t+1}]=δ \cdot \mathbb E_t[u'(C_{t+1})\cdot X_{t+1}]$
Then the derivative of a sum is the sum of the derivatives. So in total the FOC is
$u^{'}(C_t)\cdot (-p_t)+δ \cdot \mathbb E_t[u'(C_{t+1})\cdot X_{t+1}]=0$