curve(2*x^3-3*x^2-12*x+7,-2,3)
abline(h=0, v=c(-1,2), col="grey")
Often in life, we are faced with the problem of finding the best way to do something. For example,
A farmer wants to choose the mix of crops that is likely to produce the largest profit.
A doctor wishes to select the smallest dosage of a drug that will cure a certain disease.
A manufacturer would like to minimize the cost of distributing its products.
Often such a problem can be formulated so that it involves maximizing or minimizing a function over a specified set.
Suppose then that we are given a function \(f(x)\) and a domain \(S\). We now pose three questions:
Does have a maximum or minimum value on S?
If it does have a maximum or a minimum, where are they attained?
If they exist, what are the maximum and minimum values?
Does \(f\) have a maximum (or minimum) value on \(S\)? The answer depends on the domain and the type of function.
The key words in Theorem A: \(f\) is required to be continuous and the set \(S\) is required to be a closed interval.
These three kinds of points (end points, stationary points, and singular points) are the key points of max–min theory. Any point of one of these three types in the domain of a function \(f\) is called a critical point of \(f\).
N.B. \(f^\prime\) is \(0\) at a stationary point. \(f^\prime\) fails to exist at a singular point.
Example 1, page 190. Find the critical points by definition.
A simple procedure for finding the maximum value and minimum value of a continuous function \(f\) on a closed interval \(I\).
Step 1: Find the critical points of \(f\) on \(I\).
Step 2: Evaluate \(f\) at each of these critical points. The largest of these values is the maximum value; the smallest is the minimum value.
Example 2 -5, page 191. Find the maximum and minimum value via the procedure.
This theorem usually allows us to determine precisely where a differentiable function increases and where it decreases. It is a matter of solving two inequalities.
Example 1, page 193. Take the derivative, and specify where it is positive and where it is negative.
curve(2*x^3-3*x^2-12*x+7,-2,3)
abline(h=0, v=c(-1,2), col="grey")
To analyze wiggles, we need to study how the tangent line turns as we move from left to right along the graph. If the tangent line turns steadily in the counterclockwise direction, we say that the graph is concave up; if the tangent turns in the clockwise direction, the graph is concave down.
We keep in mind that the second derivative of \(f\) is the first derivative of \(f^\prime\). Thus, \(f^\prime\) is increasing if \(f^{\prime\prime}\) is positive; it is decreasing if \(f^{\prime\prime}\) is negative.
For most functions, this theorem reduces the problem of determining concavity to the problem of solving inequalities. e.g., Example 3 & 4, page 195.
# Ex. 3
curve(1/3*x^3-x^2-3*x+4, -3, 5)
axis(1, at=seq(-3,5,by=1) )
abline(h=0, v=c(-1,3), col="grey")
# Ex. 4
curve(x/(1+x^2),-3,3)
abline(h=0,v=0,col="grey")
abline(v=c(-sqrt(3),-1,0,1,sqrt(3)), lty="dashed", col="grey" )
Practical Problems, example 5 & 6, page 196 -197.
Let \(f\) be continuous at \(c\). We call \((c, f(c))\) an inflection point of the graph of \(f\) if \(f\) is concave up on one side of \(c\) and concave down on the other side. That is, the points where \(f^{\prime\prime}(x)=0\) or where \(f^{\prime\prime}(x)\) does not exist are the candidates for points of inflection.
N.B. may a point where \(f^{\prime\prime}(x)=0\) fail to be a point of inflection. e.g., \(f(x)=x^4\). We must check the graph to both sides of the candidate points.
We recall from Section 4.1 that the maximum value (if it exists) of a function \(f\) on a set \(S\) is the largest value that f attains on the whole set \(S\). It is sometimes referred to as the global maximum value, or the absolute maximum value of \(f\).
N.B. maximum (minimum) value with no qualifying adjective means global maximum (minimum) value.
The Critical Point Theorem (Theorem 4.1B) holds with the phrase extreme value replaced by local extreme value; Thus, the critical points (end points, stationary points, and singular points) are the candidates for points where local extrema may occur.
Example 1 & 2, page 201. Find the local extremes by taking first derivative, and let it equal to 0.
Example 3, page 202. Be careful with the singular point.
There is another test for local maxima and minima that is sometimes easier to apply than the First Derivative Test. It involves evaluating the second derivative at the stationary points. It does not apply to singular points.
Use the Second Derivative Test to identify local extrema. e.g., Example 4, page 202.
N.B. The Second Derivative Test sometimes fails, since \(f^{\prime\prime}(x)\) may be \(0\) at a stationary point. e.g., \(f(x)=x^3, f(x)=x^4\). The first does not have a local maximum or minimum value at 0; the second has a local minimum there. This shows that if \(f^{\prime\prime}(x)=0\) at a stationary point we are unable to draw a conclusion about maxima or minima without more information.
The problems that we studied in this section and in Section 4.1 often assumed that the set on which we wanted to maximize or minimize a function was a closed interval.
Example 6, page 203. Find (if any exist) the minimum and maximum values of \(f(x)=e^{-x^2/2}\) on \((-\infty,\infty)\). Global maximum attained at 0, this function does not have a minimum.
curve(exp(-x^2/2),-3,3 )
abline(v=0, col="grey")
The following step-by-step method that can be applied to many practical optimization problems:
Step 1: Draw a picture for the problem and assign appropriate variables to the important quantities.
Step 2: Write a formula for the objective function \(Q\) to be maximized or minimized in terms of the variables from step 1.
Step 3: Use the conditions of the problem to eliminate all but one of these variables, and thereby express \(Q\) as a function of a single variable.
Step 4: Find the critical points (end points, stationary points, singular points).
Step 5: Either substitute the critical values into the objective function or use the theory from the last section (i.e., the First and Second Derivative Tests) to determine the maximum or minimum.
Example 1, page 205. Find the dimensions of the box of maximum volume.
Example 2, page 205. What are the dimensions of the enclosure that has maximum area?
Example 3, page 206. Find the dimensions of the right circular cylinder of greatest volume that can be inscribed in a given right circular cone.
Example 4, page 207. What velocity minimizes the energy expended in swimming this distance?
Example 5, page 207. How far from the wall should she stand to maximize her viewing angle?
Example 6, page 207. What is the length of the longest thin rod that can be carried around the corner assuming you cannot tilt the rod?
In geometric language, the Mean Value Theorem says that, if the graph of a continuous function has a non-vertical tangent line at every point between A and B, then there is at least one point C on the graph between A and B at which the tangent line is parallel to the secant line AB.
N.B. You may find the very last step of the proof of the MVT get straightforward if you know the Rolle’s Theorem. (statement in problem 22 of sec 4.6 problem set, page229)
Suppose that \(y = f(x)\) is continuous over the closed interval \([a, b]\) and differentiable at every point of its interior \((a, b)\). If \(f(a) = f(b)\), then there is at least one number \(c\) in \((a, b)\) at which \(f^\prime(c)=0\).
In the proof above for the MVT (on page 225), the vertical difference \(s(x)\) is continuous on \([a, b]\) and differentiable at every point of its interior interval. Also, \(s(a) = s(b) = 0\) because the graphs of \(f\) and \(g\) both pass through \((a, f(a))\) and \((b, f(b))\). Therefore, \(s^\prime(c)=0\) at some point \(c\in (a,b)\).
Example 1- 3, page 226. Find the number c that satisfy the conclusion of the Mean Value Theorem.
Example 4, page 227. N.B. The Mean Value Theorem (MVT) fails if \(f(x)\) is not everywhere differentiable on its interior interval.
Example 5, page 227. Note that by MVT, over any interval of time, there is some time for which the instantaneous velocity equals the average velocity.
This theorem will be used repeatedly in this and the next chapter. In words, it says that two functions with the same derivative differ by a constant.
Go over proof on page 228.
What does the terminology indeterminate form mean?
For example, a expression simplifies down to \(0/0\). This is called an indeterminate form. If you use the substitution method to evaluate the limit and get zero divided by zero, then anything could happen: the limit might be finite, the limit might be \(\infty\) or \(-\infty\), or the limit might not exist.
Would it not be nice to have a standard procedure for handling all problems for which the limits of the numerator and denominator are both 0?
Limits results in section 2.5 revisit:
Example 2 & 3, page 231. Simply apply the L’Hopital’s Rule.
Example 4, page 232. You may apply the rule multiple times if needed.
Example 5, page 232. N.B. the numerator and denominator both tend to 0, make sure you check this condition before using the L’Hopital’s Rule. We stop differentiating as soon as either the numerator or denominator has a nonzero limit.
Example 6, page 233. Convert to form \(\infty/\infty\) s.t. simplify the calculation. More about form \(\infty/\infty\) will be covered in section 4.8.
Before the proof of the L’Hopital’s Rule, we introduce an extension of the Mean Value Theorem for Derivatives – Cauchy’s Mean Value Theorem.
Proof. (Optional)
We apply the Mean Value Theorem of Section 4.6 twice.
First we use it to show that \(g(a) \neq g(b)\). For if \(g(b)\) did equal \(g(a)\), then the Mean Value Theorem would give
Here is a general result of the same type:
\[ \lim_{x\to \infty}\frac{x^a}{e^x}=0 \]
N.B. For sufficiently large \(x\),\(e^x\) grows faster as \(x\) increases than any constant power of \(x\), whereas \(\ln x\) grows more slowly than any constant power of \(x\).
x <- 1:40
y <- cbind.data.frame("ln"=log(x), "sqrt"=sqrt(x), "x"=x,"exp"=exp(x))
matplot(x,y, type = "l",ylim = c(1,40),lty = 1:4,lwd=2, col = 1:4)
legend(x="right", legend = names(y), lty = 1:4 ,lwd=2,col = 1:4)
Example 4, page 238.
N.B.The trick is to transform the problem to a \(0/0\) or \(\infty/\infty\) form.
Example 5, page 239. Transform \(\infty\cdot 0\) to \(0/0\).
Example 6, page 239. Transform \(\infty-\infty\) to \(0/0\) by taking the common denominator.
N.B. The trick is to consider the logarithm of the original expression, then apply the L’Hopital’s Rule to the logarithm.
Example 7 & 8, page 239.
Example 9 tells us that \(0^\infty\) is not indeterminate, the limit is zero.
If we want to solve equations involving derivatives we will need its inverse, called antidifferentiation or integration.
We said an antiderivative rather than the antiderivative in our definition.You will soon see why.
Example 1, page 248. Find an antiderivative of the function \(f(x)=4x^3\) on \((-\infty,\infty)\).
A quick answer is \(F(x)=x^4\). In fact, every antiderivative of \(f(x)=4x^3\) is of the form \(F(x)=x^4+C\). This fact is guaranteed by Theorem 4.6B which says that if two functions have the same derivative, they must differ by a constant.
Our conclusion is this. If a function \(f\) has an antiderivative, it will have a whole family of them, and each member of this family can be obtained from one of them by the addition of an appropriate constant. We call this family of functions the general antiderivative of \(f\). After we get used to this notion, we will often omit the adjective general.
Leibniz used the symbol \(\int \ldots dx\) to indicate the antiderivative with respect to \(x\). For example, \[\int x^2 dx=\frac{1}{3}x^3+C,\]is the Leibniz notation of the answer to example2, page 249.
Leibniz notation for general case is
Following Leibniz, we shall often use the term indefinite integral in place of antiderivative. Here the adjective indefinite means the indefinite integral always involves an arbitrary constant. To antidifferentiate is also to integrate. In the symbol \(\int f(x) dx\), \(\int\) is called the integral sign and \(f(x)\) is called the integrand.
N.B. Since no interval \(I\) is specified in the power rule, the conclusion is valid only on intervals on which \(x^r\) is defined. In particular, we must exclude any interval containing the origin if \(r<0\). In addition, when \(r=0\), \[\int 1 dx=x+C\]
Example 3, page 250. Apply the power rule, that is, to integrate a power of \(x\), we increase the exponent by \(1\) and divide by the new exponent.
At the end of Section 3.10, we presented a table of derivative formulas. For every derivative formula, there is a corresponding antiderivative formula. Theorem B gives a number of the important results.
Just like \(D_x\) is a linear operator we learned in Chapter 3, indefinite integral \(\int \ldots dx\) also has these properties of a linear operator.
Example 4, page 251. Apply the linear operator property. N.B. Two arbitrary constants \(C_1\) and \(C_2\) appeared in (a), but they were combined into one constant, \(C\), a practice we consistently follow.
Recall the Chain Rule as applied to a power of a function. If \(u=g(x)\) is a differentiable function and \(r\) is a real number (\(r\neq -1\)), then \[D_x\left[\frac{u^{r+1}}{r+1}\right]=u^r\cdot D_x u\] or, in functional notation, \[D_x\left(\frac{\left[g(x)\right]^{r+1}}{r+1}\right)=\left[g(x)\right]^r\cdot g^\prime(x)\]
From this we obtain an important rule for indefinite integrals.
N.B. To apply Theorem D, we must be able to recognize the functions \(g\) and \(g^\prime\) in the integrand.
Example 5, page 252.
Example 6 & 7, page 252 -253. Obvious substitution variable, changing from x to u. The key step is to specify what \(u\) is. Bare in mind that we look for a function of \(x\) raised to a power, times the derivative of that function.
The result of example 8 is used in solving example 9 & 10.
N.B. When the integrand is the quotient of two polynomials and the numerator is of equal or greater degree than the denominator, always divide the denominator into the numerator first.
Find an antiderivative \(F(x)\) of \(f(x) = 3x^2\) that satisfies \(F(1) = -1\).
By the power rule, we can easily find the general antiderivative \[F(x)=x^3+C\] To determine a specific value for C, we use the condition \(F(1) = -1\). Substituting \(x = 1\) into \(f(x) = x^3 + C\) gives \[F(1) =1+C=-1.\] So \(C=-2\), and \(F(x)=x^3-2\) is the antiderivative satisfying \(F(1) = -1\).
Finding an antiderivative for a function \(f(x)\) is the same problem as finding a function \(y(x)\) that satisfies the equation \[\frac{dy}{dx}=f(x).\]This is called a differential equation, since it is an equation involving an unknown function \(y\) that is being differentiated.
To solve it, we need a function \(y(x)\) that satisfies the equation. This function is found by taking the antiderivative of \(f(x)\). We can fix the arbitrary constant arising in the antidifferentiation process by specifying an initial condition \[y(x_0)=y_0.\] This condition means the function \(y(x)\) has the value \(y_0\) when \(x = x_0\).
The combination of a differential equation and an initial condition is called an initial value problem. Such problems play important roles in all branches of science.
The most general antiderivative \(F(x) + C\) of the function \(f(x)\) (such as \(x^3 + C\) for the function \(3x^2\) in the heuristic example) gives the general solution \(y = F(x) + C\) of the differential equation \(\frac{dy}{dx}=f(x)\). The general solution gives all the solutions of the equation (there are infinitely many, one for each value of \(C\)).
We solve the differential equation by finding its general solution. We then solve the initial value problem by finding the particular solution that satisfies the initial condition \(y(x_0) = y_0\). In the heuristic example, the function \(y = x^3 - 2\) is the particular solution of the differential equation \(\frac{dy}{dx}= 3x^2\) satisfying the initial condition \(y(1) = -1\).
To solve a differential equation is to find an unknown function., which in general is a difficult job. In this section, we consider only the simplest type, first-order separable differential equations. These are equations involving just the first derivative of the unknown function and are such that the variables can be separated, one on each side of the equation.
Now, we have found the general solution to the differential equation. Next step is to find the particular solution so as to solve the initial value problem.
Given the acceleration \(a(x)\), find the velocity \(v(x)\) and the position/displacement \(s(x)\).
The procedure of Example 3 leads to the well-known falling-body formulas:
\[\begin{aligned} v&=at+v_0\\ s&=\frac{1}{2}at^2+v_0t+s_0 \end{aligned} \]
Now, we solve the Differential Equation through separating variables and integrating, and obtain
\[\begin{aligned} \frac{dy}{y}&=kdt\\ \int\frac{dy}{y}&=\int k dt\\ \ln y &=kt+C \end{aligned}\]
With the initial condition \(y=y_0\) at \(t=0\), we substitute and obtain \(C=\ln y_0\). Thus, \[\begin{aligned} \ln y-\ln y_0&=kt\\\ln \frac{y}{y_0}&=kt\\ \frac{y}{y_0}&=e^{kt}\end{aligned}\]
Finally, the size of population at time \(t\) is\[y=y_0e^{kt}\]
When \(k>0\), this type of growth is called exponential growth, and when \(k<0\), it is called exponential decay.
Example 1, page 263. Predict the doubling time.
Example 2, page 263. To predict the bacteria, we can still use the formula for the world’s population growth.
N.B. The exponential model \(y=y_0e^{kt}, k>0\), for population growth is flawed since it projects faster and faster growth indefinitely far into the future. In most cases (including that of world population), the limited amount of space and resources will eventually force a slowing of the growth rate.
This suggests another model for population growth, called the logistic model, in which we assume that the rate of growth is proportional both to the population size \(y\) and to the difference \(L-y\), where \(L\) is the maximum population that can be supported. This leads to the differential equation \[\frac{dy}{dt}=ky(L-y)\] For small \(y\), \(dy/dt\approx kLy\), which suggests exponential-type growth. But as \(y\) nears \(L\), growth is curtailed and \(dy/dt\) gets smaller and smaller, producing a growth curve like Figure 2.
Not everything grows; some things decrease over time. For example, radioactive elements decay, and they do it at a rate proportional to the amount present. Thus, their change rates also satisfy the differential equation \[\frac{dy}{dt}=ky\] but now \(k\) is negative. It is still true that \(y=y_0 e^{kt}\) is the solution to this equation.
Newton’s Law of Cooling states that the rate at which an object cools (or warms) is proportional to the difference in temperature between the object and the surrounding medium.
Suppose that an object initially at temperature \(T_0\) is placed in a room where the temperature is \(T_1\). If \(T(t)\) represents the temperature of the object at time \(t\), then Newton’s Law of Cooling says that \[\frac{dT}{dt}=k(T-T_1)\] This differential equation is separable and can be solved like the growth and decay problems in this section.
Recall the formula of the continuous compounding of interest we learnt in section 2.6,