I found a similar question and a beautiful answer here. However I'm not able to fully understand the answer and have a question on the selected answer at:
enter image description here

Consider all the lines going through point $(x_0,f(x_0))$. For every line, the relative error should approach $0$ as $x$ approaches $0$ because all these lines go through point $(x_0,f(x_0))$, the linear approximation equals the function at $x=x_0$. What is special about the tangent line in relation to the relative error? Why does Arturo say only the tangent line makes the relative error zero ?

  • 2
    $\begingroup$ Relative error, not absolute error. $\endgroup$ – TonyK Jul 12 at 15:04
  • 1
    $\begingroup$ The equation $y=\ell(x)$ of the tangent line at $x_0$ is the only line equation such that $f(x)-\ell(x)=o(x-x_0)$, in terms of asymptotic analysis. $\endgroup$ – Bernard Jul 12 at 15:04
  • 1
    $\begingroup$ The relative error is the error in the approximating function is divided by how closely you're looking. This encapsulates that we want the tangent line to be very close to the function not just at the point of intersection, but in an area around it. $\endgroup$ – Izaak van Dongen Jul 12 at 15:05
  • 1
    $\begingroup$ It's not exactly the same thing as least squares, but it's a similar idea. Let's try and approximate $y = x^2$ at $x = 1$. Both of the functions $f(x) = 2x - 1$ and $g(x) = x$ coincide with the curve at $x = 1$, but clearly $f$ is a much better approximation. Arturo's answer says that a way to encapsulate this is "if we go a tiny bit away from $1$, $f$ is still a good approximation". $f$ and $g$ are both still close, but for example $f(1.0001)$ is much closer than $g(1.0001)$ if you compare the difference to the offset $0.0001$. $\endgroup$ – Izaak van Dongen Jul 12 at 15:12
  • 1
    $\begingroup$ Ah, that's not true! $\lim_{x \to a} f(x)$ has a distinctly different meaning to $f(a)$. In fact, it basically means exactly "what value does $f(x)$ get arbitrarily close to in areas around $a$, but not containing $a$". This is why the denominator in the limit definition of the derivative looks like $0$ - it doesn't actually get to be $0$, the limit just asks what happens if it gets close to $0$. $\endgroup$ – Izaak van Dongen Jul 12 at 15:21

(A bit too long for a comment)

Why only consider straight lines passing through $(x_0,f(x_0))$? Just consider any (continuous) function $g$ passing through $(x_0,f(x_0))$. Let $f$ and $g$ be defined on the same open set $A$.

We may define for any $x_0\in A$:

$$\text{$g$ touches $f$ in $x_0$} \iff \lim_{x\to x_0}\frac{|f(x)-g(x)|}{|x-x_0|}=0.$$ It is easy to show that amongst all functions $g$ that touch $f$ in $x_0$ there is at most one of the form $$x\mapsto f(x_0)+m(x-x_0),\text{ where $m$ is a linear function,}$$ which is called the derivative of $f$ in $x_0$.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.