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.

  • $\begingroup$ If $e(h)$ and $e(h-1)$ are different variables, then the derivative of $e(h-1)$ with respect to $e(h)$ is zero. $\endgroup$ Commented May 25, 2020 at 1:14
  • $\begingroup$ $e(h)$ and $e(h-1)$ are the same variable, it's just the time step is different. $\endgroup$
    – S_Scouse
    Commented May 25, 2020 at 1:16
  • $\begingroup$ What does a solution look like to you? If it is a list of values for $e(h)$ for each finite number of possible $h$ values, then these are different variables. $\endgroup$ Commented May 25, 2020 at 1:21
  • $\begingroup$ Ok, thank you for that. $\endgroup$
    – S_Scouse
    Commented May 25, 2020 at 1:29
  • $\begingroup$ Is there any relationship between $\mu_1(h)$ and $e(h)$ or are they independent? Could you say something regarding $\mu_1(h)$'s partial derivative in terms of $e(h)$ $\endgroup$
    – dhasson
    Commented May 25, 2020 at 15:46


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.