Theory of real numbers and using functions If I want to develop formally theory of real numbers, I start with the axioms of real numbers and then, using logical laws, I can prove or disprove statements about real numbers.
But I cannot define what is a function from $\mathbb{R}$ to $\mathbb{R}$, using only logic formalism.
If I want to study functions from $\mathbb{R}$ to $\mathbb{R}$, I need axioms of the theory of functions from $\mathbb{R}$ to $\mathbb{R}$
Which is this set of axioms ?
 A: Let's say you also want to be able to talk about integers, that is, you want to be able to say things like "every integer is the sum of four squares of integers." Then the theory you describe would usually be called third-order arithmetic (which is, despite the name, a first-order logical theory). However, although you're not looking at objects of arbitrarily high rank yet - e.g., functions from (functions from reals to reals) to (functions from reals to reals), etc. - at this point it's probably best just to leap to full set theory, ZFC (or similar). ZFC has been extensively studied on its own; to the best of my knowledge, third-order arithmetic has not.
Of course, between third-order arithmetic and ZFC there are many other theories, but I would really just take the plunge all the way to ZFC at this point: as soon as you start talking about general functions of real numbers, set theory is going to creep in anyways. (E.g., the continuum hypothesis is a statement of third-order arithmetic.)

EDIT: Actually, let me be direct: OP, you should learn ZFC! Set theory will really help you understand what's going on when we talk about complicated objects like functions of functions of . . .  etc. And certainly ZFC isn't the only game in town, but it's by far the dominant one for now at least.
A: A function $f$ mapping set $A$ to set $B$ is a set $f$ of ordered pairs such that: 


*

*$\forall x,y:[(x,y)\in f \implies x\in A \land y\in B]$

*$\forall x:[x\in A\implies \exists y:[y\in B \land (x,y)\in f]]$    

*$\forall x,y_1,y_2:[(x,y_1)\in f \land
        (x,y_2)\in f \implies y_1=y_2]$
Having established that $f$ is such a function, we can write $f:A\to B$ or $\forall x:[x\in A \implies f(x)\in B]$
