import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 4, 100)
y = np.linspace(-2, 2, 100)
X, Y = np.meshgrid(x, y)
Z = X**3 + Y**3 - 2*X**2 - 4*Y**2 + 1

fig = plt.figure(figsize=(10, 7))
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X, Y, Z, cmap='viridis', alpha=0.8)
ax.set_xlabel('Parametrul X [0, 4]')
ax.set_ylabel('Parametrul Y [-2, 2]')
ax.set_zlabel('Eroarea (Funcția Obiectiv)')
plt.title('Suprafața funcției de eroare')
plt.show()