I want to find the first order derivative to the following function in order to minimize the function.
$${\hat{C}}_3\left({\hat{y}}_3\right)=e_3{\hat{y}}_3-h_3(\ \lambda_3(L_3+1))+(h_3+b)\sum_{u={\hat{y}}_3}^{\infty}{(u-{\hat{y}}_3)}\frac{\left(\lambda_3\left(L_3+1\right)\right)^u}{u!}e^{{-\lambda}_3\left(L_3+1\right)}$$
Basically this is a twist on the clark and scarf method of finding optimal bases stocks. $e_3, h_3, \ \lambda_3(L_3+1)$ and $b$ are variables which are static for each of my calculations, so when I run a scenario these are fixed values for the specific scenario. ${\hat{y}}_3$ is the variable I want to optimize by minimizing ${\hat{C}}_3\left({\hat{y}}_3\right)$. I am mainly struggeling due to the ${\hat{y}}_3$ also being in the power of the summed function.
Thanks in advance