I have a variable $e(h)$, and below is the part of the Lagrangian equation where I am taking the derivative with respect to $e(h)$.
$$\frac{\partial }{\partial e(h)} \hspace{.2cm}\mu_1(h)(e(h)-\bar{E})+\mu_2(h)(e(h)-e(h-1))$$
where $\bar{E}$ is a parameter and the rest are variables. $h$ defines the time steps in hours. Please let me know how to take the derivative to derive the KKT especially the part where the $e(h-1)$ is present.