#Irina Mukhametzhanova, Section 24 #This homework is OK to post #14.8 Homework #Exercise 5: #First, we find the gradients of both of the functions: #grad(f) = = <2*x, 2*y> #grad(g) = = <2,3> #We then introduce a constant L that makes grad(f) a multiple of #grad(g), like so: #grad(f) = L*grad(f) #<2*x, 2*y> = L*<2,3> #We have a system of equations: #Eq. 1: 2*x = 2*L #Eq. 2: 2*y = 3*L #Eq. 3: 2*x + 3*y = 6 #Because we have 3 equations and 3 unknowns, we can solve for L, x, and y: #(2*y = 3*L) * (3/2) #3*y = (9/2)*L #Plug into Eq. 3: #2*x + 3*y = 6 #2*L + (9/2)*L = 6 #(13/2)*L = 6 #13*L = 12 #L = 12/13 #Solve for x: #2*x = 2*L #x = L #x = 12/13 #Solve for y: #2*y = 3*L #y = (3/2)*(12/13) #y = 18/13 #So, our critical point is (12/13, 18/13) #We plug the point into the original function: #f(12/13, 18/13) = (12/13)^2 + (18/13)^2 = (144 + 324)/(169) = # = 468/169 = 36/13 #ANSWER: The minimum of this function with the constraint is 36/13, #and does not have a maximum #Exercise 7: #First, we find the gradients of both of the functions: #grad(f) = = #grad(g) = = <8*x, 18*y> #We then introduce a constant L that makes grad(f) a multiple of #grad(g), like so: #grad(f) = L*grad(f) # = L*<8*x, 18*y> #We have a system of equations: #Eq. 1: y = 8*L*x #Eq. 2: x = 18*L*y #Eq. 3: 4*x^2 + 9*y^2 = 32 #Because we have 3 equations and 3 unknowns, we can solve for L, x, and y: #Plug Eq. 2 into Eq. 1: #y = 8*L*18*L*y #144*L^2 = 1 #L^2 = 1/144 #L = +-1/12 #Plug L=1/12 into Eq. 2: #x = 18/12*y #x = (3/2)*y #Square this equation and plug x^2 into Eq. 3: #x^2 = (9/4)*y^2 #4*(9/4)*y^2 + 9*y^2 = 32 #9*y^2 + 9*y^2 = 32 #18*y^2 = 32 #y^2 = 32/18 #y = +-4/3 #x = +-2 #Now, plug L=-1/12 into Eq. 2: #x = 18/(-12)*y #x = (-3/2)*y #Square this equation and plug x^2 into Eq. 3: #x^2 = (9/4)*y^2 #4*(9/4)*y^2 + 9*y^2 = 32 #9*y^2 + 9*y^2 = 32 #18*y^2 = 32 #y^2 = 32/18 #y = +-4/3 #x = -+2 #So, our critical points are (4/3,2), (-4/3,2), (4/3,-2) and (-4/3,-2) #Plug each into the function: #f(4/3,2) = 8/3 #f(-4/3,2) = -8/3 #f(4/3,-2) = -8/3 #f(-4/3,-2) = 8/3 #ANSWER:The maximum value of the function with the constraint is 8/3, #and the minimum value is -8/3 #Exercise 9: #First, we find the gradients of both of the functions: #grad(f) = = <2*x, 2*y> #grad(g) = = <4*x^3, 4*y^3> #We then introduce a constant L that makes grad(f) a multiple of #grad(g), like so: #grad(f) = L*grad(f) #<2*x, 2*y> = L*<4*x^3, 4*y^3> #We have a system of equations: #Eq. 1: 2*x = 4*L*x^3 #Eq. 2: 2*y = 4*L*y^3 #Eq. 3: x^4 + y^4 = 1 #Because we have 3 equations and 3 unknowns, we can solve for L, x, and y: #We can already see that either x or y are 0, but not both. #If x=0, y = 1 and -1 #If y=1, x = 1 and -1 #Looking at Eq. 1: #2*x = 4*L*x^3 #x = 2*L*x^3 #1/(2*L) = x^2 #x = sqrt(1/(2*L)) #Same operations for y: #y = sqrt(1/(2*L)) #Plug them into the Eq. 3: #(sqrt(1/(2*L)))^4 + (sqrt(1/(2*L)))^4 = 1 #1/(4*L^2) + 1/(4*L^2) = 1 #2/(4*L^2) = 1 #2 = 4*L^2 #L^2 = 1/2 #L = +- sqrt(1/2) #Plug both values into the equation for x: #x = sqrt(1/(2*sqrt(1/2))) = 1/(2^(1/4)) #x = sqrt(1/(-2*sqrt(1/2))) = -1/(2^(1/4)) #And y: #x = sqrt(1/(2*sqrt(1/2))) = 1/(2^(1/4)) #x = sqrt(1/(-2*sqrt(1/2))) = -1/(2^(1/4)) #So, our points are (+-1/(2^(1/4)), +-1/(2^(1/4))), (+-1,0), and (0,+-1) #We plug in each point into the function: #f(+-1/(2^(1/4)), +-1/(2^(1/4))) = (1/(2^(1/4))^2 + (1/(2^(1/4))^2 = # = 1/sqrt(2) + 1/sqrt(2) = 2/sqrt(2) = sqrt(2) #f(+-1,0) = 1 #f(0,+-1) = 1 #ANSWER: The maximum value of the function with the constraint is sqrt(2), #and the minimum value is 1 #Exercise 11: #First, we find the gradients of both of the functions: #grad(f) = = <3,2,4> #grad(g) = = <2*x,4*y,12*z> #We then introduce a constant L that makes grad(f) a multiple of #grad(g), like so: #grad(f) = L*grad(f) #<3,2,4> = L*<2*x,4*y,12*z> #We have a system of equations: #Eq. 1: 2*L*x = 3 #Eq. 2: 4*L*y = 2 #Eq. 3: 12*L*z = 4 #Eq. 4: x^2 + 2*y^2 + 6*z^2 = 1 #Because we have 4 equations and 4 unknowns, we can solve for L, x, y, and z: #Square Eq. 1: #(2*L*x = 3)^2 #4*L^2*x^2 = 9 #x^2 = 9/(4*L^2) #Square Eq. 2: #(4*L*y = 2)^2 #16*L^2*y^2 = 4 #y^2 = 1/(4*L^2) #Square Eq. 3: #(12*L*z = 4)^2 #144*L^2*z^2 = 16 #z^2 = 1/(9*L^2) #Plug the values for x^2, y^2, and z^2 into Eq. 4: #x^2 + 2*y^2 + 6*z^2 = 1 #9/(4*L^2) + 2*(1/(4*L^2)) + 6*(1/(9*L^2)) = 1 #Multiply both sides by 36: #81/L^2 + 18/L^2 + 24/L^2 = 36 #(81 + 18 + 24) = 36*L^2 #123 = 36*L^2 #L = sqrt(123/36) #Plug L into the equations for x^2, y^2, and z^2 #x^2 = 9/(4*(sqrt(123/36))^2) #x^2 = 9/(4*(123/36)) #x^2 = 9/(123/9) #x^2 = 81/123 #x = +-9/sqrt(123) #y^2 = 1/(4*(sqrt(123/36))^2) #y^2 = 1/(4*(123/36)) #y^2 = 1/(123/9) #y^2 = 9/123 #y = +-3/sqrt(123) #z^2 = 1/(9*(sqrt(123/36))^2) #z^2 = 1/(9*(123/36)) #z^2 = 1/(123/4) #z^2 = 4/123 #z = +-2/sqrt(123) #So, our possible points are (+-9/sqrt(123), +-3/sqrt(123), +-2/sqrt(123)) #Because f(x,y,z) is just adding the three variables together, the maximum #will occur when all three are positive, and the minimum will occur when #all three are negative: #f(+9/sqrt(123), +3/sqrt(123), +2/sqrt(123)) = # = 3*9/sqrt(123) + 2*3/sqrt(123) + 4*2/sqrt(123) = # = (27 + 6 + 8)/sqrt(123) = 41/sqrt(123) #f(-9/sqrt(123), -3/sqrt(123), -2/sqrt(123)) = # = -3*9/sqrt(123) - 2*3/sqrt(123) - 4*2/sqrt(123) = # = (-27 - 6 - 8)/sqrt(123) = -41/sqrt(123) #ANSWER: The maximum value of the function with the constraint is 41/sqrt(123), #and the minimum value is -41/sqrt(123) #Exercise 13: #First, we find the gradients of both of the functions: #grad(f) = = #grad(g) = = <2*x,2*y,2*z> #We then introduce a constant L that makes grad(f) a multiple of #grad(g), like so: #grad(f) = L*grad(f) # = L*<2*x,2*y,2*z> #We have a system of equations: #Eq. 1: y = 2*L*x #Eq. 2: x = 2*L*y #Eq. 3: 2 = 2*L*z #Eq. 4: x^2 + y^2 + z^2 = 36 #Because we have 4 equations and 4 unknowns, we can solve for L, x, y, and z: #Plug Eq. 2 into Eq. 1: #y = 2*L*2*L*y #4*L^2 = 1 #L^2 = 1/4 #L = +-(1/2) #First, plug L=1/2 into each equation: #y = x #x = y #z = 2 #Plug y=x and z=2 into Eq. 4 and solve for x: #x^2 + x^2 + 2^2 = 36 #2*x^2 = 32 #x = +-4 #y = +-4 #z = 2 #So, some of our points are (4,4,2) and (-4,-4,2) #Now, plug in L=-(1/2) instead: #y = -x #x = -y #z = -2 #Plug y=-x and z=2 into Eq. 4 and solve for x: #x^2 + x^2 + 2^2 = 36 #2*x^2 = 32 #x = +-4 #y = -+4 #z = -2 #So, our critical points are (4,4,2), (-4,4,-2), (4,-4,-2) and (-4,-4,2) #Plug each of them into the function: #f(4,4,2) = 4*4 + 2*2 = 16 + 4 = 20 #f(-4,4,-2) = (-4)*(4) + 2*(-2) = -16 - 4 = -20 #f(4,-4,-2) = (4)*(-4) + 2*(-2) = -16 - 4 = -20 #f(-4,-4,2) = (-4)*(-4) + 2*2 = 16 + 4 = 20 #ANSWER: The maximum value of the function with the constraint is 20, #and the minimum value is -20 #Exercise 15: #First, we find the gradients of both of the functions: #grad(f) = = #grad(g) = = <2*x,2*y,2*z> #We then introduce a constant L that makes grad(f) a multiple of #grad(g), like so: #grad(f) = L*grad(f) # = L*<2*x,2*y,2*z> #We have a system of equations: #Eq. 1: y+z= 2*L*x #Eq. 2: x = 2*L*y #Eq. 3: x = 2*L*z #Eq. 4: x^2 + y^2 + z^2 = 4 #Because we have 4 equations and 4 unknowns, we can solve for L, x, y, and z: #Eq. 2 and Eq. 3 are equal: #2*L*y = 2*L*z #y = z #Go back to Eq. 1: #y+z= 2*L*x #y+y = 2*L*2*L*y #2*y = 4*L^2*y #4*L^2 = 2 #L^2 = 1/2 #L = +-sqrt(1/2) #Go back to equations 2 and 3: #y = x/(2*L) #y = x/(2*sqrt(1/2)) #z = x/(2*L) #z = x/(2*sqrt(1/2)) #Plug them into Eq. 4: #x^2 + (x/(2*sqrt(1/2)))^2 + (x/(2*sqrt(1/2)))^2 = 4 #x^2 + x^2/2 + x^2/2 = 4 #2*x^2 = 4 #x^2 = 2 #x = +-sqrt(2) #y = +-sqrt(2)/(2*sqrt(1/2)) #y = +-1 #z = +-1 #Now, do this with L=-sqrt(1/2): #y = x/(2*L) #y = x/(-2*sqrt(1/2)) #z = x/(2*L) #z = x/(-2*sqrt(1/2)) #Plug them into Eq. 4: #x^2 + (x/(-2*sqrt(1/2)))^2 + (x/(-2*sqrt(1/2)))^2 = 4 #x^2 + x^2/2 + x^2/2 = 4 #2*x^2 = 4 #x^2 = 2 #x = +-sqrt(2) #y = +-sqrt(2)/(-2*sqrt(1/2)) #y = -+1 #z = -+1 #So, our possible critical points (sqrt(2), 1, 1), (sqrt(2), -1, -1), #(-sqrt(2), 1, 1), and (-sqrt(2), -1, -1) #Plug them both into the function: #f(sqrt(2), 1, 1) = sqrt(2) + sqrt(2) = 2*sqrt(2) #f(sqrt(2), -1, -1) = -sqrt(2) - sqrt(2) = -2*sqrt(2) #f(-sqrt(2), 1, 1) = -sqrt(2) - sqrt(2) = -2*sqrt(2) #f(-sqrt(2), -1, -1) = sqrt(2) + sqrt(2) = 2*sqrt(2) #ANSWER: The maximum value of the function with the constraint is 2*sqrt(2), #and the minimum value is -2*sqrt(2)