Difference between revisions of "The Derivative as a Function"
(Added video links) |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | |||
+ | ==What is Differentiation?== | ||
+ | Differentiation is a process of finding a function that outputs the '''rate of change''' of one variable with respect to another variable. | ||
+ | |||
+ | Informally, we may suppose that we're tracking the position of a car on a two-lane road with no passing lanes. Assuming the car never pulls off the road, we can abstractly study the car's position by assigning it a variable, <math>x</math> . Since the car's position changes as the time changes, we say that <math>x</math> is dependent on time, or <math>x=f(t)</math> . This tells where the car is at each specific time. Differentiation gives us a function <math>\frac{dx}{dt}</math> which represents the car's speed, that is the rate of change of its position with respect to time. | ||
+ | |||
+ | Equivalently, differentiation gives us the slope at any point of the graph of a non-linear function. For a linear function, of form <math>f(x)=ax+b</math> , <math>a</math> is the slope. For non-linear functions, such as <math>f(x)=3x^2</math> , the slope can depend on <math>x</math> ; differentiation gives us a function which represents this slope. | ||
+ | |||
+ | ==The Definition of Slope== | ||
+ | Historically, the primary motivation for the study of '''differentiation''' was the tangent line problem: for a given curve, find the slope of the straight line that is tangent to the curve at a given point. The word ''tangent'' comes from the Latin word ''tangens'', which means touching. Thus, to solve the tangent line problem, we need to find the slope of a line that is "touching" a given curve at a given point, or, in modern language, that has the same slope. But what exactly do we mean by "slope" for a curve? | ||
+ | |||
+ | The solution is obvious in some cases: for example, a line <math>y=mx+c</math> is its own tangent; the slope at any point is <math>m</math> . For the parabola <math>y=x^2</math> , the slope at the point <math>(0,0)</math> is <math>0</math> ; the tangent line is horizontal. | ||
+ | |||
+ | But how can you find the slope of, say, <math>y=\sin(x)+x^2</math> at <math>x=1.5</math> ? This is in general a nontrivial question, but first we will deal carefully with the slope of lines. | ||
+ | |||
+ | ===The Slope of a Line=== | ||
+ | [[Image:Lines with Gradients.svg|thumb|325px|right|Three lines with different slopes]] | ||
+ | The '''slope''' of a line, also called the '''gradient''' of the line, is a measure of its inclination. A line that is horizontal has slope 0, a line from the bottom left to the top right has a positive slope and a line from the top left to the bottom right has a negative slope. | ||
+ | |||
+ | The slope can be defined in two (equivalent) ways. The first way is to express it as how much the line climbs for a given motion horizontally. We denote a change in a quantity using the symbol <math>\Delta</math> (pronounced "delta"). Thus, a change in <math>x</math> is written as <math>\Delta x</math> . We can therefore write this definition of slope as: | ||
+ | :<math>{\rm Slope}=\frac{\Delta y}{\Delta x}</math> | ||
+ | An example may make this definition clearer. If we have two points on a line, <math>P(x_1,y_1)</math> and <math>Q(x_2,y_2)</math> , the change in <math>x</math> from <math>P</math> to <math>Q</math> is given by: | ||
+ | :<math>\Delta x=x_2-x_1</math> | ||
+ | Likewise, the change in <math>y</math> from <math>P</math> to <math>Q</math> is given by: | ||
+ | :<math>\Delta y=y_2-y_1</math> | ||
+ | This leads to the very important result below. | ||
+ | |||
+ | <blockquote style="background: white; border: 1px solid black; padding: 1em;"> | ||
+ | :The slope of the line between the points <math>(x_1, y_1)</math> and <math>(x_2, y_2)</math> is | ||
+ | :<math>\frac{\Delta y}{\Delta x}=\frac{y_2-y_1}{x_2-x_1}</math> | ||
+ | </blockquote> | ||
+ | |||
+ | Alternatively, we can define slope trigonometrically , using the tangent function: | ||
+ | :<math>{\rm Slope}=\tan(\alpha)</math> | ||
+ | where <math>\alpha</math> is the angle from the rightward-pointing horizontal to the line, measured counter-clockwise. If you recall that the tangent of an angle is the ratio of the y-coordinate to the x-coordinate on the unit circle, you should be able to spot the equivalence here. | ||
+ | |||
+ | ===Of a graph of a function=== | ||
+ | The graphs of most functions we are interested in are not straight lines (although they can be), but rather curves. We cannot define the slope of a curve in the same way as we can for a line. In order for us to understand how to find the slope of a curve at a point, we will first have to cover the idea of '''tangency'''. Intuitively, a '''tangent''' is a line which ''just'' touches a curve at a point, such that the angle between them at that point is 0. Consider the following four curves and lines: | ||
+ | |||
+ | {| align=center | ||
+ | |align=center|'''(i)''' | ||
+ | |align=center|'''(ii)''' | ||
+ | |- | ||
+ | |[[Image:Tangency Example 1.svg|300px]] | ||
+ | |[[Image:Tangency Example 2.svg|300px]] | ||
+ | |- | ||
+ | |align=center|'''(iii)''' | ||
+ | |align=center|'''(iv)''' | ||
+ | |- | ||
+ | |[[Image:Tangency Example 3.svg|300px]] | ||
+ | |[[Image:Tangency Example 4.svg|300px]] | ||
+ | |} | ||
+ | |||
+ | <ol style="list-style-type:lower-roman"> | ||
+ | <li>The line <math>L</math> crosses, but is not tangent to <math>C</math> at <math>P</math> .</li> | ||
+ | <li>The line <math>L</math> crosses, and is tangent to <math>C</math> at <math>P</math> .</li> | ||
+ | <li>The line <math>L</math> crosses <math>C</math> at two points, but is tangent to <math>C</math> only at <math>P</math> .</li> | ||
+ | <li>There are many lines that cross <math>C</math> at <math>P</math>, but none are tangent. In fact, this curve has no tangent at <math>P</math> .</li> | ||
+ | </ol> | ||
+ | |||
+ | A '''secant''' is a line drawn through two points on a curve. We can construct a definition of a tangent as the limit of a secant of the curve taken as the separation between the points tends to zero. Consider the diagram below. | ||
+ | |||
+ | [[image:Tangent_as_Secant_Limit.svg|center]] | ||
+ | |||
+ | As the distance <math>h</math> tends to 0, the secant line becomes the tangent at the point <math>x_0</math> . The two points we draw our line through are: | ||
+ | :<math>P(x_0,f(x_0))</math> | ||
+ | and | ||
+ | :<math>Q(x_0+h,f(x_0+h))</math> | ||
+ | |||
+ | As a secant line is simply a line and we know two points on it, we can find its slope, <math>m_h</math> , using the formula from before: | ||
+ | :<math>m=\frac{y_2-y_1}{x_2-x_1}</math> | ||
+ | |||
+ | (We will refer to the slope as <math>m_h</math> because it may, and generally will, depend on <math>h</math> .) Substituting in the points on the line, | ||
+ | :<math>m_h=\frac{f(x_0+h)-f(x_0)}{(x_0+h)-x_0}</math> | ||
+ | This simplifies to | ||
+ | :<math>m_h=\frac{f(x_0+h)-f(x_0)}{h}</math> | ||
+ | This expression is called the '''difference quotient'''. Note that <math>h</math> can be positive or negative — it is perfectly valid to take a secant through any two points on the curve — but cannot be <math>0</math> . | ||
+ | |||
+ | The definition of the tangent line we gave was not rigorous, since we've only defined limits of ''numbers'' — or, more precisely, of functions that output numbers — not of ''lines''. But we ''can'' define the ''slope'' of the tangent line at a point rigorously, by taking the limit of the slopes of the secant lines from the last paragraph. Having done so, we can ''then'' define the tangent line as well. Note that we cannot simply set <math>h</math> to 0 as this would imply division of 0 by 0 which would yield an undefined result. Instead we must find the '''limit''' of the above expression as <math>h</math> '''tends''' to 0: | ||
+ | |||
+ | <blockquote style="background: white; border: 1px solid black; padding: 1em;"> | ||
+ | :'''Definition: (Slope of the graph of a function)''' | ||
+ | :The '''slope''' of the graph of <math>f(x)</math> at the point <math>(x_0,f(x_0))</math> is | ||
+ | :<math>\lim_{h\to 0}\left[\frac{f(x_0+h)-f(x_0)}{h}\right]</math> | ||
+ | :If this limit does not exist, then we say the slope is '''undefined'''. | ||
+ | :If the slope is defined, say <math>m</math>, then the '''tangent line''' to the graph of <math>f(x)</math> at the point <math>(x_0,f(x_0))</math> is the line with equation | ||
+ | :<math>y-f(x_0)=m\cdot(x-x_0)</math> | ||
+ | </blockquote> | ||
+ | |||
+ | This last equation is just the point-slope form for the line through <math>(x_0,f(x_0))</math> with slope <math>m</math>. | ||
+ | |||
+ | ==The Rate of Change of a Function at a Point== | ||
+ | Consider the formula for average velocity in the <math>x</math> direction, <math>\frac{\Delta x}{\Delta t}</math> , where <math>\Delta x</math> is the change in <math>x</math> over the time interval <math>\Delta t</math> . This formula gives the average velocity over a period of time, but suppose we want to define the instantaneous velocity. To this end we look at the '''change in position as the change in time approaches 0'''. Mathematically this is written as: | ||
+ | <math>\lim_{\Delta t\to 0}\frac{\Delta x}{\Delta t}</math> , which we abbreviate by the symbol <math>\frac{dx}{dt}</math> . (The idea of this notation is that the letter <math>d</math> denotes change.) Compare the symbol <math>d</math> with <math>\Delta</math> . The idea is that both indicate a difference between two numbers, but <math>\Delta</math> denotes a finite difference while <math>d</math> denotes an infinitesimal difference. Please note that the symbols <math>dx</math> and <math>dt</math> have no rigorous meaning on their own, since <math>\lim_{\Delta t\to 0}\Delta t=0</math> , and we can't divide by 0. | ||
+ | |||
+ | (Note that the letter <math>s</math> is often used to denote distance, which would yield <math>\frac{ds}{dt}</math> . The letter <math>d</math> is often avoided in denoting distance due to the potential confusion resulting from the expression <math>\frac{dd}{dt}</math>.) | ||
+ | |||
+ | ==The Definition of the Derivative== | ||
+ | You may have noticed that the two operations we've discussed — computing the slope of the tangent to the graph of a function and computing the instantaneous rate of change of the function — involved exactly the same limit. That is, the slope of the tangent to the graph of <math>y=f(x)</math> is <math>\frac{dy}{dx}</math> . Of course, <math>\frac{dy}{dx}</math> can, and generally will, depend on <math>x</math> , so we should really think of it as a ''function'' of <math>x</math> . We call this process (of computing <math>\frac{dy}{dx}</math>) '''differentiation'''. Differentiation results in another function whose value for any value <math>x</math> is the slope of the original function at <math>x</math> . This function is known as the '''derivative''' of the original function. | ||
+ | |||
+ | Since lots of different sorts of people use derivatives, there are lots of different mathematical notations for them. Here are some: | ||
+ | *<math>f'(x)</math> (read "f prime of x") for the derivative of <math>f(x)</math> , | ||
+ | *<math>D_x[f(x)]</math> , | ||
+ | *<math>Df(x)</math> , | ||
+ | *<math>\frac{dy}{dx}</math> for the derivative of <math>y</math> as a function of <math>x</math> or | ||
+ | *<math>\frac{d}{dx}\big[y\big]</math> , which is more useful in some cases. | ||
+ | |||
+ | Most of the time the brackets are not needed, but are useful for clarity if we are dealing with something like <math>D(f\cdot g)</math> , where we want to differentiate the product of two functions, <math>f</math> and <math>g</math> . | ||
+ | |||
+ | The first notation has the advantage that it makes clear that the derivative is a function. That is, if we want to talk about the derivative of <math>f(x)</math> at <math>x=2</math> , we can just write <math>f'(2)</math> . | ||
+ | |||
+ | In any event, here is the formal definition: | ||
+ | |||
+ | <blockquote style="background: white; border: 1px solid black; padding: 1em;"> | ||
+ | :'''Definition: (derivative)''' | ||
+ | :Let <math>f(x)</math> be a function. Then <math>f'(x)=\lim_{\Delta x\to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x}</math> wherever this limit exists. In this case we say that <math>f</math> is '''differentiable''' at <math>x</math> and its '''derivative''' at <math>x</math> is <math>f'(x)</math> . | ||
+ | </blockquote> | ||
+ | |||
+ | ===Examples=== | ||
+ | '''Example 1''' | ||
+ | |||
+ | The derivative of <math>f(x)=\frac{x}{2}</math> is | ||
+ | :<math>f'(x)=\lim_{\Delta x\to 0}\left(\frac{\frac{x+\Delta x}{2}-\frac{x}{2}}{\Delta x}\right)=\lim_{\Delta x\to 0}\left(\frac{\frac{x}{2}+\frac{\Delta x}{2}-\frac{x}{2}}{\Delta x}\right)=\lim_{\Delta x\to 0}\left(\frac{\frac{\Delta x}{2}}{\Delta x}\right)=\lim_{\Delta x\to 0}\left(\frac{\Delta x}{2\Delta x}\right)=\lim_{\Delta x\to 0}\left(\frac12\right)=\frac12</math> | ||
+ | no matter what <math>x</math> is. This is consistent with the definition of the derivative as the slope of a function. | ||
+ | |||
+ | '''Example 2''' | ||
+ | |||
+ | What is the slope of the graph of <math>y=3x^2</math> at <math>(4,48)</math> ? We can do it "the hard (and imprecise) way", ''without'' using differentiation, as follows, using a calculator and using small differences below and above the given point: | ||
+ | |||
+ | When <math>x=3.999</math> , <math>y=47.976003</math> . | ||
+ | |||
+ | When <math>x=4.001</math> , <math>y=48.024003</math> . | ||
+ | |||
+ | Then the difference between the two values of <math>x</math> is <math>\Delta x=0.002</math> . | ||
+ | |||
+ | Then the difference between the two values of <math>y</math> is <math>\Delta y=0.048</math> . | ||
+ | |||
+ | Thus, the slope <math>\frac{\Delta y}{\Delta x}=24</math> at the point of the graph at which <math>x=4</math> . | ||
+ | |||
+ | But, to solve the problem precisely, we compute | ||
+ | |||
+ | :{| | ||
+ | |<math>\lim_{\Delta x\to 0}\frac{3(4+\Delta x)^2-48}{\Delta x}</math> | ||
+ | |<math>=3\lim_{\Delta x\to 0}\frac{(4+\Delta x)^2-16}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=3\lim_{\Delta x\to 0}\frac{16+8\Delta x+(\Delta x)^2-16}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=3\lim_{\Delta x\to 0}\frac{8\Delta x+(\Delta x)^2}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=3\lim_{\Delta x\to 0}(8+\Delta x)</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=3(8)</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=24</math> | ||
+ | |} | ||
+ | We were lucky this time; the approximation we got above turned out to be exactly right. But this won't always be so, and, anyway, this way we didn't need a calculator. | ||
+ | |||
+ | In general, the derivative of <math>f(x)=3x^2</math> is | ||
+ | :{| | ||
+ | | <math>f'(x)</math> | ||
+ | |<math>=\lim_{\Delta x\to 0}\frac{3(x+\Delta x)^2-3x^2}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=3\lim_{\Delta x\to 0}\frac{(x+\Delta x)^2-x^2}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=3\lim_{\Delta x\to 0}\frac{x^2+2x\Delta x+(\Delta x)^2-x^2}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=3\lim_{\Delta x\to 0}\frac{2x\Delta x+(\Delta x)^2}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=3\lim_{\Delta x\to 0}(2x+\Delta x)</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=3(2x)</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=6x</math> | ||
+ | |} | ||
+ | |||
+ | '''Example 3''' | ||
+ | |||
+ | If <math>f(x)=|x|</math> (the absolute value function) then <math>f'(x)=\frac{x}{|x|}</math> , which can also be stated as | ||
+ | :<math>f'(x)=\left\{\begin{matrix}-1&x<0\\ {\rm undefined}&x=0\\ 1&x>0\end{matrix}\right.</math> | ||
+ | Finding this derivative is a bit complicated, so we won't prove it at this point. | ||
+ | |||
+ | Here, <math>f(x)</math> is not smooth (though it is continuous) at <math>x=0</math> and so the limits <math>\lim_{x\to 0^+}f'(x)</math> and <math>\lim_{x\to 0^-}f'(x)</math> (the limits as 0 is approached from the right and left respectively) are not equal. From the definition, <math>f'(0)=\lim_{\Delta x\to 0}\frac{|\Delta x|}{\Delta x}</math> , which does not exist. Thus, <math>f'(0)</math> is undefined, and so <math>f'(x)</math> has a discontinuity at 0. This sort of point of non-differentiability is called a cusp. Functions may also not be differentiable because they go to infinity at a point, or oscillate infinitely frequently. | ||
+ | |||
+ | ===Understanding the derivative notation=== | ||
+ | The derivative notation is special and unique in mathematics. The most common notation for derivatives you'll run into when first starting out with differentiating is the Leibniz notation, expressed as <math>\frac{dy}{dx}</math> . You may think of this as "rate of change in <math>y</math> with respect to <math>x</math>" . You may also think of it as "infinitesimal value of <math>y</math> divided by infinitesimal value of <math>x</math>" . Either way is a good way of thinking, although you should remember that the precise definition is the one we gave above. Often, in an equation, you will see just <math>\frac{d}{dx}</math> , which literally means "derivative with respect to x". This means we should take the derivative of whatever is written to the right; that is, <math>\frac{d}{dx}(x+2)</math> means <math>\frac{dy}{dx}</math> where <math>y=x+2</math> . | ||
+ | |||
+ | As you advance through your studies, you will see that we sometimes pretend that <math>dy</math> and <math>dx</math> are separate entities that can be multiplied and divided, by writing things like <math>dy=x^4dx</math> . Eventually you will see derivatives such as <math>\frac{dx}{dy}</math> , which just means that the input variable of our function is called <math>y</math> and our output variable is called <math>x</math> ; sometimes, we will write <math>\frac{d}{dy}</math> , to mean the derivative with respect to <math>y</math> of whatever is written on the right. In general, the variables could be anything, say <math>\frac{d\theta}{dr}</math> . | ||
+ | |||
+ | All of the following are equivalent for expressing the derivative of <math>y=x^2</math> | ||
+ | *<math>\frac{dy}{dx}=2x</math> | ||
+ | *<math>\frac{d}{dx}x^2=2x</math> | ||
+ | *<math>dy=2x\,dx</math> | ||
+ | *<math>f'(x)=2x</math> | ||
+ | *<math>D(f(x))=2x</math> | ||
+ | |||
+ | ==Differentiation Rules== | ||
+ | The process of differentiation is tedious for complicated functions. Therefore, rules for differentiating general functions have been developed, and can be proved with a little effort. Once sufficient rules have been proved, it will be fairly easy to differentiate a wide variety of functions. Some of the simplest rules involve the derivative of linear functions. | ||
+ | |||
+ | ===Derivative of a constant function=== | ||
+ | For any fixed real number <math>c</math> , | ||
+ | <center><math>\frac{d}{dx}[c]=0</math></center> | ||
+ | |||
+ | ====Intuition==== | ||
+ | The graph of the function <math>f(x)=c</math> is a horizontal line, which has a constant slope of 0. Therefore, it should be expected that the derivative of this function is zero, regardless of the values of <math>x</math> and <math>c</math> . | ||
+ | |||
+ | ====Proof==== | ||
+ | The definition of a derivative is | ||
+ | :<math>\lim_{\Delta x\to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x}</math> | ||
+ | Let <math>f(x)=c</math> for all <math>x</math> . (That is, <math>f</math> is a constant function.) Then <math>f(x+\Delta x)=c</math> . Therefore | ||
+ | :<math>\frac{d}{dx}[c]=\lim_{\Delta x\to 0}\frac{c-c}{\Delta x}=\lim_{\Delta x\to 0}\frac{0}{\Delta x}</math> | ||
+ | |||
+ | Let <math>g(\Delta x)=\frac{0}{\Delta x}</math> . To prove that <math>\lim_{\Delta x\to 0}g(\Delta x)=0</math> , we need to find a positive <math>\delta</math> such that, for any given positive <math>\varepsilon</math> , <math>\Big|g(\Delta x)-0\Big|<\varepsilon</math> whenever <math>0<|\Delta x-0|<\delta</math> . But <math>\Big|g(\Delta x)-0\Big|=0</math> , so <math>\Big|g(\Delta x)-0\Big|<\varepsilon</math> for any choice of <math>\delta</math> . | ||
+ | |||
+ | ====Examples==== | ||
+ | #<math>\frac{d}{dx}[3]=0</math> | ||
+ | #<math>\frac{d}{dx}[z]=0</math> | ||
+ | |||
+ | Note that, in the second example, <math>z</math> is just a constant. | ||
+ | |||
+ | ===Derivative of a linear function=== | ||
+ | For any fixed real numbers <math>m</math> and <math>c</math> , | ||
+ | <center><math>\frac{d}{dx}[mx+c]=m</math></center> | ||
+ | The special case <math>\frac{dx}{dx}=1</math> shows the advantage of the <math>\frac{d}{dx}</math> notation—rules are intuitive by basic algebra, though this does not constitute a proof, and can lead to misconceptions to what exactly <math>dx</math> and <math>dy</math> actually are. | ||
+ | |||
+ | ====Intuition==== | ||
+ | The graph of <math>y=mx+c</math> is a line with constant slope <math>m</math>. | ||
+ | |||
+ | ====Proof==== | ||
+ | If <math>f(x)=mx+c</math> , then <math>f(x+\Delta x)=m(x+\Delta x)+c</math>. So, | ||
+ | :{| | ||
+ | |<math>f'(x)</math> | ||
+ | |<math>=\lim_{\Delta x\to 0}\frac{m(x+\Delta x)+c-mx-c}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=\lim_{\Delta x\to 0}\frac{m(x+\Delta x)-mx}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=\lim_{\Delta x\to 0}\frac{mx+m\Delta x-mx}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=\lim_{\Delta x\to 0}\frac{m\Delta x}{\Delta x}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=m</math> | ||
+ | |} | ||
+ | |||
+ | ===Constant multiple and addition rules=== | ||
+ | Since we already know the rules for some very basic functions, we would like to be able to take the derivative of more complex functions by breaking them up into simpler functions. Two tools that let us do this are the constant multiple rule and the addition rule. | ||
+ | |||
+ | ====The Constant Rule==== | ||
+ | For any fixed real number <math>c</math> , | ||
+ | <center><math>\frac{d}{dx}\big[c\cdot f(x)\big]=c\cdot\frac{d}{dx}\big[f(x)\big]</math></center> | ||
+ | The reason, of course, is that one can factor <math>c</math> out of the numerator, and then of the entire limit, in the definition. | ||
+ | |||
+ | '''Example''' | ||
+ | |||
+ | We already know that | ||
+ | :<math>\frac{d}{dx}\big[x^2\big]=2x</math> | ||
+ | Suppose we want to find the derivative of <math>3x^2</math> | ||
+ | |||
+ | :{| | ||
+ | |- | ||
+ | |<math>\frac{d}{dx}\big[3x^2\big]</math> | ||
+ | |<math>=3\frac{d}{dx}\big[x^2\big]</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=3\cdot2x</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=6x</math> | ||
+ | |} | ||
+ | |||
+ | Another simple rule for breaking up functions is the addition rule. | ||
+ | |||
+ | ====The Addition and Subtraction Rules==== | ||
+ | <center><math>\frac{d}{dx}\big[f(x)\pm g(x)\big]=\frac{d}{dx}\big[f(x)\big]\pm\frac{d}{dx}\big[g(x)\big]</math></center> | ||
+ | |||
+ | '''Proof''' | ||
+ | |||
+ | From the definition: | ||
+ | :{| | ||
+ | |<math>\lim_{\Delta x\to 0}\left[\frac{\big[f(x+\Delta x)\pm g(x+\Delta x)\big]-\big[f(x)\pm g(x)\big]}{\Delta x}\right]</math> | ||
+ | |<math>=\lim_{\Delta x\to 0}\left[\frac{\big[f(x+\Delta x)-f(x)\big]\pm\big[g(x+\Delta x)-g(x)\big]}{\Delta x}\right]</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=\lim_{\Delta x\to 0}\left[\frac{f(x+\Delta x)-f(x)}{\Delta x}\right]\pm\lim_{\Delta x\to 0}\left[\frac{g(x+\Delta x)-g(x)}{\Delta x}\right]</math> | ||
+ | |} | ||
+ | By definition then, this last term is <math> \frac{d}{dx} \left[f(x)\right] \pm \frac{d}{dx}\left[g(x)\right] </math> | ||
+ | |||
+ | '''Example''' | ||
+ | |||
+ | What is the derivative of <math>3x^2+5x</math> ? | ||
+ | :{| | ||
+ | |- | ||
+ | |<math>\frac{d}{dx}\big[3x^2+5x\big]</math> | ||
+ | |<math>=\frac{d}{dx}\big[3x^2+5x\big]</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=\frac{d}{dx}\big[3x^2\big]+\frac{d}{dx}\big[5x\big]</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=6x+\frac{d}{dx}\big[5x\big]</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=6x+5</math> | ||
+ | |} | ||
+ | |||
+ | The fact that both of these rules work is extremely significant mathematically because it means that differentiation is '''linear'''. You can take an equation, break it up into terms, figure out the derivative individually and build the answer back up, and nothing | ||
+ | odd will happen. | ||
+ | |||
+ | We now need only one more piece of information before we can take the derivatives of any polynomial. | ||
+ | |||
+ | ===The Power Rule=== | ||
+ | <center><math>\frac{d}{dx}\big[x^n\big]=nx^{n-1}</math></center> | ||
+ | This has been proved in an example in Derivatives of Exponential and Logarithm Functions where it can be best understood. | ||
+ | |||
+ | For example, in the case of <math>x^2</math> the derivative is <math>2x^1=2x</math> as was established earlier. A special case of this rule is that <math>\frac{dx}{dx}=\frac{dx^1}{dx}=1x^0=1</math> . | ||
+ | |||
+ | Since polynomials are sums of monomials, using this rule and the addition rule lets you differentiate any polynomial. A relatively simple proof for this can be derived from the binomial expansion theorem. | ||
+ | |||
+ | This rule also applies to fractional and negative powers. Therefore | ||
+ | :{| | ||
+ | |- | ||
+ | |<math>\frac{d}{dx}\big[\sqrt x\big]</math> | ||
+ | |<math>=\frac{d}{dx}\big[x^\frac12\big]</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=\frac12x^{-\frac12}</math> | ||
+ | |- | ||
+ | | | ||
+ | |<math>=\frac{1}{2\sqrt x}</math> | ||
+ | |} | ||
+ | |||
+ | ===Derivatives of polynomials=== | ||
+ | With these rules in hand, you can now find the derivative of any polynomial you come across. Rather than write the general formula, let's go step by step | ||
+ | through the process. | ||
+ | :<math>\frac{d}{dx}\big[6x^5+3x^2+3x+1\big]</math> | ||
+ | The first thing we can do is to use the addition rule to split the equation up into terms: | ||
+ | :<math>\frac{d}{dx}\big[6x^5\big]+\frac{d}{dx}\big[3x^2\big]+\frac{d}{dx}\big[3x\big]+\frac{d}{dx}[1]</math> | ||
+ | |||
+ | We can immediately use the linear and constant rules to get rid of some terms: | ||
+ | :<math>\frac{d}{dx}\big[6x^5\big]+\frac{d}{dx}\big[3x^2\big]+3+0</math> | ||
+ | Now you may use the constant multiplier rule to move the constants outside the derivatives: | ||
+ | :<math>6\frac{d}{dx}\big[x^5\big]+3\frac{d}{dx}\big[x^2\big]+3</math> | ||
+ | Then use the power rule to work with the individual monomials: | ||
+ | :<math>6(5x^4)+3(2x)+3</math> | ||
+ | And then do some algebra to get the final answer: | ||
+ | :<math>30x^4+6x+3</math> | ||
+ | These are not the only differentiation rules. There are other, more advanced, differentiation rules, which will be described in a later chapter. | ||
+ | |||
+ | ==Resources== | ||
* [https://mathresearch.utsa.edu/wikiFiles/MAT1214/The%20Derivative%20as%20a%20Function/MAT1214-3.2TheDerivativeAsAFunctionPwPt.pptx The Derivative as a Function] PowerPoint file created by Dr. Sara Shirinkam, UTSA. | * [https://mathresearch.utsa.edu/wikiFiles/MAT1214/The%20Derivative%20as%20a%20Function/MAT1214-3.2TheDerivativeAsAFunctionPwPt.pptx The Derivative as a Function] PowerPoint file created by Dr. Sara Shirinkam, UTSA. | ||
Line 4: | Line 366: | ||
* [https://mathresearch.utsa.edu/wikiFiles/MAT1214/The%20Derivative%20as%20a%20Function/MAT1214-3.2TheDerivativeAsAFunctionWS1.pdf The Derivative as a Function Worksheet 1] | * [https://mathresearch.utsa.edu/wikiFiles/MAT1214/The%20Derivative%20as%20a%20Function/MAT1214-3.2TheDerivativeAsAFunctionWS1.pdf The Derivative as a Function Worksheet 1] | ||
− | |||
* [https://youtu.be/vzDYOHETFlo Finding a Derivative Using the Definition of a Derivative] by patrickJMT | * [https://youtu.be/vzDYOHETFlo Finding a Derivative Using the Definition of a Derivative] by patrickJMT | ||
Line 13: | Line 374: | ||
* [https://youtu.be/-aTLjoDT1GQ Definition of the Derivative] by The Organic Chemistry Tutor | * [https://youtu.be/-aTLjoDT1GQ Definition of the Derivative] by The Organic Chemistry Tutor | ||
+ | |||
+ | * [https://youtu.be/fml0-ELYLaE Continuity and Differentiability] by The Organic Chemistry Tutor | ||
+ | |||
+ | ==Licensing== | ||
+ | Content obtained and/or adapted from: | ||
+ | * [https://en.wikibooks.org/wiki/Calculus/Differentiation/Differentiation_Defined Differentiation Defined, Wikibooks: Calculus/Differentiation] under a CC BY-SA license |
Latest revision as of 16:18, 15 January 2022
Contents
- 1 What is Differentiation?
- 2 The Definition of Slope
- 3 The Rate of Change of a Function at a Point
- 4 The Definition of the Derivative
- 5 Differentiation Rules
- 6 Resources
- 7 Licensing
What is Differentiation?
Differentiation is a process of finding a function that outputs the rate of change of one variable with respect to another variable.
Informally, we may suppose that we're tracking the position of a car on a two-lane road with no passing lanes. Assuming the car never pulls off the road, we can abstractly study the car's position by assigning it a variable, . Since the car's position changes as the time changes, we say that is dependent on time, or . This tells where the car is at each specific time. Differentiation gives us a function which represents the car's speed, that is the rate of change of its position with respect to time.
Equivalently, differentiation gives us the slope at any point of the graph of a non-linear function. For a linear function, of form , is the slope. For non-linear functions, such as , the slope can depend on ; differentiation gives us a function which represents this slope.
The Definition of Slope
Historically, the primary motivation for the study of differentiation was the tangent line problem: for a given curve, find the slope of the straight line that is tangent to the curve at a given point. The word tangent comes from the Latin word tangens, which means touching. Thus, to solve the tangent line problem, we need to find the slope of a line that is "touching" a given curve at a given point, or, in modern language, that has the same slope. But what exactly do we mean by "slope" for a curve?
The solution is obvious in some cases: for example, a line is its own tangent; the slope at any point is . For the parabola , the slope at the point is ; the tangent line is horizontal.
But how can you find the slope of, say, at ? This is in general a nontrivial question, but first we will deal carefully with the slope of lines.
The Slope of a Line
The slope of a line, also called the gradient of the line, is a measure of its inclination. A line that is horizontal has slope 0, a line from the bottom left to the top right has a positive slope and a line from the top left to the bottom right has a negative slope.
The slope can be defined in two (equivalent) ways. The first way is to express it as how much the line climbs for a given motion horizontally. We denote a change in a quantity using the symbol (pronounced "delta"). Thus, a change in is written as . We can therefore write this definition of slope as:
An example may make this definition clearer. If we have two points on a line, and , the change in from to is given by:
Likewise, the change in from to is given by:
This leads to the very important result below.
- The slope of the line between the points and is
Alternatively, we can define slope trigonometrically , using the tangent function:
where is the angle from the rightward-pointing horizontal to the line, measured counter-clockwise. If you recall that the tangent of an angle is the ratio of the y-coordinate to the x-coordinate on the unit circle, you should be able to spot the equivalence here.
Of a graph of a function
The graphs of most functions we are interested in are not straight lines (although they can be), but rather curves. We cannot define the slope of a curve in the same way as we can for a line. In order for us to understand how to find the slope of a curve at a point, we will first have to cover the idea of tangency. Intuitively, a tangent is a line which just touches a curve at a point, such that the angle between them at that point is 0. Consider the following four curves and lines:
(i) | (ii) |
(iii) | (iv) |
- The line crosses, but is not tangent to at .
- The line crosses, and is tangent to at .
- The line crosses at two points, but is tangent to only at .
- There are many lines that cross at , but none are tangent. In fact, this curve has no tangent at .
A secant is a line drawn through two points on a curve. We can construct a definition of a tangent as the limit of a secant of the curve taken as the separation between the points tends to zero. Consider the diagram below.
As the distance tends to 0, the secant line becomes the tangent at the point . The two points we draw our line through are:
and
As a secant line is simply a line and we know two points on it, we can find its slope, , using the formula from before:
(We will refer to the slope as because it may, and generally will, depend on .) Substituting in the points on the line,
This simplifies to
This expression is called the difference quotient. Note that can be positive or negative — it is perfectly valid to take a secant through any two points on the curve — but cannot be .
The definition of the tangent line we gave was not rigorous, since we've only defined limits of numbers — or, more precisely, of functions that output numbers — not of lines. But we can define the slope of the tangent line at a point rigorously, by taking the limit of the slopes of the secant lines from the last paragraph. Having done so, we can then define the tangent line as well. Note that we cannot simply set to 0 as this would imply division of 0 by 0 which would yield an undefined result. Instead we must find the limit of the above expression as tends to 0:
- Definition: (Slope of the graph of a function)
- The slope of the graph of at the point is
- If this limit does not exist, then we say the slope is undefined.
- If the slope is defined, say , then the tangent line to the graph of at the point is the line with equation
This last equation is just the point-slope form for the line through with slope .
The Rate of Change of a Function at a Point
Consider the formula for average velocity in the direction, , where is the change in over the time interval . This formula gives the average velocity over a period of time, but suppose we want to define the instantaneous velocity. To this end we look at the change in position as the change in time approaches 0. Mathematically this is written as: , which we abbreviate by the symbol . (The idea of this notation is that the letter denotes change.) Compare the symbol with . The idea is that both indicate a difference between two numbers, but denotes a finite difference while denotes an infinitesimal difference. Please note that the symbols and have no rigorous meaning on their own, since , and we can't divide by 0.
(Note that the letter is often used to denote distance, which would yield . The letter is often avoided in denoting distance due to the potential confusion resulting from the expression .)
The Definition of the Derivative
You may have noticed that the two operations we've discussed — computing the slope of the tangent to the graph of a function and computing the instantaneous rate of change of the function — involved exactly the same limit. That is, the slope of the tangent to the graph of is . Of course, can, and generally will, depend on , so we should really think of it as a function of . We call this process (of computing ) differentiation. Differentiation results in another function whose value for any value is the slope of the original function at . This function is known as the derivative of the original function.
Since lots of different sorts of people use derivatives, there are lots of different mathematical notations for them. Here are some:
- (read "f prime of x") for the derivative of ,
- ,
- ,
- for the derivative of as a function of or
- , which is more useful in some cases.
Most of the time the brackets are not needed, but are useful for clarity if we are dealing with something like , where we want to differentiate the product of two functions, and .
The first notation has the advantage that it makes clear that the derivative is a function. That is, if we want to talk about the derivative of at , we can just write .
In any event, here is the formal definition:
- Definition: (derivative)
- Let be a function. Then wherever this limit exists. In this case we say that is differentiable at and its derivative at is .
Examples
Example 1
The derivative of is
no matter what is. This is consistent with the definition of the derivative as the slope of a function.
Example 2
What is the slope of the graph of at ? We can do it "the hard (and imprecise) way", without using differentiation, as follows, using a calculator and using small differences below and above the given point:
When , .
When , .
Then the difference between the two values of is .
Then the difference between the two values of is .
Thus, the slope at the point of the graph at which .
But, to solve the problem precisely, we compute
We were lucky this time; the approximation we got above turned out to be exactly right. But this won't always be so, and, anyway, this way we didn't need a calculator.
In general, the derivative of is
Example 3
If (the absolute value function) then , which can also be stated as
Finding this derivative is a bit complicated, so we won't prove it at this point.
Here, is not smooth (though it is continuous) at and so the limits and (the limits as 0 is approached from the right and left respectively) are not equal. From the definition, , which does not exist. Thus, is undefined, and so has a discontinuity at 0. This sort of point of non-differentiability is called a cusp. Functions may also not be differentiable because they go to infinity at a point, or oscillate infinitely frequently.
Understanding the derivative notation
The derivative notation is special and unique in mathematics. The most common notation for derivatives you'll run into when first starting out with differentiating is the Leibniz notation, expressed as . You may think of this as "rate of change in with respect to " . You may also think of it as "infinitesimal value of divided by infinitesimal value of " . Either way is a good way of thinking, although you should remember that the precise definition is the one we gave above. Often, in an equation, you will see just , which literally means "derivative with respect to x". This means we should take the derivative of whatever is written to the right; that is, means where .
As you advance through your studies, you will see that we sometimes pretend that and are separate entities that can be multiplied and divided, by writing things like . Eventually you will see derivatives such as , which just means that the input variable of our function is called and our output variable is called ; sometimes, we will write , to mean the derivative with respect to of whatever is written on the right. In general, the variables could be anything, say .
All of the following are equivalent for expressing the derivative of
Differentiation Rules
The process of differentiation is tedious for complicated functions. Therefore, rules for differentiating general functions have been developed, and can be proved with a little effort. Once sufficient rules have been proved, it will be fairly easy to differentiate a wide variety of functions. Some of the simplest rules involve the derivative of linear functions.
Derivative of a constant function
For any fixed real number ,
Intuition
The graph of the function is a horizontal line, which has a constant slope of 0. Therefore, it should be expected that the derivative of this function is zero, regardless of the values of and .
Proof
The definition of a derivative is
Let for all . (That is, is a constant function.) Then . Therefore
Let . To prove that , we need to find a positive such that, for any given positive , whenever . But , so for any choice of .
Examples
Note that, in the second example, is just a constant.
Derivative of a linear function
For any fixed real numbers and ,
The special case shows the advantage of the notation—rules are intuitive by basic algebra, though this does not constitute a proof, and can lead to misconceptions to what exactly and actually are.
Intuition
The graph of is a line with constant slope .
Proof
If , then . So,
Constant multiple and addition rules
Since we already know the rules for some very basic functions, we would like to be able to take the derivative of more complex functions by breaking them up into simpler functions. Two tools that let us do this are the constant multiple rule and the addition rule.
The Constant Rule
For any fixed real number ,
The reason, of course, is that one can factor out of the numerator, and then of the entire limit, in the definition.
Example
We already know that
Suppose we want to find the derivative of
Another simple rule for breaking up functions is the addition rule.
The Addition and Subtraction Rules
Proof
From the definition:
By definition then, this last term is
Example
What is the derivative of ?
The fact that both of these rules work is extremely significant mathematically because it means that differentiation is linear. You can take an equation, break it up into terms, figure out the derivative individually and build the answer back up, and nothing odd will happen.
We now need only one more piece of information before we can take the derivatives of any polynomial.
The Power Rule
This has been proved in an example in Derivatives of Exponential and Logarithm Functions where it can be best understood.
For example, in the case of the derivative is as was established earlier. A special case of this rule is that .
Since polynomials are sums of monomials, using this rule and the addition rule lets you differentiate any polynomial. A relatively simple proof for this can be derived from the binomial expansion theorem.
This rule also applies to fractional and negative powers. Therefore
Derivatives of polynomials
With these rules in hand, you can now find the derivative of any polynomial you come across. Rather than write the general formula, let's go step by step through the process.
The first thing we can do is to use the addition rule to split the equation up into terms:
We can immediately use the linear and constant rules to get rid of some terms:
Now you may use the constant multiplier rule to move the constants outside the derivatives:
Then use the power rule to work with the individual monomials:
And then do some algebra to get the final answer:
These are not the only differentiation rules. There are other, more advanced, differentiation rules, which will be described in a later chapter.
Resources
- The Derivative as a Function PowerPoint file created by Dr. Sara Shirinkam, UTSA.
- The Derivative as a Function Notes created by Instructor Sean Beatty, UTSA.
- Derivative Using the Definition, Example 2 by patrickJMT
- Definition of the Derivative by The Organic Chemistry Tutor
- Continuity and Differentiability by The Organic Chemistry Tutor
Licensing
Content obtained and/or adapted from:
- Differentiation Defined, Wikibooks: Calculus/Differentiation under a CC BY-SA license