import numpy as np import matplotlib.pyplot as plt def f(x): return x**2 + 10*np.sin(x) x = np.arange(-10, 10, 0.1) plt.plot(x, f(x))