Definition of derivative of real function in baby Rudin Let $f$ be defined (and real-valued) on $[a,b]$. For any $x\in [a,b]$ form a quotient $$\phi(t)=\dfrac{f(t)-f(x)}{t-x} \quad (a<t<b, t\neq x),$$ and define $$f'(x)=\lim \limits_{t\to x}\phi(t),$$ provided this limit exists in accordance with Defintion 4.1. 
I have one question. Why Rudin considers $t\in (a,b)$? What would be if $t\in [a,b]?$
 A: the limit is defined at $a$ if there is a neighbourhood for $a$ that the function defined for all $x$ in that neighbourhood, for the limit
$f'(x)=\lim \limits_{t\to x}\phi(t)$ to exist on $a$ and $b$ we need that $\phi(t)$ defined for all $x$ in some neighbourhood of $a$,but it is impossible if $a$ and $b$ are the endpoints of $f(x)$ domain,so if you want to consider the limit at $a$ and $b$ you need to add that as one-sided limit.
A: In short, this is an example of Rudin's sublime succinctness. His definition includes the usual two-sided definition when $x \in (a,b)$ and also the one-sided definition $x = a$ or $x = b$. To get the one-sided definition, notice that he requires $t \in (a,b)$. 
Rudin was perhaps over-succinct in that he failed to mention that when $x = a$ or $x = b$, you have to interpret the limit as being one-sided. (Does Thm 4.1 include this?)
A: To answer your question directly, it doesn't matter.
Since we need the limit $t \to x$, we only really need to worry about $t$ close to (but different from) $x$. If $x$ is closer to $a$ instead of $b$ (but different from $a$), then we can worry about
$$|x - t| < 1/2 |x - a| \le 1/2 | x - b |.$$
This means $t \neq a$ and $t \neq b$.
You can think of something similar for $x = a$ or $x = b$.
