Can't solve the differential equation x^2 - a = 0? Why not just introduce a function sqrt(a) as its solution! Problem solved.
Can't solve the differential equation y'' = -y? Why not just introduce a function sin(x) as its solution! Problem solved.
A lot of 19th century mathematics was essentially this: discover which equations had solutions in terms of things we already knew about, and if they didn't and it seemed important or interesting enough, make a new name. This is the whole field of so-called "special functions". It's where we also get the elliptic functions, Bessel functions, etc.
The definition of "elementary function" comes exactly from this line in inquiry: define a set of functions we think are nice and algebraically tractable, and answer what we can express with them. The biggest classical question was:
Do integrals of elementary functions give us elementary functions?
The answer is "no" and Liouville gave us a result which tells us what the answer does look like when the result is elementary.Risch gave us an algorithm to compute the answer, when it exists in elementary form.