Why is the rational number system inadequate for analysis? In the very first chapter of Principles of Mathematical Analysis, the author pointed out as follows:

The rational number system is inadequate for many purposes, both as a field and as an ordered set. For instance, there is no rational $p$ such that $p^{2}=2$...

However, considering the fact that the rational number is indeed a field, It seems unclear to me in what perspective it is inadequate for a satisfactory discussion of analysis.
 A: Consider the sequence
$$
x_{n+1} = \dfrac12\left(x_n+\dfrac{2}{x_n}\right)
$$
When $x_0$ is rational, all $x_n$ are rational.
The sequence is a Cauchy sequence but does not converge in the rationals because the limit is $\sqrt 2$ when $x_0>0$.
For further discussion of how the rationals fail to be adequate for analysis, see A Companion to Analysis by Körner. Chapter 1 is freely available and contains some of that discussion.
A: Why is the rational number system inadequate for analysis?
Look at the picture below which shows the graph of a "continuous function" (intuitively, a function whose graph is an unbroken whole, without interruption).

Fundamental Property (FP): The points $(a,f(a))$ and $(b,f(b))$ are connected by a "continuous curve". Since the point $(a,f(a))$ is above the $x$-axis and the point  $(b,f(b))$ is below the $x$-axis, there is a ponit $(c,0)$ where the curve crosses the $x$-axis.

Is the Fundamental Property true? Well, at least it should be true. According to Michael Spivak:

If the pictures we draw have any connection with the mathematics we do, if our notion of continuous function corresponds to any degree with our intuitive notion, the Fundamental Property have got to be true in our theory. (Spivak's book).

Unfortunate Fact: The rational number is indeed a (ordered) field, but the properties of an ordered field are insufficient to prove the Fundamental Property. Even more, we can prove that the Fundamental Property is not valid in the context of $\mathbb Q$.
Conclusion: The Fundamental Property is a result that we want to be true because our intuition of continuity says that it should be true. Building our theory of continuity on the basis of the rational numbers, the Fundamental Property fails. So, the rational number system is not adequate for analysis.
Of course, we can define the fundamental concepts of Analysis (limits, continuity, derivability, integrability) in the context of $\mathbb Q$ and prove some things. But there are a lot of results that depends on the Fundamental Property. If we abandon it, we can't move on; the development of theory stops.


The above discussion refers to the context of continuity. However, similar arguments applies to other analysis issues. Here is an illustration in the context of the integration:
The development of the Integration is based in (some variant of) the following idea:

The area of a circular region can be approximated by an $n$-sided inscribed polygon.
  
Let $A_n$ be the area of the $n$-sided inscribed polygon. As $n$ increases, $A_n$ becomes closer and closer to the area of the circle. (Larson, Stewart)

If we want formalize this idea, we need ensure that there exists a number (which we will call "area of the circle") being approximated. So, we need of the
Second Fundamental Property (SFP): every increasing sequence bounded above tends to a limit. 
Unfortunate Fact: the Second Fundamental Property is not valid in the context of $\mathbb Q$.
Conclusion: Building our theory of integration on $\mathbb Q$, many "well behaved" regions would not have a well defined area. This fact would be not satisfactory. So, $\mathbb{Q}$ is inadequate for a satisfactory discussion of analysis.


Remark: The FP and the SCP are equivalent and characterize the completeness of $\mathbb{R}$. As viewed above, is the absence of this characteristic that makes $\mathbb Q$ inadequate for analysis. The FP is know as the Intermediate Value Theorem and the SFP is know as the Monotone Convergence Theorem.
Remark 2: In short, my point is the following: The purpose of (elementary real) Analysis is to make the Calculus rigorous. The Calculus was developed on the basis of geometric intuition. In a world where there are only rational numbers, some of these intuitions fail (as shown above). So, in such world, these intuitions could not be made rigorous but would have to be abandoned. This is the reason why $\mathbb{Q}$ is not appropriate to do Analysis.
A: The problem with working in just the rationals is that they aren't complete. This means that there are Cauchy sequences in $\mathbb{Q}$ that don't converge or equivalently that given some bounded set, the $\sup$ or $\inf$ of that set don't necessarily lie in $\mathbb{Q}$.
This means that lots of key results in real analysis fail to be true when working over $\mathbb{Q}$ instead of $\mathbb{R}$. For example, functions that are continuous in $\mathbb{Q}$ don't necessarily have the intermediate value property. Consider $$f(x) =
    \begin{cases}
      -1, & x^2 < 2 \\
      1, & x^2 > 2
    \end{cases}$$
Since there isn't a rational such that $x^2 = 2$ we can prove that this function is continuous in $\mathbb{Q}$ but there isn't a $y$ such that $f(y) = 0$. 
The problem is that proofs of the intermediate value theorem typically either generate a Cauchy sequence using nested intervals and claim it converges or look at something like $\sup\{x: f(x)<0\}$. However both of these claims use completeness of the reals and so don't hold over the rationals. 
Other results fail in similar ways (or because they rely on IVT).
A: Many important theorems of calculus fail if you consider $\Bbb Q$ in place of $\Bbb R$. To name a few examples:
Intermediate value theorem: Function $f(x)=x^2$ is continuous and $f(1)=1,f(2)=4$ but for no rational number $p$ we have $f(p)=2$ (this is pretty much the example mentioned)

Bolzano-Weierstrass theorem: If you take any sequence of rational numbers which converges in $\Bbb R$ to an irrational (e.g. $3,3.1,3.14,3.141,3.1415,...$) then this is a bounded sequence with no subsequence convergent to a rational number.

Cauchy completeness, monotone convergence theorem: The above example also shows that a Cauchy sequence doesn't necessarily have a limit, and same goes for monotone sequences.

Extreme value theorem: The function $f(x)=x-x^3$ is clearly continuous on interval $[0,1]$, but doesn't achieve a maximum on this interval - indeed, as we go closer to $\frac{1}{\sqrt{3}}$ (which is not in $\Bbb Q$) we get values closer and closer to the supremum $\frac{2}{3\sqrt{3}}$ but we never achieve it.

Boundedness theorem: The function $f(x)=\frac{1}{x^2-2}$ is defined and continuous for every rational number, but it isn't bounded on a closed interval $[1,2]$.

Mean value theorem: The derivative of the function $f(x)=x-x^3$ is never zero for rational $x$, so it's impossible to find rational $\xi$ such that $f(1)-f(0)=f'(\xi)(1-0)$.
