In this work, additional boundary conditions are derived for bending of nonlocal beam by using the variational method. The potential energy is calculated for a nonlocal beam. Applying the principle of minimum potential energy we want to find the displacement which minimizes the potential energy. This gives the Euler-Lagrange equation plus a boundary condition equation. An example is solved. As is well-known that nanotechnology is the engineering of functional systems at the molecular scale. The results are used to display that nonlocal effects could be significant in nanotechnology. The presented solution should be useful to engineers who are designing nanostructures.