16
$\begingroup$

In school we've been told that derivative of $x^2$ is $2x$.

Also I've read that derivative is simply a speed of value change.

So if

$$f(x)=x^2$$ then, using simple explanation, derivative of that function would be

$$f'(x)=f(x+1)-f(x).$$

Now if we take derivative when $x=2$ we will get

$$f'(2)=f(2+1)-f(2)=3^2-2^2=9-4=5.$$

But if we will take conversion rule (from school) which says that $[x^2]'$ is $2x$ then

$$f'(x)=2x$$

and if we will put the same point here we will get

$$f'(2)=2*2=4$$

so first result gives me $5$ and second result gives me $4$. And this problem seems to be appearing for every number. Number calculated by simplified interpretation is always bigger by $1$.

And my only guess is that simplified explanation missing something. Or, maybe, I made a mistake somewhere.

Can you, please, help me figure it out?

Update: I spend 2 days trying to figure this out! Thanks to all of you, guys!!! Now i got it!))))

$\endgroup$
9
  • 13
    $\begingroup$ Try $\frac{f(x+\delta)-f(x)}\delta$ for different values of $\delta$ (in particular, small ones) instead of onyl for $\delta=1$. $\endgroup$ Aug 1, 2019 at 11:04
  • 9
    $\begingroup$ The derivative is defined as the limit of the difference as $\delta$ approaches zero. So far, you have only tried $\delta = 1$. So please, don't ever write $f'(x) = f(x+1) - f(x)$ because that is simply not true in general. $\endgroup$
    – Matti P.
    Aug 1, 2019 at 11:06
  • 7
    $\begingroup$ May I suggest watching 3Blue1Brown's video series called the 'Essence of calculus'? $\endgroup$
    – Toby Mak
    Aug 1, 2019 at 11:10
  • 1
    $\begingroup$ Just a comment: $f(x+1)-f(x)$ equals $2x+1$ and not $2x$, so it isn't $f'(x)$. $\endgroup$ Aug 1, 2019 at 12:42
  • 4
    $\begingroup$ You've essentially developed a forward Finite Difference approximation to $f'(x)$. For many real-world problems, finite differences are a good way to compute the derivatives, especially if an analytical form of $f(x)$ or $f'(x)$ doesn't exist (of course $\delta$ should be sufficiently small to provide an accurate approximation of $f'(x)$, as you've found out!) $\endgroup$
    – PGnome
    Aug 2, 2019 at 17:47

7 Answers 7

21
$\begingroup$

$f'(x)=f(x+1)-f(x)$

This is, as pointed out by 5xum, not true. Please read his answer to understand the definition of derivative, which states:

$$f'(x) :=\lim_{h\to 0} \frac{f(x+h)-f(x)}{h}$$

Let's try to compute this limit for any given point $x$

$$f'(x):=\lim_{h\to 0} \frac{f(x+h)-f(x)}{h} = \lim_{h\to 0} \frac{(x+h)^2-x^2}{h} = \lim_{h\to 0} \frac{2xh+h^2}{h} = \lim_{h\to 0} 2x+h = 2x$$

Note that, for $h=1$, we get indeed your value of $5$, but derivatives are about setting $h \to 0$, not settling for $h=1$

For further intuition, try drawing the parabola $y=x^2$, then draw the tangent line at $x=2$ and also the straight line joining $(2,4)$ and $(3,9)$. See the difference?

enter image description here

Look at how the red line has the slope you predicted (5), and it crosses the parabola at both $x=2$ and $x=3$ while the blue (slope 4) line only touches it at $x=2$, but stays closer to the parabola if you move away a bit. This illustrates that the true slope of the curve is $4$ rather than $5$

$\endgroup$
2
  • 11
    $\begingroup$ Thank you. "derivatives are about setting h→0, not settling for h=1" this line was essential for my understanding. $\endgroup$
    – MeelStorm
    Aug 1, 2019 at 13:41
  • 1
    $\begingroup$ @MeelStorm Wow! Now that I read it, it looks weird to me due do the similar appearence of "setting" and "settling" $\endgroup$
    – David
    Aug 1, 2019 at 13:43
17
$\begingroup$

then, using simple explanation, derivative of that function would be

$$f'(x)=f(x+1)-f(x).$$

Actually, no. What you describe would not be the speed of the change, it would simply be the change. The speed of the change would have to be "how much change happened" divided by "how long the change took place". So, the speed of change on an interval of length $1$ would be $$\frac{f(x+1) - f(x)}{1},$$ but the speed of change on an interval of length $0.5$ would be $$\frac{f(x+0.5)-f(x)}{0.5}$$ and in general, the speed of change on an interval of length $h$ would be $$\frac{f(x+h)-f(x)}{h}.$$


But all those expressions speak of a speed over a certain interval. The derivative is interested in speed at a given point, and is therefore calculated as

$$\lim_{h\to 0} \frac{f(x+h)-f(x)}{h}$$

$\endgroup$
1
  • $\begingroup$ Indeed, $f'(x) \approx f(x+1)-f(x).$ is only an approximation (and a very bad one in this case) $\endgroup$
    – David
    Aug 1, 2019 at 11:16
6
$\begingroup$

In school we've been told that derivative of $x^2$is $2x$.

Also I've read that derivative is simply a speed of value change.

There is something important missing in your definition. The correct one is:

Derivative is simply an instantaneous speed (or rate) of value change

To see what instantaneous means you can take $\Delta t$ an arbitrary time interval and see what happens when $\Delta t$ gets closer to $0$.

For any real number $\Delta t$ your value change between time $t$ and $t+\Delta t$ is

$$ f(t+\Delta t)-f(t)=(t+\Delta t)^2-t^2=(t^2+2t\Delta t+(\Delta t)^2)-t^2=2t\Delta t+(\Delta t)^2 $$ Now to get speed (or rate) of change you must divide it by the elapsed time between $t$ and $t+\Delta t$, which is $\Delta t$ : $$ \text{rate of change} = \frac{f(t+\Delta t)-f(t)}{\Delta t} = 2t + \Delta t $$ Finally to get the derivative, you must find the instantaneous rate of change, which means that you must find what happens when $\Delta t$ gets closer to zero:

From the previous expression it is clear that when $\Delta t\rightarrow 0$ you have $$ f'(t)=\text{instantaneous rate of change} = \text{rate of change when }\Delta t \rightarrow 0 = 2t + 0 = 2t $$ which is the expected result.


Your main errors were:

  • to compute the absolute value change $f(x+\Delta t)-f(x)$ and not the rate of change $\frac{f(x+\Delta t)-f(x)}{\Delta t}$

  • to "ignore" the instantaneous part of the definition, you used $\Delta t = 1$, a finite value instead of considering what happens for the limit case $\Delta t \rightarrow 0$

$\endgroup$
3
$\begingroup$

By your own words, the derivative is the speed (usually "rate") of change. And recall that a rate is how much one quantity changes when another one changes. E.g. a car's speed is an example of a rate, since it represents how much the distance changes for every change in time.

So, $f(x+1)-f(x)$ just represents "change" and doesn't take into account how this relates to another quantity. In particular, we want to know how much $f(x)$ changes when $x$ changes.

The derivative should then be something similar to $$\frac{\text{change in }f(x)}{\text{change in }x}$$

If we choose two points $x_1$ and $x_2$, the change between them is $x_2-x_1$. Similarly, the change in $f(x)$ is $f(x_2)-f(x_1)$. This gives us a slightly nicer expression

$$\frac{f(x_2)-f(x_1)}{x_2-x_1}$$

But the last issue is that is undecided whether it's focusing on $x_1$ or $x_2$. Hence the derivative is $\frac{f(x_2)-f(x_1)}{x_2-x_1}$ when $x_1$ and $x_2$ are "very close".

This points at the other issue in your expression: are you focusing on $x$ or $x+1$? Ideally, the derivative at a point should only focus on one point, so instead of $x$ and $x+1$ we want two very close points: $x$ and $x+\mathrm{d} x$, where $\mathrm{d}x$ is loosely a "very small amount". This is more rigorously explained at Wikipedia: Derivative.

$\endgroup$
2
$\begingroup$

The derivative has various technical definitions, but the intuition you need here is of the instantaneous speed - so the derivative at $x=2$ will be close to he speed over a short interval containing $x=2$ (there are technical issues with this as a definition - though it works for 'nice' functions).

Roughly the smaller the interval you take, the closer to the derivative you get. This is expressed technically by expressing the derivative as a limit.

An interval of length $1$ from $x=2$ to $x=3$ can be part of the limit process, but the value $5$ you get will not be accurate for the derivative at $x=2$. You might want to see what happens if you take smaller intervals.

The derivative you are looking for is also the slope of the tangent to the curve $y=x^2$ at $x=2$. If you draw a diagram you will see that this is different from the slope of the chord joining $(2,4)$ and $(3,9)$.

Building sound intuition around these ideas with some careful work will serve you well later. When you encounter clear technical definitions you will also see examples of functions which are not so nice and where care has to be taken, and encounter ideas which tripped up some of the best mathematicians in previous generations.

$\endgroup$
2
$\begingroup$

You are right, the derivative is a speed (or rate) of change. People are often familiar with the idea that the slope of a line is it's rate(speed) of change.

I'd just like to add to Marco's answer and tell you to pay particular attention to his very first equation: $gradient =\frac{f(x + h) - f(x)}{(x+h) - x}$.

What he calls a gradient, is more commonly known as a slope and what you are looking at is a slope for a line that passes through the two points $(x, f(x))$ and $(x+h, f(x+h))$. When h is a very small quantity that line is very, very close to the tangent line at $(x, f(x))$ and the slope of the tangent line is the speed of change for that function when it is at the point $(x, f(x))$. The problem with finding the slope of the tangent line, and thus the instantaneous speed of change, is that we only know 1 point on the tangent line, $(x, f(x))$.

By also looking at the point $((x+h), f(x+h))$ and making h be very small, we are finding the slope of a line that is very close to the tangent line. It's slope is an approximation for the tangent's slope. As we make h be smaller and smaller, we are making our lines get closer to the tangent line and getting better approximations of its slope.

When we take the limit of our slope formula as h approaches $0$, the limit of our lines' slope will be the tangent line slope. That is why the derivative is defined as the limit of the slope of our lines as h approaches $0$: $$derivative = lim_{h \to 0}{\frac{f(x+h) - f(x)}{(x+h) - x}}$$

$\endgroup$
1
$\begingroup$

The other answers here have dealt with the idea of the definition of the derivative excellently, however, there are a couple of things I would like to add that may enhance your understanding of what a derivative actually means, and why it is even useful or cool.

In the first place, we can unpack the definition by observing what we are actually doing when we write the definition down. To do this, let's take you back to talking about the "gradient" of a straight line segment that exists between two points.

Suppose we have some nice function $f(x)$ (more on what that means later) and we have two points, whose $x$ values are given by $x$ and another point some distance $h$ away, $x+h$ (where $h \neq 0$, otherwise we would be at exactly the same point).

Then our two points are given by $(x, f(x))$ and $(x+h, f(x+h))$. To compute the gradient between these two points, we simply divide the difference between the $y$ values by the difference in the $x$ values, thereby computing the so-called "rise over run": \begin{align} \text{gradient} &= \frac{f(x+h) - f(x)}{(x+h) - x} \\ &= \frac{f(x+h) - f(x)}{h} \end{align}

This should look familiar to you, as it looks *almost like the definition of the derivative. The derivative is defined by looking at this expression for the gradient, and seeing what happens as you let the value $h$ get closer and closer to $0$: \begin{align} f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} \end{align}

Remember, that this formula is taking two points, and computing the gradient of the straight line segment between those two points. If $h$ is some huge number and we have a wacky function, then the straight line won't line up very well at all with the graph of the function! But, if our function is "nice" enough, then if we set $h$ to be very very small, it starts to look like the straight line segment and the function are the same thing (in that small neighborhood around $x$). If you open up a graphing application, and type in $f(x) = x^2$, for example, and around $x=2$ if you keep zooming in closer and closer and closer to the function, it will start to look less "curvy" and more and more like a straight line! In fact, the straight line passing through the point $(2,4)$ with gradient $4$ (i.e. $g(x) = 4x - 4)$ will look exactly like the function $f(x) = x^2$ if you zoom in close enough.

Here, <span class=$x^2$ and $4x - 4$ are clearly different, even if they touch at $(2,4)$">

Here, you cannot really tell the two functions apart

And that's the point, in the *limit as $h$ moves to 0, we can then approximate how the function $f(x)$ is changing around some point $x$ by a straight line with a gradient given by $f'(x)$, which is our derivative. So the whole idea of a derivative is to approximate small neighborhoods around a point of a function using straight lines, where the gradient of those straight lines tell us "how much" the function is changing at that exact point, and in what direction.

Why do this? Because straight lines are easy to work with! Now instead of working with some wildly curvy (but still well-behaved) function, now you can work with a collection of straight lines and life becomes a lot simpler. Later on you will learn about linear algebra, and as you might imagine, linear algebra has a lot to do with things that are flat and straight, so having these approximations means we can do a lot of cool things very efficiently with our linear algebra tools to solve what look like otherwise unsolvable problems.

Now what do I mean by well-behaved function? Well, crucially, in the definition of the derivative, we let $h$ go to $0$. We make NO mention of whether $h$ is negative or $h$ is positive to begin with -- it's just some real number that isn't $0$. We want our function to behave in such a way that it doesn't matter if we move from below $0$ towards $0$ (i.e. $h<0$) or if we move from above $0$ towards $0$ (i.e. $h>0$). One can conceive of many functions where moving from below produces a different output than moving from above. This detail becomes very important when dealing with multidimensional functions and their derivatives, to make sure we are still dealing with well-behaved functions. Note that this requirement automatically ensures that our function is continuous (but also note that there are functions that are continuous but don't meet this requirement! Turns out that a differentiable function is continuous, but a continuous function is not necessarily differentiable! Important thing to take note of and understand).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .