#!/usr/bin/python3
# A function which is difficult to integrate by conventional means
import numpy as np
import matplotlib.pyplot as plt
def f(x):
return np.sin(1 / x / (1 - x))**2
N = 10000000
favg = 0.0
for i in range(N):
favg += f(np.random.random())
I = favg/N
print(I)