MATHEMATICAL MODELLING IN NANOTECHNOLOGY USING CALCULUS OF VARIATIONS