How to maximize 3 variable equations subject to a constraint?

240 Views Asked by At

Let's say I want to maximise a function $f(x,y,z)=a\ln(x)+(1-a)\ln(y)-\frac{z^2}{2}$ subject to a constraint that is equal to $x+\frac{y}{1+r}=Wz$

Assume variables are all real numbers and $0<a<1$

How would I go about doing this? z I have tried: $\mathcal{L}= \alpha \ln{x}+(1-\alpha)\ln{(y)}-\frac{{z}^2}{2}+ \lambda(Wz-{By}-x)$ and partially differentiating w.r.t. $x,y,z$ but I get stuck on finding $z$ as $Wz$ varies with $z$.

Attempt: $\frac{\partial{\mathcal{L}}}{\partial{x}}=\frac{\alpha}{x}-\lambda=0$

$\frac{\alpha}{x}=\lambda$

$\frac{\partial{\mathcal{L}}}{\partial{y}}=\frac{1-\alpha}{y}-\frac{\lambda}{1+r}=0$

$\frac{1-\alpha}{y}=\frac{\lambda}{1+r}$

$\frac{(1-\alpha)(1+r)}{y}=\lambda$

$\frac{\partial{\mathcal{L}}}{\partial{z}}=W\lambda-z=0$

$W\lambda=z$

$\frac{z}{W}=\lambda$

2

There are 2 best solutions below

0
On

Hint:

Maximize

$$a\ln(x)+(1-a)\ln(y)-\frac12\left(bx+cy\right)^2$$ for $x,y$ (without constraint; auxiliary constants introduced for convenience).

$$\dfrac ax-b(bx+cy)=\dfrac{1-a}y-c(bx+cy)=0.$$ There is no valid solution !

0
On

Using the Lagrangian multipliers procedure:

calling

$$ f(x,y,z) = a\ln x+(1-a)\ln y -\frac 12 z^2 $$

the lagrangian can be established as

$$ L(x,y,z,\lambda) = f(x,y,z)+\lambda\left(x+\frac{y}{r+1}-z W\right) $$

The $L$ stationary points are the solutions for

$$ \nabla L = 0 = \left\{ \begin{array}{rcl} \frac{a}{x}+\lambda & = & 0\\ \frac{1-a}{y}+\frac{\lambda }{r+1} & = & 0\\ \lambda W+z & = & 0\\ x+\frac{y}{r+1}-W z & = & 0\\ \end{array} \right. $$

obtaining

$$ \left[ \begin{array}{ccccc} f & x & y & z & \lambda \\ a \log (a W)-(a-1) \log ((1-a) (r+1) W)-\frac{1}{2} & a W & (1-a) (r+1) W & 1 & -\frac{1}{W} \\ a \log (-a W)-(a-1) \log ((a-1) (r+1) W)-\frac{1}{2} & -a W & (a-1) (r+1) W & -1 & \frac{1}{W} \\ \end{array} \right] $$

NOTE

Depending on the parametric values for $a,r,W$ the obtained values cannot be feasible.