By the second century, in the Almagest, Ptolemy provides a modern conception of "mathematics" as a "science":
'Mathematics' … is an attribute of all existing things, without
exception, both mortal and immortal: for those things which are
perpetually changing … it changes with them, while for eternal
things … it keeps their unchanging form unchanged.
When was the term "mathematics" first used in this way?
Best Answer
It seems the term "mathematics" has been used to express different things at different times, historically. The name itself - "mathematics" - is Greek in origin, and at that point in time, mathematics encompassed much more than it does today in terms of its breadth.
See the entry on Wikipedia: Etymology of term "mathematics".
See also the entry, History of Mathematics, which includes the following assertion:
This may provide a start, and provides further resources, if you scroll down. (The link is to a subsection of the entry "Mathematics".
Also of interest is Earliest Known Uses of Mathematical Words, a site maintained by Jeff Miller, where you can find the origins of the use of many mathematical terms. Click on "M", then scroll down to "mathematics". (This addresses the question in your post's title.) I'll quote the start of that entry: