runge.py

import numpy as np

def runge(x):
        return  1/(1+x**2)

# test it
if __name__ == '__main__':
        # plot the function
        import matplotlib.pyplot as plt
        x = np.linspace(-5,5,300)
        y = runge(x)
        plt.plot(x,y, 'b',lw=2,alpha=0.5)
        plt.xlim(-5,5)
        plt.ylim(0,1)
        plt.grid()
        plt.show()