4.1.1 Antiderivative, Integrand, and Variable of Integration
Recall what we have learned in the previous chapter, we know that the derivative of a function is a function that gives the rate of change of the original function. In this chapter, we will learn the opposite of differentiation.
Given a function f(x) defined on an interval I, suppose there is a function F(x) defined in I such that
F′(x)=dxdF(x)=f(x)
for all x in I. Then, we say that F(x) is an antiderivative of f(x) on I. Now, consider finding the antiderivative of a function f(x)=x2.
By what we have learned in differentiation, we know that the derivative of x3 is 3x2. Therefore, we can say that 31x3 is an antiderivative of x2. However, one may propose another question: is 31x3+1 also an antiderivative of x2? The answer is yes, because the derivative of a constant is zero. In other words, the antiderivative of a function is not unique. In general, if F(x) is an antiderivative of f(x), then F(x)+C is also an antiderivative of f(x), where C is a constant.
Now, we introduce the concept of indefinite integral. The definition is as follows:
Definition 4.1.1 If F(x) is an antiderivative of f(x) on an interval I, then the expression F(x)+C involving arbitrary constant C is called an indefinite integral of f(x) on I, and is denoted by
∫f(x)dx=F(x)+C.
Remark: The symbol ∫ is called the integral sign, the operation leading from the function f(x), called integrand, to the indefinite integral F(x)+C is called integration, and the variable x is called the variable of integration.
Example 4.1.1 Clearly, by differentiation, we have
Remark: The fact that df(x)=f′(x)dx suggests the definition
∫df(x)=∫f′(x)dx.
It then follows from Theorem 4.1.1 that
∫df(x)=∫f′(x)dx=f(x)+C.
By comparison, one may observe that the symbols d and ∫ cancel each other when they are used together. And therefore, we may deduce an integration formula from any given differentiation formula.
For example, we have d(−cosx)=sinxdx, and hence
∫sinxdx=∫(−cosx)′dx=−cosx+C.
The formula
(a1arctanax)′=a1a2+x2a=a2+x21
implies that
∫a2+x21dx=a1arctanax+C.
and so on.
By continuing this process, we can obtain a large number of integration formulas from the differentiation formulas we have learned. In the following, we will list some of the most important integration formulas.
4.1.2 Basic Integration Formulas
∫xndx=n+11xn+1+C, where n=−1.
∫exdx=ex+C.
∫axdx=lna1ax+C.
∫sinxdx=−cosx+C.
∫cosxdx=sinx+C.
∫x1dx=ln∣x∣+C.
∫a2+x21dx=a1arctanax+C.
∫a2−x21dx=arcsinax+C.
∫x2+a21dx=ln(x+x2+a2)+C.
∫x2−a21dx=ln∣x+x2−a2∣+C.
∫sin2xdx=∫csc2xdx=−cotx+C.
∫cos2xdx=∫sec2xdx=tanx+C.
4.1.3 Properties of Indefinite Integrals
We know that if two functions' derivatives are the same, then the two functions differ by a constant. Then one may wonder if the derivatives of two functions are the same, then are the integrals of the two functions the same?
But indefinite integrals are defined only to within an arbitrary constant C, and in this sense, the integrals of two functions differing by a constant are the same.
The following properties of indefinite integrals are immediate consequences of the definition of the indefinite integral:
∫(f(x)+g(x))dx=∫f(x)dx+∫g(x)dx.
∫cf(x)dx=c∫f(x)dx.
Corollary 4.1.1 If f1(x),f2(x),⋯,fn(x) all have antiderivatives on an interval I, and if c1,c2,⋯,cn are constants, then
let t=t(x) be a differentiable function of x in an interval I such that g(t(x)) is defined and continuous on I. Then, by the chain rule, we have
dxdG(t(x))=G′(t(x))t′(x)=g(t(x))t′(x),
which implies that
∫g(t(x))t′(x)dx=G(t(x))+C.
This is the substitution rule for integration.
Suppose the integral
∫f(x)dx
can be recognized as being of the form
∫g(t(x))t′(x)dx
where t=t(x) is a differentiable function of x. Moreover, we can integrate g(t), obtaining
∫g(t)dt=G(t)+C.
Then, we can evaluate the integral of f(x)
∫f(x)dx=∫g(t(x))t′(x)dx=G(t(x))+C.
Now we try to use the substitution rule to evaluate the integral
Example 4.2.1 Evaluate
∫sin3xcosxdx.
Solution: Since we can have d(sinx)=cosxdx, we can let t=sinx, then dt=cosxdx. Therefore, we have
∫sin3xcosxdx=∫t3dt=41t4+C=41sin4x+C.
Example 4.2.2 Evaluate
∫a2−x2dx.
Solution: First, we observe that this integral contains a square root of a quadratic polynomial. One may think of using trigonometric functions to simplify since we have the identity
sin2x+cos2x=1.
Therefore, we let x=asint, then dx=acostdt. Therefore, we have
We now turn to another important technique of integration. Let u=u(x) and v=v(x) be differentiable functions of x such that u′(x)v(x) and u(x)v′(x) have antiderivatives. Then, by the product rule, we have
d(uv)=udv+vdu
and hence
udv=d(uv)−vdu
which implies that
∫udv=uv−∫vdu.
This is the integration by parts formula. However, one may wonder how does it relate to our integration problems. Let us consider the following example.
Example 4.2.3 Evaluate
∫xsinxdx.
Solution: We can let u=x and dv=sinxdx, then du=dx and v=−cosx. Therefore, we have
∫xsinxdx=−xcosx−∫−cosxdx=−xcosx+sinx+C.
Remark: One may wonder why we choose u=x and dv=sinxdx. The reason is that unlike sinx, x is simplified by differentiation. Therefore, we choose u=x and dv=sinxdx. The whole point is to make ∫vdu easier to integrate than ∫udv.
Example 4.2.4 Evaluate
∫lnxdx.
Solution: We can let u=lnx and dv=dx, then du=x1dx and v=x. Therefore, we have
∫lnxdx=xlnx−∫xx1dx=xlnx−∫dx=xlnx−x+C.
Remark: This example is to show that even we only have a logarithmic function, we can still use integration by parts to evaluate the integral.
Problems for this section
Use integration by substitution to evaluate
∫ex2xdx.
∫1+x4xdx.
∫xlnxdx.
Use integration by parts to evaluate
∫xcosxdx.
∫x3lnxdx.
∫xlnxdx.
4.3 Definite Integrals
The definite integral is one of the key concepts of Calculus, and is habitually encountered in various applications. Rigoriously, the definite integral we discussed in this section is the Riemann integral. We first begin by studying the following example.
Example 4.3.1: Given a particle moving along a straight line, let v=v(t) be the particle's velocity at time t. Find the distance traveled by the particle from time a to time b.
Solution: Assuming that the velocity is continuous (One may note that the physics meaning of velocity guarantees that the velocity is continuous), we divide the interval [a,b] into n small subintervals by introducing a large number of points of subdivision t1,t2,⋯,tn−1 such that a=t0<t1<t2<⋯<tn−1<tn=b, where, in the interest of a uniform notation, the end points a and b of the original interval are assigned alternative symbols t0 and tn, as if they were points of subdivision too. Let
Δti=ti−ti−1(i=1,2,⋯,n),
and let λ be the maximum length of the subintervals, i.e., let
Being continuous, the velocity does not change abruptly, and hence, it is a reasonable assumption that the velocity is approximately constant over each subinterval which we denoted by v(τi) during [ti−1,ti], where τi is a point in [ti−1,ti]. Then, the distance traveled by the particle during [ti−1,ti] is approximately
v(τi)(ti−ti−1)=v(τi)Δti,
and hence the distance traveled during the whole interval [a,b] is approximately
i=1∑nv(τi)Δti.
This approximation gets better as the subintervals [t0,t1],[t1,t2],⋯,[tn−1,tn] get jointly smaller. Therefore, the distance traveled by the particle from time a to time b is defined to be
λ→0limi=1∑nv(τi)Δti.
Remark: Let x=x(t) be the particle's poisition at time t. Then, since
v(t)=dtdx(t),
by the very definition of velocity, x(t) must be an antiderivative of v(t). On the other hand, in terms of x(t), the distance I (which we denoted) traveled by the particle from time a to time b is obviously x(b)−x(a). Therefore, we have
I=λ→0limi=1∑nv(τi)Δti=x(b)−x(a).
This is indeed true and is an immediate consequence of the very important theorem we are about to discuss, which is the Fundamental Theorem of Calculus.
Example 4.3.2 Find the area A of the plane region bounded by the lines x=a and x=b, the $x-$axis and the curve
y=f(x)(a≤x≤b),
where f(x)≥0
Solution: To illustrate, one may think of the following figure:
Figure 1: The area under the curve y=f(x) from x=a to x=b
Then we may think of the regions as a kind of trapezoid with three straight sides and on curved side. Such regions are not considered in elementary geometry. Hence we need to find a way to calculate the area of such regions. As in the preceding example, we divide the interval [a,b] into n subintervals by introducing points of subdivision x0,x1,⋯,xn such that a=x0<x1<x2<⋯<xn−1<xn=b. Let
Δxi=xi−xi−1(i=1,2,⋯,n),
and let λ be the maximum length of the subintervals, i.e., let
λ=max{Δx1,Δx2,⋯,Δxn}.
Then we may have the following figure:
Figure 2: The area under the curve y=f(x) from x=a to x=b divided into n subintervals
In the figure, we divide the region into n subintervals and approximate the area of each subinterval by a rectangle. Then, the total area of the region is approximately
i=1∑nf(ξi)Δxi,
where ξi is a point in [xi−1,xi]. This approximation gets better as the subintervals get smaller. Therefore, the area of the region we denoted by A is defined to be
A=λ→0limi=1∑nf(ξi)Δxi.
The existence of the limit is guaranteed by the continuity of f(x).
Moreover, many other geometrical and pphysical problems lead to expressions of the same kind. They are all instances of the key concept of a definite integral:
Definition 4.3.1 Given a function f(x) defined in an interval [a,b], let x1,…,xn−1 be points of subdivision such that
a=x0<x1<x2<⋯<xn−1<xn=b,
and let ξi be an arbitrary point of the subinterval [xi−1,xi], of length Δxi=xi−xi−1. Suppose the sum
σ=i=1∑nf(ξi)Δxi
approaches a (finite) limit as
λ=max{Δx1,Δx2,⋯,Δxn}→0.
Then, this limit is called the definite integral of f(x) from a to b, and is denoted by
∫abf(x)dx.
and the function f(x) is said to be integrable on [a,b].
Remark: Since definite integration is an operation producing a number from a given function f(x), the symbol chosen for the variable of integration is unimportant, and any other symbol would do as well. Thus
∫abf(x)dx=∫abf(t)dt=∫abf(u)du=⋯.
Theorem 4.3.1 If f(x) is continuous on [a,b], then f(x) is integrable on [a,b].
Exercises for this section
Write an expression for the area of the figure bounded by the curve y=lnx and the lines x=3,x=5,y=1.
Suppose a pot of water is heated up at the rate of f(t) degrees per minute. How much does the temperature of the water change after 10 minutes if f(t)=2t2−3t+1?
4.4 Properties of Definite Integrals
Since we have discussed the definition of definite integrals, we now turn to the properties of definite integrals.
Theorem 4.4.1 If f is continuous in [a,b], then
k∫abf(x)dx=∫abkf(x)dx
where k is a constant.
You may prove by using definition of definite integrals.
Theorem 4.4.2 If f and g are continuous in [a,b], then
∫ab(f(x)+g(x))dx=∫abf(x)dx+∫abg(x)dx.
Corollary 4.4.1 If f and g are continuous in [a,b], and k is arbitrary constant, then
∫ab(kf(x)+g(x))dx=k∫abf(x)dx+∫abg(x)dx.
Theorem 4.4.3 If f is continuous in [a,b], and if c is an interior point of [a,b], then
∫abf(x)dx=∫acf(x)dx+∫cbf(x)dx.
This Theorem has a more general case:
Theorem 4.4.4 If f is continuous an interval containing the points a,b,c, then
∫abf(x)dx=∫acf(x)dx+∫cbf(x)dx.
Remark: The Theorem 4.4.4 is a generalization of Theorem 4.4.3. In this theorem, the point c is not necessarily an interior point of [a,b].
Theorem 4.4.5 (Mean Value Theorem for Integrals) If f is continuous in [a,b], then there exists a point c in [a,b] such that
∫abf(x)dx=f(c)(b−a).
Remark: By moving the terms, we have the number
b−a1∫abf(x)dx
which is the average value of f(x) in [a,b].
Problems for this section
Prove that if f is continuous in [a,b], and if m≤f(x)≤M for all x in [a,b], then
m(b−a)≤∫abf(x)dx≤M(b−a).
Let f be continuous and nonnegative in [a,b], and suppose
∫abf(x)dx=0.
Prove that f(x)=0 for all x in [a,b].
3. Determine that which integral is larger:
∫01xdx or ∫01x2dx.
∫0π/2xdx or ∫0π/2sinxdx.
4.5 The Connection between Definite and Indefinite Integrals
According to Theorem, if f(x) is continuous in [a,b], then f(x) has a definite integral in [a,b]. We now prove a similar result for indefinite integrals:
Theorem 4.5.1 If f(x) is continuous in [a,b], then the function
Φ(x)=∫axf(t)dt
is an antiderivative of f(x) in [a,b]. In particular, f(x) has an indefinite integral Φ(x)+C in [a,b].
Proof: The existence follows from Theorem 4.3.1. Suppose x and x+Δx both belong to [a,b]. Then,
By the Mean Value Theorem for Integrals, there exists a point c in [x,x+Δx] such that
∫xx+Δxf(t)dt=f(c)Δx.
Therefore, we have
Φ(x+Δx)−Φ(x)=f(c)Δx.
By taking the limit as Δx→0, then f(ξ)→f(x), we have
Φ′(x)=f(x).
Therefore, Φ(x) is an antiderivative of f(x) in [a,b].
Remark: The content of this theorem can be written concisely as
dxd∫axf(t)dt=f(x),
or
∫f(x)dx=∫axf(t)dt+C.
As its name implies, the next theorem is particularly important:
Theorem 4.5.2 (Fundamental Theorem of Calculus) If f(x) is continuous in [a,b], then
∫abf(x)dx=F(b)−F(a),
where F(x) is any antiderivative of f(x) in [a,b].
Proof: By Theorem 4.5.1, the function
Φ(x)=∫axf(t)dt
is an antiderivative of f(x) in [a,b]. Therefore, it follows that
Φ(x)=F(x)+C
where F(x) is any other antiderivative of f(x) in [a,b]. However, one may note that
Φ(a)=F(a)+C=0,
also since obviously
Φ(b)=∫abf(t)dt=∫abf(x)dx,
and
Φ(b)=F(b)+C=F(b)−F(a),
we have
∫abf(x)dx=F(b)−F(a).
Remark: Note that the Fundamental Theorem of Calculus is a powerful tool for evaluating definite integrals. It allows us to evaluate definite integrals by finding antiderivatives of the integrand.
Example 4.5.1 Given a particle moving along a straight line, let x(t) and v(t) be the particle's position and velocity at time t. Then the distance l traversed by the particle between the times t=a and t=b is given by
Remark: For evaluating definite integrals, one may use the Fundamental Theorem of Calculus to find antiderivatives of the integrand, and then substitute the limits of integration into the antiderivative. Also the symbol ab is used for the evaluation of the antiderivative at the limits of integration.
Problems for this section
Evaluate
∫13x3dx.
∫0π/2cosxdx.
∫03e3xdx.
Recall what we have learned in Integration by Substitution and by Parts, and evaluate
∫381+xxdx;
∫0ax2a2−x2dx(a>0).
Prove that if f is continuous in [0,1], then
∫02πf(sinx)dx=∫02πf(cosx)dx.
Show that
∫02πcosnxdx=∫02πsinnxdx(n∈N).
4.6 Area of a Plane Region
It will be recalled that the integral ∫abf(x)dx is the only reasonable way of defining the area "under the curve y=f(x) from a to b" more precisely, the area of the region bounded by the curve y=f(x), the $x-$axis, and the lines x=a and x=b. We now turn to the problem of finding the area of a plane region bounded by two curves.
The area of the plane region bounded by the lines x=a and x=b, the $x-$axis, and the curves y=f(x) and y=g(x), where f(x)≥g(x) in [a,b], is defined to be
∫ab(f(x)−g(x))dx.
Remark: The area of the region bounded by the curves y=f(x) and y=g(x) in [a,b] is the difference between the areas under the two curves.
Example 4.6.1 Find the area of the region bounded by the curves y=x and y=x2.
Solution: The region is shown in the following figure:
Figure 3: The region bounded by the curves $y=x^2$ and $y=2x-x^2$
The only problem is how to find the points of intersection of the two curves when we are given the equations of the curves. Since one may note that the intersection of the two curves is only in the first quadrant, we have
xx=x2,=1.
We now have the intersection point (1,1). But how can we determine the area of the region? We may see from the Figure 3 that the area of the region is the difference between the areas under the two curves. Therefore, we have
Remark: For student, one may wonder how to know exactly which curve is above the other. The answer is that one should plot the two curves and see which curve is above the other in the region of interest since the area bounded should be positive.
Problems for this section
What is the area between the line x+y=2 and the curve y=x2?
What is the area bounded by the $x-$axis and the curve y=sinx from x=0 to x=π?
Find the area of the region bounded by the curves y=lnx and y=ln2x.
4.7 First-Order Differential Equations
By a differential equation, we mean an equation involving at least one derivative
y′=f′(x),y′′=f′′(x),⋯
of a function y=f(x) and often the function itself. A differential equation is said to be of ordern if n is the highest order of the derivatives appearing in the equation. Thus
2xy′−5y=0,y′′+y=0
are first-order and second-order differential equations, respectively.
This section will be devoted entirely to first-order differential equations.
The general form of such an equation is
F(x,y,y′)=0,
where F is a function of three variables x,y,y′. By a solution of the differential equation, we mean any function y=ϕ(x) such that
F(x,ϕ(x),ϕ′(x))=0,
holds identically. For example, the function y=x2 is a solution of the differential equation
xy′−2y=0.
since
x(x2)′−2x2=x(2x)−2x2=0.
The solution of a differential equation is not unique. For example, the function y=0 is also a solution of the differential equation above. Therefore, the solution
y=Cx2
is a general solution of the differential equation, where C is an arbitrary constant.
Example 4.7.1 The simplest first_order differential equation is
y′=f(x),
and its general solution is just the indefinite integral of f(x):
y=∫f(x)dx+C.
Example 4.7.2 Solve the differential equation
y′=12x2.
Solution: We have
y=∫12x2dx+C=4x3+C.
Example 4.7.3 Find the particular solution of the differential equation
y′=12x2,y(0)=3.
Solution: We have
y3C=4x3+C,=4(0)3+C,=3.
Therefore, the particular solution is
y=4x3+3.
Remark: Generalizing the above examples, by an initial condition for the differential equation we mean a condition of the form
y(x0)=y0,
where x0 is a given point in the domain of the differential equation, and y0 is a given number. The solution of the differential equation satisfying the initial condition is called the particular solution of the differential equation.
Suppose it has the general solution y=ϕ(x,C), where C is an arbitrary constant. Then, the particular solution of the differential equation satisfying the initial condition is obtained by choosing the value of C such that
ϕ(x0,C)=y0.
More generally, a differential equation of the form
f(x)+g(y)y′=0
is said to be separable if it can be written in the form
g(y)dy=−f(x)dx.
Then, the general solution of the differential equation is
∫g(y)dy=−∫f(x)dx+C.
Example 4.7.4 Find the particular solution of
2x+yy′=0,y(0)=1.
Solution: First we recall the notation y′=dxdy. Therefore, we rewrite the differential equation as
Remark: The method of separation of variables is a powerful technique for solving first-order differential equations. The method is based on the observation that if a differential equation can be written in the form.
Remark: For some students, one may wonder why we have transformed eC into simply C. The reason is that C is an arbitrary constant, and eC is also an arbitrary constant. Therefore, we can simply write C. In some notation, people try to differentiate between the two by writing C1,C2,⋯ for different arbitrary constants.
Another important type of first-order differential equations is the linear differential equation. A first-order differential equation is said to be linear if it can be written in the form
y′+p(x)y=q(x),
where p(x) and q(x) are continuous functions of x. The general solution of the linear differential equation is
y=e−∫p(x)dx(∫q(x)e∫p(x)dxdx+C).
But usually the general solution is hard to memorize (even I cannot remember it). Therefore, we will use the following method to solve the linear differential equation.
Method: Suppose the linear differential equation is
y′+p(x)y=q(x).
Then, we multiply the equation by the integrating factor e∫p(x)dx, and we have
Therefore, we multiply the differential equation by x and we have
xy′+y=sinx.
Therefore, we have
dxd(xy)xyy=sinx,=−cosx+C,=−xcosx+xC.
Remark: The method of integrating factors is a powerful technique for solving linear differential equations.
Next we illustrate the physical applications of first-order differential equations.
Example 4.7.6 Suppose it takes 2 days for 50% of the radioactivity produced by a nuclear explosion disappear. How long does it take for 99% of the radioactivity to disappear?
Solution: Let Q(t) be the amount of radioactivity at time t. Then, the rate of change of the radioactivity is proportional to the amount of radioactivity. Therefore, we have
dtdQ=−kQ,
where k is a positive constant. The solution of the differential equation is
Q=Ce−kt.
Since 50% of the radioactivity disappears in 2 days, we have
Q(0)Q(2)=21=e−2k.
Therefore, we have
k=2ln2.
Hence, 99% of the radioactivity disappears in t days, where
Q(0)Q(t)=1001=e−2ln2t.
It implies that
t=ln22ln100=4ln2ln10≈13.3 days.
Problems for this section
Find the solution of the differential equation y′=−xy satisfying the initial condition y(2)=1.
Solve the following differential equation
y′x3=2y;
(1+x2)y′+1+y2=0.
Solve Bernoulli's differential equation
y′+p(x)y=q(x)yn,
(if n=0 or n=1, it is a linear differential equation).
Hint: Divide through by yn and let z=y1−n.
4.8 Using Python to Solve Integration and Differential Equations
Here we will introduce how to use Python to solve integration and differential equations. We will use the sympy library in Python. The sympy library is a powerful library for symbolic mathematics in Python. We will introduce how to use sympy to solve integration and differential equations.
Here comes the easiest example. We will use sympy to solve the following integration
∫xkdx.
import sympy as sp
x = sp.symbols('x')
k = sp.symbols('k', integer=True, positive=True) # Here we assume k is a positive integer
f = x**k
integral = sp.integrate(f, x)
print(integral)
The output will be
x**(k + 1)/(k + 1)
One may wonder how to solve the definite integral. We can use the following code to solve the definite integral
∫abxkdx.
import sympy as sp
x = sp.symbols('x')
k = sp.symbols('k', integer=True, positive=True) # Here we assume k is a positive integer
a = sp.symbols('a')
b = sp.symbols('b')
f = x**k
integral = sp.integrate(f, (x, a, b)) # For definite integral, we need to specify the limits of integrationprint(integral)
The output will be
b**(k + 1)/(k + 1) - a**(k + 1)/(k + 1)
Next, we will solve the following differential equation
y′=12x2.
import sympy as sp
x = sp.symbols('x')
y = sp.Function('y')(x) # We define the function y(x)
f = 12*x**2# We define the right-hand side of the differential equation
solution = sp.dsolve(sp.Derivative(y, x) - f) # We solve the differential equationprint(solution)
The output will be
Eq(y(x), C1 + 4*x**3)
Which is the same as we have done in Example 4.7.2.
Even we have not learned second-order differential equations, we can still solve them using sympy. Here we will solve the following second-order differential equation
y′′+y=0.
First, the solution of the differential equation is
y=Acosx+Bsinx.
where A and B are arbitrary constants.
import sympy as sp
x = sp.symbols('x')
y = sp.Function('y')(x) # We define the function y(x)
f = y.diff(x, x) + y # We define the right-hand side of the differential equation
solution = sp.dsolve(f) # We solve the differential equationprint(solution)
The output will be
Eq(y(x), C1*sin(x) + C2*cos(x))
Which is correct since A=C2 and B=C1 are just matter of notation.
Problems for this section
Integrate the following function by using Python
x3;
x2sinx;
x1;
xsinx.
1+x21.
Solve the following definite integral by using Python
∫13x3dx;
∫0π/2cosxdx;
∫03e3xdx.
∫01x21−x2dx.
∫02πcos2xdx.
Solve the following differential equation by using Python
y′=12x2;
y′+x1y=xsinx;
y′x3=2y;
(1+x2)y′+1+y2=0.
References
Silverman, Richard A. Modern calculus and analytic geometry. Courier Corporation, 2002.