So your constraint is
Then set the i, j, and k components equal to each other of f and g where f is the function and g is the constraint.
Since the value of is not part of the solution, you can often simplify by first eliminating by dividing one equation by another.
Here, you have and so, dividing the first by the second,
or y= x. Similarly, dividing by gives x= 2z.
Putting those into gives .