When we face physical problems, they habitually involve the "rate of change" of one quantity with respect to
another.
For example, in a first course on physics, you will encounter the rate of change of distance with respect to time, called velocity, the rate of change of velocity with respect to time, called acceleration, the rate of change of length (of a metal rod, say) with respect to temperature, called the coefficient of linear expansion, the rate of change of mass (of a wire of variable cross section, say) with respect to length, called the linear density. These are all special cases of the general mathematical concept of the rate of change or derivative of a function with respect to its
argument.
To see just how the derivative should be defined, we now take a closer look at one of the physical quantities just enumerated:
Example 3.1.1 The velocity of a particle moving along a straight line is given by the function v(t), where t is the time. The average velocity of the particle over the time interval [t,t+Δt] is given by the formula
Δtv(t+Δt)−v(t).
the instantaneous velocity of the particle at time t is the limit of the average velocity as Δt approaches zero. This limit is called the derivative of v(t) at t and is denoted by v′(t).
3.2 Definition of the Derivative
Definition 3.2.1 Let f be a function defined on an open interval I containing the point a. The derivative of f at a, denoted by f′(a), is defined by the formula
f′(a)=Δx→0limΔxf(a+Δx)−f(a),
provided that this limit exists. The operation leads f to its derivative is called differentiation. If f fas a finite derivative at a, then f is said to be differentiable at a. Generally, if f is differentiable at every point of an interval I, then f is said to be differentiable on I.
Remark: The quotient Δxf(a+Δx)−f(a) is called the difference quotient of f at a. It is introduced to measure the average rate of change of f over the interval [a,a+Δx].
Remark: . The distinction between f having a derivative at x and being differentiable at x is
important. In the first case, f′(x) may be infinite, but not in the second case.
Example 3.2.1 The constant function f(x)=k is differentiable at every point of its domain, and its derivative is zero at every point. The reason is that
f′(x)=Δx→0limΔxf(x+Δx)−f(x)=Δx→0limΔxk−k=0.
Example 3.2.2 The function f(x)=x is also differentiable at every point of its domain, and its derivative is one at every point. The reason is that
Since every term in the limit is zero except the first term, we have f′(x)=nxn−1.
Remark: This is the power rule for differentiation. It is a very useful rule for differentiating polynomials. But one may note that the power is only allowed to be a positive integer, for the cases that the power is a negative integer or a fraction, the power rule is not applicable.
Exercises for this section
A particle moves along a straight line with equation of motion
s(t)=31t3−3t2+9t+1.
Find the velocity and acceleration of the particle at time t.
Remark: The derivative of ex is ex. This is a very important result, as it shows that the exponential function is its own derivative.
Next, we would like to interpret the relationship between the derivative and continuity.
Theorem 3.3.1: If f is differentiable at a, then f is continuous at a.
Proof: Since f is differentiable at a, we have
f′(a)=Δx→0limΔxf(a+Δx)−f(a).
Then we have
Δx→0limf(a+Δx)−f(a)=Δx→0limf′(a)Δx=0.
It follows that
x→alimf(x)=f(a),
which means that f is continuous at a.
But what about the converse of the theorem? That is, if f is continuous at a, is f differentiable at a? We would like to make it as your exercise.
Exercises for this section
For what choice of a,b is the function f(x)={x2ax+bif x<0,if x≥0, differentiable at x=0?
Find the derivatives of the following functions:
f(x)=cos2x+sin2x
f(x)=xsinx
3.4 Curves and Tangents
Roughly speaking, a curve is a geometric figure which can be drawn without lifting pen from paper. It can be a straight line, a circle, a parabola, or a more complicated figure. The tangent to a curve at a point is a straight line which touches the curve at that point. The slope of the tangent is the derivative of the curve at that point.
Example 3.4.1: The graph of f(x)=xsinx is not a curve. The reason is that the function is not defined at x=0.
Example 3.4.2: The graph of f(x)=x1 if x>0 is a curve, but the graph of f(x)=x1 if x=0 is not a curve. The reason is that the function is not continuous at x=0.
Now let P(x0,y0) be a fixed point and Q(x,y) be a variable point on the curve y=f(x). Now the line passing through P and Q is called the secant to the curve at Q. Then let θ be the inclination of the secant to the x-axis. Then the slope of the secant is
tanθ=x−x0y−y0, or
tanθ=ΔxΔy
in terms of the increment Δx=x−x0 and Δy=y−y0.
The slope of the tangent is the limit of the slope of the secant as Q approaches P. That is, the slope of the tangent is
To illustrate, one may think of the following figure:
Now suppose the point Q is moving along the curve y=f(x) and approaches the point P. More exactly the distance between P and Q is
∣PQ∣=(Δx)2+(Δy)2.
approches zero. Then the secant line also varies, rotating about the point P. If the curve y=f(x) is "well-bahaved" near the point P, then the limit
m=Q→PlimΔxΔy=∣PQ∣→0limΔxΔy
exists (one may note that it might be infinite). The line T through P with slope m is called the tangent to the curve at P. It follows from theorem that T is the line
y=m(x−x0)+y0.
if m is finite, and the line x=x0 if m is infinite. Speaking qualitatively, the tangent at P is the "limiting position" of the secant through P and Q as Q approaches P.
The following theorem gives the connection between tangents and derivatives.
Theorem 3.4.1: The curve y=f(x) has a tangent T at the point P(x0,y0) if and only if the derivative f′(x0) exists. In this case, the slope of the tangent is f′(x0).
Proof: Let Q be the point (x0+Δx,f(x0+Δx)) on the curve. Since y=f(x) is a curve, the function is continuous at x0 which implies that
Δx→0limf(x0+Δx)=f(x0).
or equivalently
Δx→0limf(x0+Δx)−f(x0)=Δx→0limΔy=0.
Therefore the distance between P and Q is
∣PQ∣=(Δx)2+(Δy)2
approaches zero as Δx approaches zero. Therefore,
∣PQ∣→0limΔxΔy
exists. This limit is the slope of the tangent at P. This completes the proof.
Now, time for some simple example.
Example 3.4.3: Find the equation of the tangent to the curve y=x2 at the point P(x0,y0).
Solution: The derivative of y=x2 is y′=2x. Therefore the slope of the tangent at P(x0,y0) is 2x0. The equation of the tangent is
y−y0=2x0(x−x0).
or equivalently
y=2x0(x−x0)+y0.
Example 3.4.4: For what value of a are the curves y=f1(x)=1−ax2 and y=f2(x)=x2 orthogonal?
Solution: Solving the equation
1−ax2=x2,
we find that the curves intersect at the point (±x0,x02), where
x0=1+a1.
At these points, the slopes of the tangents to the curves are
m1=f1′(±x0)=∓1+a2a
and
m2=f2′(±x0)=±1+a2
Therefore, the tangents and hence the curves are orthogonal if and only if
m1⋅m2=−1+a4a=−1,
which implies that a=31.
Exercises for this section
Find the tangent to the curves:
y=31x3 at the point (−1,−31).
y=x2+48 at the point (1,1).
y=sinx at the point (π,0).
3.5 Techniques of Differentiation
After we have discussed derivatives in a theoretical way, we now discuss some techniques of differentiation.
Theorem 3.5.1 (Derivative of sum or difference): If f and g are differentiable at x, then f±g is differentiable at x and
(f±g)′(x)=f′(x)±g′(x).
One may note that the proof of this theorem is straightforward from the definition of the derivative. We leave it as an exercise.
Corollary 3.5.1: If f1,f2,⋯,fn are differentiable at x, then f1±f2±⋯±fn is differentiable at x and
(f1±f2±⋯±fn)′(x)=f1′(x)±f2′(x)±⋯±fn′(x).
Theorem 3.5.2 (Derivative of a constant multiple): If f is differentiable at x and k is a constant, then kf is differentiable at x and
(kf)′(x)=kf′(x).
Theorem 3.5.3 (Derivative of a product): If f and g are differentiable at x, then fg is differentiable at x and
The following theorem is very useful in the differentiation of composite functions. Composite function might be not familiar to you, briefly speaking, it is a function of a function. Suppose we have two functions f(x)=x2 and g(x)=sinx, then the composite function is f(g(x))=sin2x.
Theorem 3.5.5 (Derivative of a composite function): If f is differentiable at g(x) and g is differentiable at x, then f∘g is differentiable at x and
Remark: One may call the theorem as the chain rule for differentiation. In some books they might give you the notation of the chain rule as
dxdf(g(x))=f′(g(x))g′(x).
or
dxdy=dudy⋅dxdu.
For a new beginner, it might be a little bit confusing for what is du and dy. But one may think of dy as the derivative of y with respect to u and du as the derivative of u with respect to x. Then the chain rule is just the product of the two derivatives.
However, students should not mistake the form dxdy as a fraction. It is not a fraction, but a notation for the derivative of y with respect to x. In your further study in mathematics (If you are really interested in), you will know that it is 1-form in differential geometry.
Example 3.5.3: Differentiate the function f(x)=sin(x2).
Solution: We observe that f(x)=sin(x2)=sin(g(x)) where g(x)=x2. Then we have
f′(x)=cos(x2)⋅2x=2xcos(x2).
Example 3.5.4: Differentiate the function f(x)=ex2.
Solution: We observe that f(x)=ex2=eg(x) where g(x)=x2. Then we have
f′(x)=ex2⋅2x=2xex2.
Exercises for this section
Differentiate the following:
(x−a)(x−b)
x21
21x2cosx
x2+11
sin(sin(sinx)) (Hint: An extension of the chain rule)
Prove the idenity
1+x+x2+⋯+xn=x−1xn+1−1
where x=1.
Then differentiate both sides with respect to x to deduce a formula for the following sum:
1+2x+3x2+⋯+nxn−1.
3.6 Differentials. Further Notation
Suppose f is differentiable at x. Then the differential of f at x is defined by
df(x)=f′(x)dx.
The differential df(x) is a linear function of dx. It is a very useful concept in the study of differential equations. For numerical purposes, we may approximate the increment Δy of f by the differential dy of f as
Δy≈dy=f′(x)dx.
Let us consider the following example.
Example 3.6.1: Find the increment Δy and the differential dy of the function y=x2 for x=20 and Δx=0.1. What is the percentage error in the approximation of Δy by dy?
Remark: The differential dy is a linear approximation to the increment Δy. The percentage error in the approximation is small, which shows that the differential is a good approximation to the increment.
Example 3.6.2: Estimate the value of 16.1.
Solution: First, we know that f(x)=x is differentiable at x=16. Then we have
Δfdf=x+Δx−x=(x)′Δx=2x1Δx.
Then we have
x+Δx≈x+2x1Δx.
Substitute x=16 and Δx=0.1, we have
16.1≈4+2⋅41⋅0.1=4.0125.
Remark: This section is important for a taste of the concept of numerical analysis. In the study of numerical analysis, one may encounter the concept of Taylor series which is a generalization of the concept of differentials.
3.7 Implicit Differentiation
Given an equation F(x,y)=0, we may differentiate the equation with respect to x to find the derivative of y with respect to x. This is called implicit differentiation.
Example 3.7.1: Find y′ if y6−y−x2=0.
Solution: Differentiating the equation with respect to x, we have
6y5dxdy−dxdy−2x=0.
Then we have
dxdy=6y5−12x.
The following is a more practical or real-world example.
Example 3.7.2: A spherical balloon is being inflated so that its radius is increasing at a rate of 0.1 cm/s. How fast is the volume of the balloon increasing when the radius is 10 cm?
Solution: Let r be the radius of the balloon and V be the volume of the balloon. Then we have
V=34πr3.
Differentiating the equation with respect to t, we have
dtdV=4πr2dtdr.
Substitute r=10 and dtdr=0.1, we have
dtdV=4π⋅102⋅0.1=40π.
Therefore the volume of the balloon is increasing at a rate of 40π cm$^3$/s.
Exercises for this section
Find y′ if
y3−3y+2ax=0.
y2−2xy+b2=0.
Water is slowly poured at the rate of 3 cm$^3$/s into a conical container of height 10 cm and base radius 5 cm. How fast is the water level rising when the water is 4 cm deep?
A ladder of length 10 m is leaning against a wall. If the foot of the ladder is being pulled away from the wall at the rate of 0.1 m/s, how fast is the top of the ladder sliding down the wall when the foot of the ladder is 6 m away from the wall?
3.8 Higher Derivatives
Let f be a function defined in an interval I(closed, open or half open, finite or infinte), with endpoints a and b (a<b). Then f is said to be differentiable on I if the derivative f′(x) exists at every point x in I which has been dicussed in the previous sections. If f′ is differentiable on I, then the derivative of f′ is called the second derivative of f and is denoted by f′′. If f′′ is differentiable on I, then the derivative of f′′ is called the third derivative of f and is denoted by f′′′. In general, the $n$th derivative of f is denoted by f(n).
One may wonder why we have to introduce the concept of higher derivatives. The reason is that the higher derivatives of a function may give us some information about the function. For example, the second derivative of a function may give us the concavity of the function. The third derivative of a function may give us the rate of change of the concavity of the function. The fourth derivative of a function may give us the rate of change of the rate of change of the concavity of the function. And so on.
Example 3.8.1: Find the second derivative of the function f(x)=x3.
Solution: We have f′(x)=3x2. Then we have f′′(x)=6x.
Example 3.8.2: Find the third derivative of the function f(x)=sinx.
Solution: We have f′(x)=cosx. Then we have f′′(x)=−sinx. Finally we have f′′′(x)=−cosx.
when written out full. The binomial coefficients are used in the expansion of the product of two binomials.
Remark: The Example 3.8.3 is not a coincidence. It is a general rule for the differentiation of the product of two functions. The rule is called the Leibniz rule.
Theorem 3.8.1 (Leibniz rule): If f and g are n times differentiable at x, then the $n$th derivative of the product f(x)g(x) is
(f(x)g(x))(n)=k=0∑n(kn)f(n−k)(x)g(k)(x).
Proof: We may prove the theorem by induction. Obviously the theorem is true for n=1. Suppose the theorem is true for n=m. Then we have
A moving particle has equation of motion s=10+20t–5t2. Find the particle’s velocity and acceleration at time t=2. Does the particle’s acceleration ever change?
3.9 Maxima and Minima
Differentiation can be used to help locate maxima and minima of functions. There are two different uses of the word "maximum" in mathematics. One is the absolute maximum or minimum of a function, which is the largest or smallest value of the function over its entire domain. The other is the local maximum or minimum of a function, which is the largest or smallest value of the function in some neighborhood of a point. The local maximum or minimum is also called the relative maximum or minimum.
Theorem 3.9.1 (First derivative test): If f is differentiable at x0 and f′(x0)=0, then f has a local maximum or minimum at x0.
Proof: If f′(x0)=0, then the tangent to the curve y=f(x) at x0 is horizontal. Therefore the curve has a horizontal tangent at x0. This implies that the curve has a local maximum or minimum at x0. This completes the proof.
Remark: The first derivative test is a very useful tool in the study of maxima and minima of functions. The first derivative test is also called the stationary point test. One may also wonder why the first derivative test can only give us the local maximum or minimum of a function. The reason is that the first derivative test can only give us the critical points of a function. The critical points of a function are the points where the derivative of the function is zero or undefined. The critical points of a function are the points where the function may have a local maximum or minimum.
Theorem 3.9.2 (Second derivative test): If f is twice differentiable at x0 and f′(x0)=0, then
If f′′(x0)>0, then f has a local minimum at x0.
If f′′(x0)<0, then f has a local maximum at x0.
If f′′(x0)=0, then the test is inconclusive.
If f′′(x0) does not exist, then the test is inconclusive.
Proof: If f′′(x0)>0, then the curve y=f(x) is concave up at x0. Therefore the curve has a local minimum at x0. If f′′(x0)<0, then the curve y=f(x) is concave down at x0. Therefore the curve has a local maximum at x0. If f′′(x0)=0, then the test is inconclusive. If f′′(x0) does not exist, then the test is inconclusive. This completes the proof.
Example 3.9.1: Determine the local maximum and minimum of the function f(x)=x3−3x2+2.
Solution: We have f′(x)=3x2−6x=3x(x−2). Therefore f′(x)=0 at x=0 and x=2. Then we have f′′(x)=6x−6. Therefore f′′(0)=−6 and f′′(2)=6. Therefore f has a local maximum at x=0 and a local minimum at x=2.
Example 3.9.2: Determine the local maximum and minimum of the function f(x)=sinx.
Solution: We have f′(x)=cosx. Therefore f′(x)=0 at x=2π+nπ where n is an integer. Then we have f′′(x)=−sinx. Therefore f′′(2π+nπ)=−1. Therefore f has a local maximum at x=2π+nπ.
3.10 Rolle's Theorem and Further Applications
Let f be differentiable on the closed interval I=[a,b] and continuous on the open interval (a,b). If f(a)=f(b)=0, suppose that f is nonzero in at least one point of the open interval (a,b). Then arguing heuristically, one may translate the horizontal axis parallel to itself, until it becomes tangent to the graph of f at some point c in the open interval (a,b). Then the graph of f will have a horizontal tangent at c. In this case, the derivative of f at c is zero. This is the content of the following theorem.
Theorem 3.9.1 (Rolle's Theorem): If f is differentiable on the closed interval I=[a,b] and continuous on the open interval (a,b), and f(a)=f(b)=0, then there exists a point c in the open interval (a,b) such that f′(c)=0.
Proof: Since f is continuous on the closed interval I=[a,b], then by the extreme value theorem, f attains its maximum and minimum values on the interval I. Since f(a)=f(b)=0, then f attains its maximum and minimum values on the open interval (a,b). If f is nonzero in at least one point of the open interval (a,b), then f attains its maximum and minimum values on the open interval (a,b), and hence f attains its maximum or minimum value at some point c in the open interval (a,b). Since f attains its maximum or minimum value at c, then f′(c)=0. This completes the proof.
To illustrate the theorem, we consider the following figure:
The following example is a typical application of Rolle's theorem.
Example 3.10.1: Given a,b,c∈R, prove that the equation 4ax3+3bx2+2cx=a+b+c has at least one real root between 0 and 1.
Solution: Let f(x)=4ax3+3bx2+2cx−a−b−c. Then we have f(0)=−a−b−c and f(1)=4a+3b+2c−a−b−c=3a+2b+c. One then other hand, if f(x)=ax4+bx3+cx2−(a+b+c)x, then f(0)=0 and f(1)=0. Therefore by Rolle's theorem, there exists a point c in the open interval (0,1) such that f′(c)=0. Therefore 4ac3+3bc2+2c2−(a+b+c)=0. This completes the proof.
Remark: The proof of Example 3.10.1 is a typical application of Rolle's theorem. One may wonder why the equation 4ax3+3bx2+2cx=a+b+c has at least one real root between 0 and 1. The reason is that the equation 4ax3+3bx2+2cx=a+b+c is a cubic equation. The cubic equation has at least one real root. The proof of Example 3.10.1 is a typical application of Rolle's theorem.
After what we have learned about Rolle's theorem, one may wonder what if f(a),f(b) be any real numbers. The slope of the secant line to the graph of f at the points (a,f(a)) and (b,f(b)) is b−af(b)−f(a). The slope of the tangent line to the graph of f at some point c in the open interval (a,b) is f′(c). If the slope of the secant line is equal to the slope of the tangent line, then the graph of f will have a tangent line at some point c in the open interval (a,b). This is the content of the following theorem.
Theorem 3.10.2 (Lagrange Mean Value Theorem): If f is differentiable on the closed interval I=[a,b] and continuous on the open interval (a,b), then there exists a point c in the open interval (a,b) such that
f′(c)=b−af(b)−f(a).
Proof: The proof is a constructive proof. Let g(x)=f(x)−b−af(b)−f(a)x. Then g(a)=f(a) and g(b)=f(b). Since g is continuous on the closed interval I=[a,b] and differentiable on the open interval (a,b), then by Rolle's theorem, there exists a point c in the open interval (a,b) such that g′(c)=0. Therefore f′(c)=b−af(b)−f(a). This completes the proof.
Remark: In order not to confuse with the Cauchy Mean Value Theorem, one may call the theorem as the Lagrange Mean Value Theorem. The Lagrange Mean Value Theorem is a very useful tool in the study of the mean value of a function. The Lagrange Mean Value Theorem is also called the mean value theorem.
Lagrange Mean Value Theorem is a very useful tool in the study of the mean value of a function. We may encounter a real-world example of the Lagrange Mean Value Theorem in the study of the average velocity of a moving particle. One typical example is about determining whether the driver of a car has exceeded the speed limit. The average velocity of a moving particle is the total displacement of the particle divided by the total time taken. The average velocity of a moving particle is the slope of the secant line to the graph of the position function of the particle at the initial and final points. The instantaneous velocity of a moving particle is the slope of the tangent line to the graph of the position function of the particle at some point. If the average velocity of a moving particle is equal to the instantaneous velocity of the particle at some point, then the driver of the car has not exceeded the speed limit. This is the content of the following example.
Example 3.10.2: A car travels along a straight road. The position of the car at time t is given by s(t)=t3−6t2+9t+3. Determine whether the driver of the car has exceeded the speed limit at time t=3 where the speed limit is 60 km/h.
Solution: The velocity of the car at time t is given by v(t)=s′(t)=3t2−12t+9. The average velocity of the car from time t=0 to time t=3 is given by
3−0s(3)−s(0)=333−6⋅32+9⋅3+3−0=9.
The instantaneous velocity of the car at time t=3 is given by v(3)=3⋅32−12⋅3+9=0. Therefore by the Lagrange Mean Value Theorem, there exists a point c in the open interval (0,3) such that v(c)=3−0s(3)−s(0). Therefore the driver of the car has not exceeded the speed limit at time t=3.
After we have discussed the Lagrange Mean Value Theorem, then we may also dicuss the Cauchy Mean Value Theorem. The Cauchy Mean Value Theorem is a generalization of the Lagrange Mean Value Theorem. The Cauchy Mean Value Theorem is a very useful tool in the study of the mean value of a function. The Cauchy Mean Value Theorem is also called the generalized mean value theorem.
Theorem 3.10.3 (Cauchy Mean Value Theorem): If f and g are differentiable on the closed interval I=[a,b] and continuous on the open interval (a,b), then there exists a point c in the open interval (a,b) such that
(f(b)−f(a))g′(c)=(g(b)−g(a))f′(c).
or equivalently
g(b)−g(a)f(b)−f(a)=g′(c)f′(c).
Proof: Let h(x)=(f(b)−f(a))g(x)−(g(b)−g(a))f(x). Then h(a)=h(b)=0. Since h is continuous on the closed interval I=[a,b] and differentiable on the open interval (a,b), then by Rolle's theorem, there exists a point c in the open interval (a,b) such that h′(c)=0. Therefore f′(c)(f(b)−f(a))=g′(c)(g(b)−g(a)). This completes the proof.
Remark: The proof of the Cauchy Mean Value Theorem is also a constructive proof. The Cauchy Mean Value Theorem is an extension of the Lagrange Mean Value Theorem, which can also allow us to discuss the L'Hospital's rule.
Theorem 3.10.4 (L'Hospital's rule): If limx→af(x)=limx→ag(x)=0 or limx→af(x)=±∞ and limx→ag(x)=±∞, then
x→alimg(x)f(x)=x→alimg′(x)f′(x).
Remark: The proof for L'Hospital's rule is a direct application of the Cauchy Mean Value Theorem which you may encounter in your further study in mathematics. L'Hospital's rule is a very useful tool in the study of the limit of a function, especially when the limit of the function is in the form of 00 or ∞∞.
Exercises for this section
Prove that the equation x3−3x+1=0 has exactly one real root.
Find the limit for the following functions:
limx→0xsinx.
limx→0x1−cosx.
limx→0xex−1.
limx→0xln(1+x).
3.11 Applications
Now, we have acquired the basic knowledge of differentiation. We may now apply the concept of differentiation to solve some real-world problems. The following are some applications of differentiation.
Optimization: The concept of differentiation can be used to find the maximum or minimum value of a function. The maximum or minimum value of a function is called the optimal value of the function. The optimal value of a function is very useful in the study of optimization problems. The optimization problems are very useful in the study of economics, engineering, physics, and other fields of study.
Related Rates: The concept of differentiation can be used to find the rate of change of a function with respect to another function. The rate of change of a function with respect to another function is called the related rate of the function. The related rate of a function is very useful in the study of physics, engineering, and other fields of study.
Linear Approximation: The concept of differentiation can be used to find the linear approximation of a function. The linear approximation of a function is a linear function that approximates the function at some point. The linear approximation of a function is very useful in the study of numerical analysis.
Antiderivatives: The concept of differentiation can be used to find the antiderivative of a function. The antiderivative of a function is the reverse process of differentiation. The antiderivative of a function is very useful in the study of integral calculus.
These are the topics we will (try to) cover in the future, but now we will try to tackle with the basic applications of differentiation.
Example 3.11.1: What is the maximum area of a rectangle with a perimeter of 100 m?
Solution: Let x be the length of the rectangle and y be the width of the rectangle. Then we have 2x+2y=100. Therefore x+y=50. The area of the rectangle is A=xy. Then we have y=50−x. Therefore A=x(50−x)=50x−x2. Then we have A′=50−2x which implies that A′=0 at x=25. We have A′′=−2 and A′′(25)=−2<0, it follows that the area of the rectangle is maximized when the length of the rectangle is 25 m and the width of the rectangle is 25 m. The maximum area of the rectangle is 625 m$^2$.
Example 3.11.2: A ladder of length 10 m is leaning against a wall. If the foot of the ladder is being pulled away from the wall at the rate of 0.1 m/s, how fast is the top of the ladder sliding down the wall when the foot of the ladder is 6 m away from the wall?
Solution: Let x be the distance of the foot of the ladder from the wall and y be the height of the ladder on the wall. Then we have x2+y2=102. Differentiating the equation with respect to t, we have 2xdtdx+2ydtdy=0. Substitute x=6 and dtdx=0.1, we have 2⋅6⋅0.1+2ydtdy=0. Therefore dtdy=−0.01 m/s. Therefore the top of the ladder is sliding down the wall at the rate of 0.01 m/s.
Exercises for this section
Among all rectangles of given area A, show that the square has the smallest perimeter.
Find the right triangle of greatest area, given that the sum of one leg of the triangle and the hypotenuse is a constant.
3.12 Antiderivatives
The concept of antiderivatives is the reverse process of differentiation. Suppose F is a function defined on an interval I. If f is the derivative of F, then F is called an antiderivative of f. The antiderivative of a function is not unique. If F is an antiderivative of f, then F+C is also an antiderivative of f for any constant C. The antiderivative of a function is denoted by ∫f(x)dx.
Here we consider some antiderivatives for some elementary functions.
∫xndx=n+1xn+1+C for n=−1.
∫x1dx=ln∣x∣+C.
∫exdx=ex+C.
∫sinxdx=−cosx+C.
∫cosxdx=sinx+C.
∫sec2xdx=tanx+C.
∫csc2xdx=−cotx+C.
The proof for the above antiderivatives is a direct application of the differentiation of the antiderivatives. The antiderivatives of the elementary functions are very useful in the study of the integral calculus.
Example 3.11.1: Find the antiderivative of the function f(x)=3x2−6x+2.
We will discuss more about the concept of antiderivatives in the next chapter which is about integration. This section is just a glance of the concept of antiderivatives. The exercises are just for students to think about whether the antiderivatives of the elementary functions are correct.
Exercises for this section
Prove the following:
∫xndx=n+1xn+1+C for n=−1.
∫x1dx=ln∣x∣+C.
∫exdx=ex+C.
∫sinxdx=−cosx+C.
∫cosxdx=sinx+C.
3.13 Using Python to Differentiate
In this section, we will use Python to differentiate some functions. We will use the sympy library in Python to differentiate the functions. The sympy library is a very useful library in Python for symbolic mathematics. The sympy library can be used to differentiate the functions symbolically. The following is the code to differentiate the functions symbolically.
import sympy as sp
x = sp.symbols('x') # Define the variable x
f = x**3 - 3*x**2 + 2# Define the function f(x) = x^3 - 3x^2 + 2
f_prime = sp.diff(f, x) # Differentiate the function f with respect to xprint(f_prime) # Print the derivative of the function f
The above code will differentiate the function f(x)=x3−3x2+2 with respect to x. The output of the code will be 3x2−6x which is the derivative of the function f(x)=x3−3x2+2. Based on the above code, could you think of how to differentiate the function f(x)=sinx with respect to x?
Since we have also discussed the L'Hospital's rule, we may also use Python to evaluate the limit of a function. The following is the code to evaluate the limit of a function using Python.
import sympy as sp
x = sp.symbols('x') # Define the variable x
f = sp.sin(x)/x # Define the function f(x) = sin(x)/x
limit_f = sp.limit(f, x, 0) # Evaluate the limit of the function f as x approaches 0print(limit_f) # Print the limit of the function f
Here is another one for the limit where the function is f(x)=exx where x approaches ∞.
import sympy as sp
x = sp.symbols('x') # Define the variable x
f = x/sp.exp(x) # Define the function f(x) = x/exp(x)
limit_f = sp.limit(f, x, sp.oo) # Evaluate the limit of the function f as x approaches infinity, we use sp.oo for infinity while negative infinity is -sp.ooprint(limit_f) # Print the limit of the function f
The above code will evaluate the limit of the function f(x)=exx as x approaches ∞. The output of the code will be 0 which is the limit of the function f(x)=exx as x approaches ∞. Based on the above code, could you think of how to evaluate the limit of the function f(x)=x1−cosx as x approaches 0?
Now, let us think about antiderivatives. We may also use Python to find the antiderivatives of some functions. The following is the code to find the antiderivatives of some functions using Python.
import sympy as sp
x = sp.symbols('x') # Define the variable x
f = x**3 - 3*x**2 + 2# Define the function f(x) = x^3 - 3x^2 + 2
F = sp.integrate(f, x) # Find the antiderivative of the function f with respect to xprint(F) # Print the antiderivative of the function f
The above code will find the antiderivative of the function f(x)=x3−3x2+2 with respect to x. The output of the code will be 4x4−x3+2x+C which is the antiderivative of the function f(x)=x3−3x2+2. Based on the above code, could you think of how to find the antiderivative of the function f(x)=sinx with respect to $x?
Exercises for this section
Differentiate the following functions using Python:
f(x)=x3−3x2+2.
f(x)=sinx.
f(x)=ex.
f(x)=cosx.
f(x)=sec2x+csc2x⋅cotx.
f(x)=x2+11.
Find the limit of the following functions using Python:
f(x)=xsinx as x approaches 0.
f(x)=x−1x2−1 as x approaches 1.
f(x)=xex−1 as x approaches 0.
f(x)=xln(1+x) as x approaches 0.
f(x)=x2+12x2−1 as x approaches ∞.
Find the antiderivative of the following functions using Python:
f(x)=x3−3x2+2.
f(x)=sinx⋅cosx.
f(x)=e2x+1.
References
Silverman, Richard A. Modern calculus and analytic geometry. Courier Corporation, 2002.
Neto, Antonio Caminha Muniz. An Excursion through Elementary Mathematics, Volume I: Real Numbers and Functions. Springer, 2017.