Curiously, real analysis and calculus are better expressed in terms of partial functions $f: \mathbb R \to \mathbb R$, which have a domain $ D(f)$ and a range $ R(f)$. I'll just use the name function for these. Then an injective function $f$ has an inverse $f^{-1} $, and $D(f^{-1}) = R(f), R(f^{-1}) = D(f)$. Of course the function sin is not injective but its restriction to the interval $[-\pi/2, +\pi/2]$ is injective and its inverse is our old friend sin$^{-1}$. We also have the empty function, given by, for example, log(log(sin $x$))). Notice that the solution of a first order differential equation is usually a partial function.
Because of this, you would think that the functional analysis of partial functions would be well developed, and even significant, but I think it barely exists. A research student and I wrote a paper
A,M. Abd-Allah and R. Brown, ``A compact-open topology on partial maps with open domain'', J. London Math Soc. (2) 21 (1980) 480-486.
(and the closed domain case is also interesting and useful) but it is not so easy to see how to deal with functions with quite general domains! Nonetheless, a search on "spaces of partial maps" gives quite a few hits.