I intend to plot the following function:
X = [x, y]
f = c'X + norm(c)* (sum(cos^2(X)) - sum(log(b-aX))
c = [7,2]
a = [2,3;4,6]
b = [10, 50]
So I want to get this
7x+2y+7.2*(cos^2(pi*x)+cos^2(pi*y))-(log(10-2x-3y)+ log(50-4x-6y)+log(x)+log(y))
How to plot the above function,when, let's say, -5<=x<=5 and -3<=y<=2?
I have tried the following:
import numpy as np
import matplotlib.pyplot as plt
from sympy import symbols
x,y = symbols(['x','y'])
c = np.array([7,2])
A = np.array([[2,3],[4,6]])
b = np.array([10,50])
So what to do next?? I don't know whether to use linspace??
plt.plot(A*x+norm*(np.sum(np.cos^2(pi*x))-np.sum(log10(b-A*x))
