I know we can use langrangian method but i am getting confused here. let us have equation:
$$Ax + By + Cz =D$$ (constraint) and $x,y,z$ are all non-negative.
I wanna maximize/minimze $f(x,y,z) =ax + by + cz$ ,How do I do it? plz share an example too. Here $A,B,C,a,b,c$ are the given constants.
By Lagrange's theorem,
$$f(x)+\lambda g(x)=0$$
where $f$ is the fn. to be maximised and $g$ the given constraint
So,
$$Q=ax+by+cz+\lambda(Ax+By+Cz-D)=0$$
Now just compute $$ \frac{\partial Q}{\partial x}=0$$
$$ \frac{\partial Q}{\partial y}=0$$
$$ \frac{\partial Q}{\partial z}=0$$
and express $x,y,z$ in terms of $\lambda$ and then substitute in $g(x)$ to find $\lambda$ and eventually $x,y,z$.