The derivative function¶
Part 4 · Derivatives · Chapter 1 · lecture notes by Fabio Furini · Chapter PDF
1. Line through two points¶
-
Starting from two points
\[ (x_1,y_1) {\rm ~~and ~~} (x_2,y_2) \]it is possible to compute the function
\[ y = m \: x + q \]whose graph is the line through the two points (equation of the line in explicit form). The slope of the line is the value \(m\) and the \(y\)-intercept of the line is the value \(q\).
-
Requiring the line to pass through the two points we have:
\[ \begin{cases} y_1 = m \: x_1 + q \\[1ex] y_2 = m \: x_2 + q \end{cases} \]and we can determine \(m\) and \(q\) as follows (two equations in two unknowns):
\[ \begin{cases} q = y_1 - m \: x_1\\[1ex] q = y_2 - m \: x_2 \end{cases} \qquad \begin{cases} q = y_1 - m \: x_1\\[1ex] y_1 - m \: x_1 = y_2 - m \: x_2 {\rm ~~~which~becomes~~~} m \: x_2 - m \: x_1 = y_2 - y_1 \end{cases} \]\[ \begin{cases} q = y_1 - m \: x_1\\[1ex] m = \frac{y_2 -y_1}{x_2 - x_1} \end{cases} \qquad \begin{cases} q = y_1 - \frac{y_2 -y_1}{x_2 - x_1} \: x_1\\[1ex] m = \frac{y_2 -y_1}{x_2 - x_1} \end{cases} \]And we obtain the line:
\[ y = \underbrace{\frac{y_2 -y_1}{x_2 - x_1}}_{m} \: x + \underbrace{y_1 - \frac{y_2 -y_1}{x_2 - x_1} \: x_1}_{q} {\rm ~~~~~clearly~~~~~} \frac{y_2 -y_1}{x_2 - x_1} = \frac{y_1 -y_2}{x_1 - x_2} \]
The line through two points \((x_1,y_1)\) and \((x_2,y_2)\):
Hence the line can be written only in terms of the slope \(m\) and the point \((x_1,y_1)\) as follows:
The same holds for any point \((\tilde{x},\tilde{y})\) of the line; in this case we would have:
Example 1: Line through two points
We compute the line through the points: \((x_1,y_1)=(-1, -1)\) and \((x_2,y_2)=\left(\frac{1}{2},\frac{1}{8}\right)\). We compute the slope:
Using the point \((x_2,y_2)=\left(\frac{1}{2},\frac{1}{8}\right)\) we obtain:
Now using the point \((x_1,y_1)=\left(-1,-1\right)\) we obtain the same line:
2. Tangent line¶
What is the tangent line to the graph of a function at a point?
-
The intuitive definition of a line tangent to the graph is that of a line that “touches” the graph without “cutting” or “crossing” it (imagining the curve as if it were an impenetrable physical object)
-
This intuitive definition works, for example, for parabolas or hyperbolas. However, take for example the function \(f(x)=x^3\)
\[ {\rm the~graph~~} y = x^3 {\rm ~~~~and~the~line~~~~} y= \frac{1}{8} + \frac{3}{4} \left(x -\frac{1}{2}\right) \]the intuitive definition works at the point \(\left(\frac{1}{2},\frac{1}{8}\right)\), but the line also intersects the graph of the function at the point \((-1,-1)\).
-
Conversely, there are functions, such as \(f(x)=|x|\), whose graph is
\[ y = |x| \]This graph has a point (the origin) at which there are infinitely many lines satisfying the intuitive definition, but clearly none of them can be called tangent.
Geometrically, the tangent line can be approximated by the line through two points very close to each other on the curve, the first one fixed (the point of tangency) and the other one “moving” (and chosen closer and closer to the point of tangency).
- Two points determine a line; the closer the two points get, the closer this line gets to the tangent. We therefore need to understand what happens to the line through the two points when the second, moving point gets closer and closer to the first one, without ever coinciding with it. The “limit line” - if it exists - will be called the tangent line.
A further way of looking at the concept of tangency is to think of the tangent (to a curve at a point) as the line that best approximates the curve in a neighborhood of the point.
2.1 Practical use of the tangent line¶
Computing the tangent is important to determine the points where the graph of a function has a horizontal tangent (local or global maximum and minimum points, and possibly other points as well).
- It is therefore useful to be able to write analytically the equation of the tangent line to the curve at a generic point, and then see at which points it is horizontal. This idea is due first to Fermat, who developed it around 1630.
Example 2: Graph of a function – point with horizontal tangent
Consider the function:
The function has a point with horizontal tangent, which is a global minimum point.
Example 3: Graph of a function – points with horizontal tangent
Consider the (piecewise-defined) function:
The function has two points with horizontal tangent, which are local minimum and maximum points, for example in the interval \(\left[-\frac{1}{2}\;\pi,\pi\right]\).
Now consider the function:
The function has a point with horizontal tangent which, however, is neither a maximum nor a minimum point.
Try it — the interactive graph below shows what you have just read: move the sliders.
3. Derivative of a function at a point and derivative function¶
- Differential calculus is the study of the notion of derivative, and it is part of infinitesimal calculus.
3.1 Derivative and tangent line¶
We look for the equation of the tangent line to the graph of the function at a generic point \(A\) of its graph.
-
Consider the graph of a generic function \(y = f(x)\); the coordinates of the points \(A\) and \(B\) in the figure are respectively:
\[ \big(x_0, f(x_0)\big) {\rm ~~~~and~~~~} \big(x_0 + h, f(x_0 + h)\big) \]
-
The slope of the line through the point \(A\) and the point \(B\) is:
\[ \frac{f(x_0 + h) - f(x_0)}{h} \]Note that a positive slope indicates (on average) a rise, while a negative one indicates a fall (on average).
This ratio is called the difference quotient of the function \(f\) relative to the interval \([x_0, x_0 + h]\).
-
Geometrically, since the triangle \(ABC\) is a right triangle, we have:
\[ \frac{f(x_0 + h) - f(x_0)}{h} ~=~ \tan \omega \quad ({\rm \textbf{slope}~of~the~line~~through~} A {\rm ~and~} B) \] -
Consider the difference quotient and take the limit (assuming it exists) as \(h \rr 0\). Geometrically we have:
-
the point \(A\), with coordinates \(\big(x_0, f (x_0)\big)\), stays fixed
-
while the point \(B\), with coordinates \(\big(x_0 + h, f (x_0 + h)\big)\), moves towards \(A\) (staying on the graph of \(f\)).
-
- Moving \(B\) towards \(A\) along the graph of the function, the line \(AB\) changes its slope and settles into a limit position.
-
the limit line is called the tangent line to the graph of the function \(f\) at the point with abscissa \(x_0\);
-
its slope is given by \(\tan \alpha\) and is called the first derivative of the function \(f\) at the point \(x_0\).
-
The angle \(\alpha\) is the angle between the tangent line and the \(x\)-axis.
Definition 1: of derivative
Let \(f: (a, b) \rr \R\); \(f\) is said to be differentiable at \(x_0 \in (a, b)\) if the following limit exists and is finite
this limit is called the first derivative (or simply the derivative) of \(f\) at \(x_0\).
With \(h=x-x_0\), we have \(h \rr 0 \Leftrightarrow x-x_0 \rr 0 \Leftrightarrow x \rr x_0\) and \(x=x_0 + h\), hence:
-
To denote the derivative the following symbols are used:
\[ \underbrace{f'(x_0)}_{{\rm \textbf{Lagrange's~notation}}} \qquad \underbrace{\dot{f}(x_0)}_{{\rm Newton's~notation}} \qquad \underbrace{\frac{df}{dx}\bigg\vert _{x=x_0} {\rm~~~~and~~~~~~} \frac{dy}{dx}\bigg\vert _{x=x_0}}_{{\rm Leibniz's~notation}} \]
!!! definizione "Definition 2: tangent line "
Given a function $f: (a, b) \rr \R$ with $f$ differentiable at $x_0 \in (a, b)$, the line with equation:
$$
y = f(x_0) + f'(x_0) \: (x - x_0)
$$
is called the <strong>tangent line</strong> to the graph of the function $f$ at the point $\big( x_0 , f ( x_0 )\big)$.
Example 4: Tangent line
We compute the equation of the tangent line to the graph of the function \(f(x) = x^3\) at the point with abscissa \(x_0 = \frac{1}{2}\). The derivative at the point \(x_0 = \frac{1}{2}\) is:
We have \(f\left(\frac{1}{2}\right)=\frac{1}{8},~~f'\left(\frac{1}{2}\right)=\frac{3}{4}\) and the tangent line at the point \(\left(\frac{1}{2},\frac{1}{8} \right)\) is:
Example 5: Tangent line
We compute the equation of the tangent line to the graph of the function \(f(x) = x^3\) at the point with abscissa \(x_0 = -1\). The derivative at the point \(x_0 = -1\) is:
We have \(f\left(-1\right)=-1,~~f'\left(-1\right)=3\) and the tangent line at the point \(\left(-1,-1 \right)\) is:
- We can now define a function that associates to each \(x\) the derivative of a function \(f\) at the point \(x\) (of course, if \(f\) is differentiable).
Definition 3: of derivative function
If a function \(f\) is differentiable at every point of an interval \((a, b)\), the function:
is called the derivative function of \(f\).
-
To denote the first derivative function the following notations are used:
\[ \underbrace{f'(x)}_{{\rm \textbf{Lagrange's~notation}}} \qquad \underbrace{\dot{f}(x)}_{{\rm Newton's~notation}} \qquad \underbrace{ \frac{df}{dx} {\rm~~~~,~~~~~~} \frac{df(x)}{dx} {\rm~~~~and~~~~~~} \frac{dy}{dx}}_{{\rm Leibniz's~notation}} \]
Example 6: derivative function
We compute the derivative function of the function \(f(x) = x^3\). For every \(x \in \R\) we have:
We compute the derivative function of the function \(f(x) = |x|\). For \(x \neq 0\), we have:
For \(x = 0\) we have:
since if \(h \rr 0^+\) then \(|h| = h\) and if \(h \rr 0^-\) then \(|h| = -h\). We conclude that, since the limit of the difference quotient does not exist, \(f\) is not differentiable at \(x =0\). The function is continuous at the origin but the tangent is not well defined.
3.2 Continuity and differentiability¶
Theorem 1
Given a function \(f:[a,b] \rr \R\), if \(f\) is differentiable at a point \(x_0 \in (a,b)\) then it is continuous at \(x_0\).
Proof
The function is differentiable at \(x_0 \in (a,b)\), so we write:
Moreover we have
Therefore
Setting \(x_0+h=x\) we have \(h \rr 0\) if and only if \(x \rr x_0\), and consequently we have:
□
- A possible alternative but equivalent proof is the following:
Proof
The function is differentiable at \(x_0 \in (a,b)\), so we write:
Setting \(x_0+h=x\) we have \(h \rr 0\) if and only if \(x \rr x_0\), and consequently we have:
□
Given a function \(f\), differentiability at a point \(x_0\) in the interior of its domain implies continuity at the point \(x_0\):
but the converse is not true:
a counterexample is the function \(f(x) = |x|\), which is continuous at \(x_0 = 0\) but not differentiable at \(x_0=0\). Consequently, if a function is continuous at \(x_0\), it is not necessarily differentiable at \(x_0\).
-
The fact that \(f\) is differentiable at \(x_0\) is a sufficient but not necessary condition for \(f\) to be continuous at \(x_0\). Moreover, the fact that \(f\) is continuous at \(x_0\) is a necessary but not sufficient condition for \(f\) to be differentiable at \(x_0\).
-
From the contrapositive of \(\eqref{BBB}\) we have:
\[ f {\rm ~~is~not~continuous~at~} x_0 ~~\Rightarrow~~ f {\rm ~~is~not~differentiable~at~} x_0 \]that is, if a function is discontinuous at \(x_0\) it cannot be differentiable at \(x_0\).