No analytic function predicts these curves exactly: too many unmeasurable influences and complex relationships (caching, compiler, pipelining).
Furthermore, we can't use these algorithms to square numbers larger than a million or so because we run out of room in our integer variables.