Differentiation rule for piecewise definition by interval: Difference between revisions
No edit summary |
|||
| (10 intermediate revisions by the same user not shown) | |||
| Line 41: | Line 41: | ||
<math>f(x) := \left\lbrace \begin{array}{rl} f_1(x), & x < c \\ f_2(x), & x > c \\v, & x = c \end{array}\right.</math> | <math>f(x) := \left\lbrace \begin{array}{rl} f_1(x), & x < c \\ f_2(x), & x > c \\v, & x = c \end{array}\right.</math> | ||
Then, <math>f</math> is <math>k</math> times differentiable at <math>c</math> if we have ''all'' these conditions: <math>\! f_1(c) = f_2(c) = v</math>, <math>\! f_1'(c) = f_2'(c)</math>, <math>\! \dots</math>, <math>f_1^{(k)}(c) = f_2^{(k)}(c)</math>. In other words, the values should match, and the values of each of the derivatives up to the <math>k^{th}</math> derivative should match. In that case, the <math>k^{th}</math> derivative of <math>f</math> at math>c</math> equals the equal values <math>f_1^{(k)}(c) = f_2^{(k)}(c)</math>. | Then, <math>f</math> is <math>k</math> times differentiable at <math>c</math> if we have ''all'' these conditions: <math>\! f_1(c) = f_2(c) = v</math>, <math>\! f_1'(c) = f_2'(c)</math>, <math>\! \dots</math>, <math>f_1^{(k)}(c) = f_2^{(k)}(c)</math>. In other words, the values should match, and the values of each of the derivatives up to the <math>k^{th}</math> derivative should match. In that case, the <math>k^{th}</math> derivative of <math>f</math> at <math>c</math> equals the equal values <math>f_1^{(k)}(c) = f_2^{(k)}(c)</math>. | ||
The general piecewise definition of <math>f^{(k)}</math> is, in this case: | The general piecewise definition of <math>f^{(k)}</math> is, in this case: | ||
| Line 52: | Line 52: | ||
The above holds with the following modification: we only require <math>f</math> to be defined as <math>f_1</math> on the ''immediate'' left of <math>c</math> (i.e., on some interval of the form <math>(c - \delta,c)</math> for <math>\delta > 0</math> and as <math>f_2</math> on the ''immediate'' right of <math>c</math> (i.e., on some interval of the form <math>(c,c + \delta)</math> for <math>\delta > 0</math>). Further, we only require that <math>f_1</math> and <math>f_2</math> be defined and differentiable on [[open interval]]s containing <math>c</math>, not necessarily on all of <math>\R</math>. | The above holds with the following modification: we only require <math>f</math> to be defined as <math>f_1</math> on the ''immediate'' left of <math>c</math> (i.e., on some interval of the form <math>(c - \delta,c)</math> for <math>\delta > 0</math> and as <math>f_2</math> on the ''immediate'' right of <math>c</math> (i.e., on some interval of the form <math>(c,c + \delta)</math> for <math>\delta > 0</math>). Further, we only require that <math>f_1</math> and <math>f_2</math> be defined and differentiable on [[open interval]]s containing <math>c</math>, not necessarily on all of <math>\R</math>. | ||
==Examples== | |||
===Example of piecewise rational function=== | |||
This example is covered in the video embedded above. | |||
Consider the function: | |||
<math>f(x) := \left\lbrace \begin{array}{rl} \frac{1}{x - 1}, & x < 0 \\ \frac{-1}{x + 1}, & x > 0 \\ -1, & x = 0 \\\end{array}\right.</math> | |||
Note that here, in the notation we have used, we have: | |||
<math>f_1(x) = \frac{1}{x - 1}, \qquad f_2(x) = \frac{-1}{x + 1}, \qquad c = 0, \qquad v = -1</math> | |||
Note that the function <math>f_1</math> is defined ''around'' zero, i.e., the definition extends to the point zero and the immediate right -- in fact, <math>f_1</math> is defined and infinitely differentiable on the interval <math>(-\infty,1)</math>. | |||
Similarly, <math>f_2</math> is defined ''around'' zero, i.e., i.e., the definition extends to the immediate left of zero -- in fact, <math>f_2</math> is defined and infinitely differentiable on the interval <math>(-1,\infty)</math>. | |||
Thus, we see that: | |||
* <math>f_1(0) = 1/(0 - 1) = -1</math>, <math>f_2(0) = -1/(0 + 1) = -1</math>, and <math>f(0) = v = -1</math>. Thus, we see that <math>f_1(0) = f_2(0) = v = -1</math>, so the function <math>f</math> is continuous at 0. | |||
* We have <math>f_1'(x) = -1/(x - 1)^2</math> and <math>f_2'(x) = 1/(x + 1)^2</math>. We see that <math>f_1'(0) = -1/(0-1)^2 = -1</math> and <math>f_2'(0) = 1/(0 + 1)^2 = 1</math>. We see that <math>f_1'(0) \ne f_2'(0)</math>, so <math>f</matH> is not differentiable at 0. | |||
This means that the first and higher derivatives of <math>f</math> do not exist at 0. | |||
===Example of piecewise polynomial function=== | |||
This example is covered in the video embedded above. | |||
Consider the function: | |||
<math>f(x) := \lbrace \begin{array}{rl} x^2, & x < 0 \\ x^3 + x, & x > 0 \\ 0, & x = 0 \\\end{array}</math> | |||
Here: | |||
<math>f_1(x) := x^2, \qquad f_2(x) := x^3 + x, \qquad c = 0, \qquad v = 0</math> | |||
We see that: | |||
* <math>f_1(0) = 0^2 = 0</math>, <math>f_2(0) = 0^3 + 0 = 0</math>, and <math>v = 0</math>. Thus, <math>f_1(0) = f_2(0) = v</math>, so <math>f</math> is continuous at 0. | |||
* <math>f_1'(x) = 2x</math> and <math>f_2'(x) = 3x^2 + 1</math>. Evaluated at 0, we get <math>f_1'(0) = 0</math> and <math>f_2'(0) = 1</math>, so <math>f_1'(0) \ne f_2'(0)</math>. So, <math>f</math> is not differentiable at 0. | |||
===Example of piecewise polynomial function: higher derivatives=== | |||
This example is covered in the video embedded above. | |||
Consider the function: | |||
<math>f(x) := \left\lbrace \begin{array}{rl} x^2, & x < 0 \\ x^3 + x^2, & x > 0 \\ 0, & x = 0 \\\end{array}\right.</math> | |||
Here, <math>c = 0, v = 0, f_1(x) = x^2, f_2(x) = x^3 + x^2</math>. To keep track of what we're doing, we make a table: | |||
{| class="sortable" border="1" | |||
! !! Expression for <math>f_1</math> !! Value for <math>f_1</math> at 0 !! Expression for <math>f_2</math> !! Value for <math>f_2</math> at 0 !! Conclusion !! Explanation | |||
|- | |||
| Function || <math>f_1(x) = x^2</math> || <math>f_1(0) = 0^2 = 0</math> || <math>f_2(x) = x^3 + x^2</math> || <math>f_2(0) = 0^3 + 0^2 = 0</math> || <math>f</math> is continuous at 0 || We are also given that the function value at 0 is 0. Thus, <math>f_1(0) = f_2(0) = v = 0</math>. So, <math>f</math> is continuous at 0. | |||
|- | |||
| First derivative || <math>f_1'(x) = 2x</math> || <math>f_1'(0) = 2(0) = 0</math> || <math>f_2'(x) = 3x^2 + 2x</math> ||<math>f_2'(0) = 3(0)^2 + 2(0) = 0</math> || <math>f</math> is differentiable at 0, and <math>f'(0) = 0</math> || We already checked continuity, and we have now checked that <math>f_1'(0) = f_2'(0)</math>. | |||
|- | |||
| Second derivative || <math>f_1''(x) = 2</math> || <math>f_1''(0) = 2</math> || <math>f_2''(x) = 6x + 2</math> || <math>f_2''(0) = 6(0) + 2 = 2</math> || <math>f</matH> is twice differentiable at 0, and <math>f''(0)= 2</math> || We already checked differentiability. Thus, it suffices to check that <math>f_1''(0) = f_2''(0)</math>, which is true since both equal 2. | |||
|- | |||
| Third derivative || <math>f_1'''(x) = 0</math> || <math>f_1'''(0) = 0</math> || <math>f_2'''(x) = 6</math> || <math>f_2'''(0) = 6</math> || <math>f</math> is ''not'' thrice differentiable at 0 || We have <math>f_1'''(0) = 0 \ne f_2'''(0) = 6</math>. | |||
|} | |||
Note that ''no higher derivative'' of <math>f</math> exists at zero. For instance, we ''do'' have that <math>f_1^{(4)}(0) = 0 = f_2^{(4)}(0)</math>, but <math>f^{(4)}(0)</math> does not exist. | |||
Here are the explicit piecewise definitions for the derivatives of <math>f</math>: | |||
<math>f'(x) = \left\lbrace\begin{array}{rl} 2x, & x < 0 \\ 3x^2 + 2x, & x > 0 \\ 0, & x = 0 \\\end{array}\right.</math> | |||
<math>f''(x) = \left\lbrace\begin{array}{rl} 2, & x < 0 \\ 6x + 2, & x > 0 \\ 2, & x = 0 \\\end{array}\right.</math> | |||
<math>f'''(x) = \left\lbrace\begin{array}{rl} 0, & x < 0 \\ 6, & x > 0 \\\end{array} \right.</math> | |||
Note that <math>f'''</math> is not defined at 0. | |||
For <math>k \ge 4</math>, we have: | |||
<math>f^{(k)}(x) = \left\lbrace\begin{array}{rl} 0, & x < 0 \\ 0, & x > 0 \\\end{array} \right.</math> | |||
But <math>f^{(k)}(0)</math> does not exist. | |||
==Caveat== | |||
In situations where the definitions given on one side of a point ''do not'' extend naturally to the point, we ''cannot'' use the above methods. In most such cases, we need to go back to the original definition of the derivative as a limit of a difference quotient. | |||
Latest revision as of 20:49, 20 September 2021
This article is about a differentiation rule, i.e., a rule for differentiating a function expressed in terms of other functions whose derivatives are known.
View other differentiation rules
Statement
Everywhere version
Suppose and are functions of one variable, such that both of the functions are defined and differentiable everywhere. Consider a function , defined as follows:
Then, we have the following for continuity:
- The left hand limit of at equals .
- The right hand limit of at equals .
- is left continuous at iff .
- is right continuous at iff .
- is continuous at iff .
We have the following for differentiability:
- is left differentiable at iff , and in this case, the left hand derivative equals .
- is right differentiable at iff , and in this case, the right hand derivative equals .
- is differentiable at iff ( and ), and in this case, the derivative equals the equal values and .
Piecewise definition of derivative
If the conditions for differentiability at are violated, we get the following piecewise definition for , which excludes the point from its domain:
If the conditions for differentiability at are satisfied, we get the following piecewise definition for , which includes the point in its domain:
where . In particular, the value at can be included in either the left side or the right side definition.
Version for higher derivatives
Suppose and are functions of one variable, such that both of the functions are defined and times differentiable everywhere (and hence in particular the functions and their first derivatives are continuous), for some positive integer . Consider the function:
Then, is times differentiable at if we have all these conditions: , , , . In other words, the values should match, and the values of each of the derivatives up to the derivative should match. In that case, the derivative of at equals the equal values .
The general piecewise definition of is, in this case:
where .
Local generalization
The above holds with the following modification: we only require to be defined as on the immediate left of (i.e., on some interval of the form for and as on the immediate right of (i.e., on some interval of the form for ). Further, we only require that and be defined and differentiable on open intervals containing , not necessarily on all of .
Examples
Example of piecewise rational function
This example is covered in the video embedded above.
Consider the function:
Note that here, in the notation we have used, we have:
Note that the function is defined around zero, i.e., the definition extends to the point zero and the immediate right -- in fact, is defined and infinitely differentiable on the interval .
Similarly, is defined around zero, i.e., i.e., the definition extends to the immediate left of zero -- in fact, is defined and infinitely differentiable on the interval .
Thus, we see that:
- , , and . Thus, we see that , so the function is continuous at 0.
- We have and . We see that and . We see that , so is not differentiable at 0.
This means that the first and higher derivatives of do not exist at 0.
Example of piecewise polynomial function
This example is covered in the video embedded above.
Consider the function:
Here:
We see that:
- , , and . Thus, , so is continuous at 0.
- and . Evaluated at 0, we get and , so . So, is not differentiable at 0.
Example of piecewise polynomial function: higher derivatives
This example is covered in the video embedded above.
Consider the function:
Here, . To keep track of what we're doing, we make a table:
| Expression for | Value for at 0 | Expression for | Value for at 0 | Conclusion | Explanation | |
|---|---|---|---|---|---|---|
| Function | is continuous at 0 | We are also given that the function value at 0 is 0. Thus, . So, is continuous at 0. | ||||
| First derivative | is differentiable at 0, and | We already checked continuity, and we have now checked that . | ||||
| Second derivative | is twice differentiable at 0, and | We already checked differentiability. Thus, it suffices to check that , which is true since both equal 2. | ||||
| Third derivative | is not thrice differentiable at 0 | We have . |
Note that no higher derivative of exists at zero. For instance, we do have that , but does not exist.
Here are the explicit piecewise definitions for the derivatives of :
Note that is not defined at 0.
For , we have:
But does not exist.
Caveat
In situations where the definitions given on one side of a point do not extend naturally to the point, we cannot use the above methods. In most such cases, we need to go back to the original definition of the derivative as a limit of a difference quotient.