The non-parametric integral of the calculus of variations as a Weierstrass integral. I. Existence and representation