Computational Physics, Python, Interpolation, Differentiation, Integration.
when we go to negative values of given that we only used positive values initially: x_neg=np.linspace(-np.pi,np.pi,400) plt.plot(x_neg,f_ext(x_neg),color='blue') plt.plot(x_neg,np.sin(2*x_neg**2),color='darkorange') plt.show() plt.plot(x_neg,abs(f_ext(x_neg)-np.sin(2*x_neg**2)),color='darkorange')