 # I have to maximize the following function - Max A <msubsup> C 1 <mrow class="M Laila Andrews 2022-05-07 Answered
I have to maximize the following function -
Max A ${C}_{1}^{-m}/-m$ + (1-A) ${C}_{2}^{-m}/-m$
Subject to,
${C}_{1}$ ≤ 5(1-x) + x
${C}_{2}$ ≤ 3(1-x) + 7x
1≤x≤10
I wrote it as: L(x) = f(x) - ${\lambda }_{1}$(${C}_{1}$ - 5(1-x) + x) - ${\lambda }_{2}$(${C}_{2}$ - 3(1-x) + 7x) - ${\lambda }_{3}$(x-1) - ${\lambda }_{4}$(x-10)
Can I write last constraint as partioned into ${\lambda }_{3}$ and ${\lambda }_{4}$. Is there some other way to introduce such box constraints into the same problem?
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it Elliana Shelton
Considering
$L\left(x,\lambda ,ϵ\right)={\lambda }_{1}\left({C}_{1}-5\left(1-x\right)-x-{ϵ}_{1}^{2}\right)+{\lambda }_{2}\left({C}_{2}-3\left(1-x\right)-7x-{ϵ}_{2}^{2}\right)+{\lambda }_{3}\left(1-x-{ϵ}_{3}^{2}\right)+{\lambda }_{4}\left(x-10-{ϵ}_{4}^{2}\right)$
with ${ϵ}_{k}$ convenient slack variables, the stationary points are the solutions for
$\mathrm{\nabla }L=0=\left\{\begin{array}{l}4{\lambda }_{1}-4{\lambda }_{2}-{\lambda }_{3}+{\lambda }_{4}=0\\ {C}_{1}-5\left(1-x\right)-x-{ϵ}_{1}^{2}=0\\ {C}_{2}-3\left(1-x\right)-7x-{ϵ}_{2}^{2}=0\\ 1-x-{ϵ}_{3}^{2}=0\\ x-10-{ϵ}_{4}^{2}=0\\ {\lambda }_{1}{ϵ}_{1}=0\\ {\lambda }_{2}{ϵ}_{2}=0\\ {\lambda }_{3}{ϵ}_{3}=0\\ {\lambda }_{4}{ϵ}_{4}=0\end{array}$
and the feasible solutions are those observing ${ϵ}_{k}^{2}\ge 0$ for $k=1,2,3,4$
$\left(\begin{array}{ccccccccc}x& {\lambda }_{1}& {\lambda }_{2}& {\lambda }_{3}& {\lambda }_{4}& {ϵ}_{1}^{2}& {ϵ}_{2}^{2}& {ϵ}_{3}^{2}& {ϵ}_{4}^{2}\\ \frac{5-{C}_{1}}{4}& 0& 0& 0& 0& 0& {C}_{1}+{C}_{2}-8& \frac{{C}_{1}-1}{4}& -\frac{1}{4}\left({C}_{2}+35\right)\\ \frac{{C}_{2}-3}{4}& 0& 0& 0& 0& {C}_{1}+{C}_{2}-8& 0& \frac{7-{C}_{2}}{4}& \frac{{C}_{2}-43}{4}\\ x& 0& 0& 0& 0& {C}_{1}+4x-5& {C}_{2}-4x-3& 1-x& x-10\end{array}\right)$
###### Not exactly what you’re looking for? agrejas0hxpx
$\begin{array}{rl}\underset{\text{w.r.t}\phantom{\rule{thickmathspace}{0ex}}x\in \mathbb{R}}{\text{maximise}}\phantom{\rule{thickmathspace}{0ex}}& \phantom{\rule{thickmathspace}{0ex}}-A\phantom{\rule{thinmathspace}{0ex}}\frac{{C}_{1}^{-m}}{m}-\left(1-A\right)\frac{{C}_{2}^{-m}}{m}=\gamma \\ \text{subj.to}& \phantom{\rule{1em}{0ex}}{h}_{1}\left(x\right)\le 0\\ & \phantom{\rule{1em}{0ex}}{h}_{2}\left(x\right)\left(x\right)\le 0\\ & \phantom{\rule{1em}{0ex}}\alpha \le {h}_{3}\left(x\right)\le \beta \end{array}$
Maximizing a constant function under some constraints is called a satisfiability problem; any reachable value will attain the maximum (and minimum) of $\gamma$. Your method of putting
$\alpha \le {h}_{3}\left(x\right)\le \beta \phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}⟺\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\alpha -{h}_{3}\left(x\right)\le 0\phantom{\rule{thickmathspace}{0ex}}\text{and}\phantom{\rule{thickmathspace}{0ex}}{h}_{3}\left(x\right)-\beta \le 0$
Before putting the problem into Lagrangian form is the go-to solution in most cases if $f$ is non constant!