I have some problems with plot. Exatlct solution here is true, but eulerbmethod gives the same curve, but much lower
import numpy as np
import matplotlib.pyplot as plt
# Define parameters
f = lambda x, y: 2*x
h = 0.1
x = np.arange(-10, 10, h)
x0 = 0
y0 = 2
# Explicit Euler Method
y = np.zeros(len(x))
y[x0] = y0
for i in range(0, len(x) - 1):
y[i + 1] = y[i] + h*f(x[i], y[i])
plt.figure(figsize=(12, 8))
plt.plot(x, y, 'b--', label='Euler')
plt.plot(x, 2+x**2, 'g', label='Exact')
plt.title('Numerical integration methods')
plt.xlabel('x')
plt.ylabel('y')
plt.grid()
plt.legend()
plt.show()