In a simple setting, $w$ is uniformly distributed on $[0,1]$, R is a function of $wd$. I want to find optimal d in this expression,
$aR-(d^2-1)/2$.
When I try to find out optimal $d$ than it is $0$. But i think I am ignoring the fact that $R$ is a function of $wd$ but what form it is, is not known. Does this change the solution of this problem.
Guidelines will be appreciated. Thanks
If $R$ is a function of $wd$ then presumably $\mathbb{E}[aR]$ is not a constant, so its derivative of with respect to $d$ is not zero, with the consequence that your second and third lines are not helpful.
To actually find optimal $d$, you will have to know what optimal means here, what the function $R$ is, and possibly some information about $a$.
Added: As an example, suppose $R=wd$, $a$ is positive and you want to maximise the expectation $\mathbb{E}\left[aR-\frac{d^2-1}{2}\right]$.
Then the first derivative with respect to $d$ of the expectation is $\frac{a}{2}-d$, and the second derivative is negative, so the maximum occurs when $d=\frac{a}{2}$ in which case the expectation would be $\frac{a^2}{8} + \frac{1}{2}$.