'Arguments:
d     - A list of two elements, where d[0] represents x and d[1] represents y
in the following equation.
sign - A multiplier for f.  Since we want to optimize it, and the scipy
optimizers can only minimize functions, we need to multiply it by
-1 to achieve the desired solution
Returns:
2*x*y + 2*x - x**2 - 2*y**2'

def fun(self, d, sign=1.0):

    x = d[0]
    y = d[1]
    return (sign * (((((2 * x) * y) + (2 * x)) - (x ** 2)) - (2 * (y ** 2))))
