Sharp upper bounds on the dimension of the Lie algebra of infinitesima
l variational and divergence point symmetries of a non-trivial Lagrang
ian L(x, u, u',..., u(n))(x, u is-an-element-of R) of arbitrary order
n are found. For any given order, all Lagrangians whose Lie algebra of
variational or of divergence symmetries is of maximal dimension are c
ompletely classified, modulo local point transformations. It is shown,
in particular, that for n greater-than-or-equal-to 2 the algebra of v
ariational symmetries of the generalized free particle Lagrangian (u(n
))2 is not of maximal dimension, whereas when n = 1 there are several
Lagrangians admitting a variational symmetry algebra of maximal dimens
ion and generating differential equations different from the free part
icle equation. A connection between variational problems on the line a
nd scalar evolution equations in one time and one space variables is a
lso established, showing that Lagrangians with a variational symmetry
algebra of maximal dimension correspond to evolution equations with a
maximal Lie algebra of time-preserving time-independent infinitesimal
point symmetries. The technique used in the proof of the above results
is applied to give a simple proof of the fact that an ordinary differ
ential equation of order n > 2 has a symmetry algebra of maximal dimen
sion if and only if it is locally equivalent under a point transformat
ion to the generalized free particle equation u(n) = 0.