The word FUNCTION first appears in a Latin manuscript "Methodus tangentium inversa, seu de fuctionibus" written by Gottfried Wilhelm Leibniz (1646-1716) in 1673. Leibniz used the word in the non-analytical sense, as a magnitude which performs a special duty. He considered a function in terms of "mathematical job" -- the "employee" being just a curve. He apparently conceived of a line doing "something" in a given _figura_ ["aliis linearum in figura data functiones facientium generibus assumtis"]. From the beginning of his manuscript, however, Leibniz demonstrated that he already possessed the idea of function, a term he denominates _relatio_.
A paper "De linea ex lineis numero infinitis ordinatim..." in the _Acta Eruditorum_ of April 1692, pp. 169-170, signed "O. V. E." but probably written by Leibniz, uses _functiones_ in a sense to denote the various 'offices' which a straight line may fulfill in relation to a curve, viz. its tangent, normal, etc.
In the _Acta Eruditorum_ of July 1694, "Nova Calculi differentialis..." (page 316), Leibniz used the word function almost in its technical sense, defining function as "a part of a straight line which is cut off by straight lines drawn solely by means of a fixed point, and of a point in the curve which is given together with its degree of curvature." The examples given were the ordinate, abscissa, tangent, normal, etc. [Cf. page 150 of Leibniz' "Mathematische Schriften," vol. III, edited by C. I. Gerhardt, Berlin-Halle (Asher-Schmidt), 1849-63.]
In September 1694, Johann Bernoulli wrote in a letter to Leibniz, "quantitatem quomodocunque formatam ex indeterminatis et constantibus," although there is no explicit reference to the Latin term _functio_. The letter appears in "Mathematische Schriften."
On July 5, 1698, Johann Bernoulli, in another letter to Leibniz, for the first time deliberately assigned a specialized use of the term _function_ in the analytical sense, writing "earum [applicatarum] quaecunque functiones per alias applicatas PZ expressae." (Cajori 1919, page 211) [Cf. page 507 of Leibniz' "Mathematische Schriften," vol. III, edited by C. I. Gerhardt, Berlin-Halle (Asher-Schmidt), 1849-63. Also see pages 506-510 and 525-526]. At the end of that month, Leibniz replied (p. 526), showing his approval.
_Function_ is found in English in 1779 in Chambers' Cyclopedia: "The term function is used in algebra, for an analytical expression any way compounded of a variable quantity, and of numbers, or constant quantities" (OED2).
(Information for this entry was provided by Julio Gonzalez Cabillon and the OED2.)