Is there a correct mathematical way to prove the arc length integral from the pythagorean theorem? It might not be clean what do I mean by the question, but I'm trying to explain it:
By the pythagorean theorem:
$$\mathrm{d}S=\sqrt{(\mathrm{d}x)^2+(\mathrm{d}y)^2}$$
If we factor out d$x$:
$$\mathrm{d}S=\sqrt{1+\left(\frac{\mathrm{d}y}{\mathrm{d}x}\right)^2}\mathrm{d}x$$
So the arc length is:
$$S=\int\limits_a^b \sqrt{1+\left(\frac{\mathrm{d}y}{\mathrm{d}x}\right)^2}\mathrm{d}x$$
But it does not seem like a real proof.
 A: Let $a=x_0< x_1 < \cdots < x_n =b$ be a partition of $[a,b]$.
Define arc length as;
\begin{equation}
S_n = \sum_{i=1}^n \sqrt{(x_i-x_{i-1})^2+(f(x_i)-f(x_{i-1}))^2}
\end{equation}
Recall Mean Value Theorem;
\begin{equation}
\frac{f(x_i)-f(x_{i-1})}{x_i-x_{i-1}} = f'(\tilde{x_i}) \iff 
f(x_i)-f(x_{i-1}) = f'(\tilde{x_i})(x_i-x_{i-1})
\end{equation}
for some $x_{i-1}\leq\tilde{x_i}\leq x_i$. Now, rewrite $S_n$;
\begin{equation}
S_n = \sum_{i=1}^n \sqrt{ (x_i-x_{i-1})^2+f(\tilde{x_i})^2(x_i-x_{i-1})^2}
=\sum_{i=1}^n \sqrt{1+f'(\tilde{x_i})^2}(x_i-x_{i-1})
\end{equation}
Which is a Riemann Sum. Now take limit;
\begin{equation}
\lim_{n\to\infty}S_n = \int_a^b\sqrt{1+f'(x)}dx
\end{equation}  
Note that I replaced $y$ with $f(x)$. Also, when taking limit, I identify partition with number of elements $n$, but we actually require $(x_i-x_{i-1})\to 0$.
A: This is the heuristic way of doing things---which nonetheless helps a lot in some cases. The problem here is that you are considering $dx$ and $dy$ as 'infinitesimal' quantities, which is not so rigorous. Some problems: suppose $dx$ to be positive. Then the integral is actually a finite sum and the 'length' of the curve is only approximated by the sum of the lengths of straight segments. Then $dx$ should be something positive but less than all the positive numbers, which gives a contradiction. Hence $dx = 0$, which does not allow you to divide by $dx$. In all cases something goes wrong. 
In general the formula you state is formalized using a metric and the concept of derivative, which involves a limit and is formal from a topological point of view. If $\gamma \colon [a,b] \rightarrow \mathbb{R}^n$ is (at least) a $C^1$ curve, then its length is given by
$$\mathcal{L}_a^b(\gamma):=\int_a^b ||\gamma'(t)||_g\  dt.$$
The metric used does not need to be the standard one, that is why I put a $g$ as a lower script---it denotes a generic metric on $\mathbb{R}^n$. In the particular case where $g$ is standard, $n=2$ and $\gamma(t) = (t,f(t)), \ f\colon [a,b] \rightarrow \mathbb{R}$ (as in your example) you get your formula
$$\int_a^b \sqrt{1+f'(t)}\ dt.$$ 
About technical details: https://en.wikipedia.org/wiki/Arc_length
A: $dS=\lim_{x\rightarrow x_o}(\sqrt{(x-x_o)^2+(y(x)-y(x_o))^2})$
$dS=\lim_{x\rightarrow x_o}((x-x_o)\sqrt{1+(\frac{y(x)-y(x_o)}{x-x_o})^2})$
$dS=\lim_{x\rightarrow x_o}(x-x_o)\lim_{x\rightarrow x_o}\sqrt{1+(\frac{y(x)-y(x_o)}{x-x_o})^2}$
$dS=dx\lim_{x\rightarrow x_o}\sqrt{1+(\frac{y(x)-y(x_o)}{x-x_o})^2}$
$dS=dx\sqrt{1+(\frac{dy}{dx})^2}$
Then integrate both sides
$S-0=S=\int_a^b{\sqrt{1+(\frac{dy}{dx})^2}}dx$
