Python Basics
Objective: Let us consider the given function as f(x,y) = 5−(x−2)^2−2⋅(y−1)^2 and the constraint as g(x,y) = x+4y−3 We can use Lagrange multipliers to find the maximum or minimum value of the function. i.e, L = f-λg Then we have to differentiate L w.r.t x and y and equate it to zero,which…