Variational formulations for functionally graded nonlocal Bernoulli–Euler nanobeams