Question
Question: How do you find the maximum value of the function \(f(x,y,z) = x + 2y - 3z\) subject to the constrai...
How do you find the maximum value of the function f(x,y,z)=x+2y−3z subject to the constraint z=4x2+y2?
Solution
Use lagrange functionL(x,y,z,λ)=f(x,y,z)+λg(x,y,z) and then find the value of λ, and substitute it into the lagrange equation and then parietal differentiate to get values and then get the required maximum value.
Complete step by step answer:
First, let’s give each equation a number such that we can avoid any further confusion
f(x,y,z)=x+2y−3z [1]
g(x,y,z)=4x2+y2−z [2]
Given below is the lagrange function
L(x,y,z,λ)=f(x,y,z)+λg(x,y,z)
We substitute the equation 1 and 2 into the lagrange function and we finally get
L(x,y,z,λ)=x+2y−3z+4λx2+λy2−λz
So, for finding the maximum value of the given function, we need to find the stationary points.
So, to find the stationary points, we partially derive the newly formed lagrange function with respect to x, y, z and λ.
Then we get four equations.
On partial derivation of x we get
∂x∂L(x,y,z,λ)=1+8λx
On partial derivation of y, we get
∂y∂L(x,y,z,λ)=2+2λy
On partial derivation of z , we get
∂z∂L(x,y,z,λ)=−3−λ
On partial derivation of λ, we get
∂λ∂L(x,y,z,λ)=4x2+y2−z
The above four equations , can be equalled to zero
The above equations are labelled as 3, 4, 5,6;
From the equation 5 , we get
λ=−3
We substitute this values in equation 3 for x value
We substitute λ value in equation 4 for y value
2+2(−3)y=0
y=31
We, use the equation 6 for finding the z value
Now, we substitute all the obtained value in equation 1
We get
F(241,31,14417)=241+32+14451 F(241,31,14417)=4817
The maximum value of the function is 4817
Note: One cannot use the second derivative to test whether the Lagrange multiplier has given you a maximum or a minimum; the only way to determine whether the value is a local maximum is perturbation of values.