3

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 ?

across
  • 609
  • 2
    Relative error, not absolute error. – TonyK Jul 12 '20 at 15:04
  • 1
    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. – Bernard Jul 12 '20 at 15:04
  • 1
    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. – Izaak van Dongen Jul 12 '20 at 15:05
  • @IzaakvanDongen thank you! I see only one number for relative error, but if I understand correctly, you seem to suggest something like least squares approximation? I still don't get it :( – across Jul 12 '20 at 15:07
  • Also I feel the expression for relative error should look : $$\dfrac{f(x) - (mx+b)}{\color{red}{f(x)}}$$ – across Jul 12 '20 at 15:11
  • 1
    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$. – Izaak van Dongen Jul 12 '20 at 15:12
  • @IzaakvanDongen ok I see why you said an area around it earlier. but when we take the limit, it is exactly at $x=1$. If I may ask here, how does the limit capture area around it? My brain automatically jumps to the conclusion that the limit cannot know the error magnitudes in neighborhood, eventhough it depends on the smoothness. pardon if I'm using the math words all wrong... – across Jul 12 '20 at 15:18
  • 1
    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$. – Izaak van Dongen Jul 12 '20 at 15:21
  • @IzaakvanDongen ohk but since for continuous functions the limit actually equals $f(a)$, doesn't this mean all the straight lines going through the point $(x_0, f(x_0))$ should make the relative error $0$ in the limit? really appreciate your patience:) – across Jul 12 '20 at 15:26
  • I mean if we are very very close to the point $(x_0, f(x_0))$, all the straight lines going through the point $(x_0, f(x_0))$ should give the same relative error value $\approx 0$. I don't see how tangent line is special – across Jul 12 '20 at 15:29
  • 1
    But the relative error is $(f(x) - f(x_0)) / (x - x_0)$, which we define on $\Bbb R \setminus {x_0}$, and you definitely can't just plug in $x = x_0$. Remember the $x^2$ example shows why we're interested in relative error and not absolute error. You're right in saying that any intersecting line has absolute error tending to zero, which is why we use a more discriminatory metric. – Izaak van Dongen Jul 12 '20 at 15:32
  • 1
    @IzaakvanDongen I get it XD if you have time and post as answer I'd love to accept it best answer. Thank you so much you're awesome :D – across Jul 12 '20 at 15:35

1 Answers1

1

(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$.

Michael Hoppe
  • 18,103
  • 3
  • 32
  • 49