I think the standard notation requires the restrictions to be $f_j(p)\leq0$ for a minimization, and then multipliers can be nonnegative, so the lagrangian is always lower than the cost function.
Minimize h(p)
S. To
Sum(p)=1, let $\lambda_0$ be the asoc. Mult.
$p_j \geq0$, let $\lambda_j$ be the asoc. Mult.
Now to find the optimum candidates:
$dL/dp_j=-\log p_j -1 +\lambda_0-\lambda_j=0$
and kkt:
$\sum p=1$
$\sum p_j \lambda j=0$
Note from this last eq that, as both $\lambda_j$ and $p_j$ are positive, sum equals zero means every element is zero, i.e., either $\lambda_j$ or $ p_j$ equals zero. This and 'the convention' let you solve the multipliers, but well skip to a faster road:
- Look for $i: \lambda_i=0$
This implies $p_i= \exp{\lambda_0-1}$, which does not depend on anything else, so it must be a constant.
Let $p_i= \exp{\lambda_0-1}\triangleq 1/k$, where k is the sumber of non-zero mass elements.
- The old problem now becomes:
Minimize $-\sum 1/k \log 1/k=\log k$
Subject to
$ k \in Z, k\geq 1$
And clearly the optimum is achieved for k=1, which is the least entropic (degenerate ) distribution.
Note: to be thorough, you should also consider the other, non-zero multipliers, then solve for $\lambda_0$, then the rest multipliers, which have to be equal... But this is enough for the question I think
Periodicity of cosine means that you will have multiple possible values of $x$ that satisfy $\cos(2x)=-\frac{1}{2}$. You need to test $x = \pi (n\pm\frac{1}{3})$ for integer values of $n$ that yield $x$ in $[1,5]$.
PS: Whenever possible, you should graph your function (e.g., with Desmos) to make sure what you see agrees with what you calculate.
Best Answer
Let
$$\text{t = time in minutes}$$ $$\text{100g = amount of butter}$$ $$\text{p = percentage of butter that is made of saturated fats}$$
where two extremes occur when the butter has no saturated fat $(p=0)$ or the butter consists of only saturated fat $(p=100)$. Then, the total amount of time to melt all the butter is given by the function
$$t(p)=\frac{p^2}{10000}+\frac{p}{100}+2$$
As $p\ge 0$ by definition, $t(p)$ is a monotonically increasing function. Therefore, the minimum amount of time occurs when the butter contains no saturated fat. We have
$$t(0)=2$$
so the minimum occurs at $2$ minutes. On the other hand, the maximum occurs when the butter is made of $100\%$ saturated fat. Here
$$t(100)=1+1+2=4$$
so the maximum amount of time to melt all the butter is $4$ minutes.