I have the function $\displaystyle f(x) = x^2$, is there a way to measure the length of the line between $\displaystyle (0,0)$ and $\displaystyle (2,4)$ ?
Yes, that's possible with integration.
The arc length of a function f(x) between x = a and x = b is given by:
$\displaystyle \ell = \int\limits_a^b {\sqrt {1 + f'\left( x \right)^2 } dx} $
In your case (I omitted the calculation), the result is:
$\displaystyle
\ell = \int\limits_0^2 {\sqrt {1 + 4x^2 } dx} = \frac{1}{4}\ln \left( {\sqrt {17} + 4} \right) + \sqrt {17} \approx 4.647
$