You are on page 1of 22

1

LECTURE 4 - CONTENTS
4.6 Rules for Approximating Definite Integrals
4.6.1 The Trapezoidal Rule
4.6.2 The Error Estimates for the Trapezoidal Rule
4.6.3 The Simpsons Rule
4.6.4 Error Estimates for Simpsons Rule

Problems

Lesson 5
5.1 Exponentials and Logarithms
5.1.1 The graph of y ln x
5.1.2 The exponential Function e x
5.1.3 The derivative and Integration of y e x

5.2 Applications of Exponential and Logarithmic Functions - Growth & Decay


5.2.1 The law of Exponential Change
5.2.2 Continuously Compounded Interest
5.2.3 Radioactivity
5.2.4 Heat Transfer: Newtons Law of Cooling
5.2.5 The R-L Circuit

5.3 Hyperbolic Functions


5.3.1 Definitions and Identities
5.3.2 Comparisons with the Trigonometric Functions

Problems
2

4.6 Rules for Approximating Definite Integrals


The anti-derivatives of functions like sin x x , sin x and 1 x 2 have no simple formulas. So, to
evaluate their definite integrals, the numerical methods like the trapezoidal rule and Simpsons
rule may be used These rules enable one to estimate the integral of a function from a table of
values, even if a formula for the function is not known.

4.6.1 The Trapezoidal Rule

The trapezoidal rule for the value of a definite integral is based on approximating the region
between a curve and the x-axis with trapezoids of equal width (Fig. 4.4), instead of rectangles.

Figure 4.4:

b
The trapezoidal rule says that, to estimate f ( x ) d x approximately, use
a

h
T y0 2 y1 2 y2 . . . . . 2 yn1 yn , (4.1)
2
ba
where n is the number of subintervals of length h x and
n
y0 f (a), y1 f ( x1 ) f (a h), . . . . . . , yn1 f ( xn1 ) f (a (n 1)h), yn f (b) are

the heights of each trapezoid at end points and subdivision points a, x1, x2 , . . . . . . , xn 1, b that
are separated by a length h.
3

2
EXAMPLE 25: Use the trapezoidal rule with n 4 to estimate x
2
d x . Compare the estimate
1

with the exact value of the integral.

Solution First divide the interval of integration into 04 subintervals of equal length and list

the values of y x 2 at the end points and subdivision points. Then evaluate the
2 1 1
value of T with a 1 , b 2 , n 4 and h .
4 4

x 1 54 64 7 4 2

y x2 1 25 16 36 16 49 16 4

h
T ( y0 2 y1 2 y2 . . . . . 2 yn1 yn )
2
1 25 36 49 75
T 1 2 2 2 4 2.34375
8 16 16 16 32
2
x3 2 7
The exact value of the integral is x2 d x 2.33333 .
3 1 3
1

The approximation overestimates the area by about 1% of its true value. Each
trapezoid contains more than the corresponding strip under the curve.//

4.6.2 The Error Estimates for the Trapezoidal Rule


As n increases to infinity and the step size h x approaches zero, the area T approaches the
b
exact value, f ( x) d x .
a

This means that, by taking n large enough, we can make the difference between T (Eq. 4.1) and
the integral as small as we want. However, we do not know how large n should be for a given
tolerance and, the error estimate for the trapezoidal rule can be given as follows.
4

If f ( x) is continuous on [a, b] and M is any upper bound for the values of f ( x) on [a, b] ,

then the error ET in the trapezoidal approximation of the integral of f from a to b satisfies the
inequality
ba 2
ET h M .. (4.2)
12

EXAMPLE 26: Find an upper bound for the error in the approximation found in Example 25 for
2

x
2
the integral dx .
1

Solution f ( x) x 2 f ( x) 2 M f ( x) 2 , for 1 x 2

b a 2 1 1, h 14
2
ba 2 1 1 1
ET h M (2) //
12 12 4 96

This is precisely what we find when we subtract T 75 32 from the exact value
2

x d x 7 3 . Here we are able to give the error exactly because the second
2

derivative of f ( x) x 2 is a constant.

1
EXAMPLE 27: The trapezoidal rule is to be used to estimate the value of x sin x d x with n 10
0

steps. Find an upper bound for the error in the estimate.


ba 2 1 0 1
Solution ET h M with b 1, a 0 and h
12 10 10
2
11 M
ET M .
12 10 1200

To choose a value for M, calculate f ( x ) on [0, 1] . f ( x) cos x (1 x) sin x

f ( x) cos x (1 x) sin x 1 (1)(1) 2 M 2

2
The error is ET 0.00167 , i.e. no greater than 1.67 103 //
1200
5

4.6.3 The Simpsons Rule

Any three non-collinear points in a plane can be fitted with a parabola, and the Simpsons rule is
based on approximating curves with parabolas instead of trapezoids.

By deriving an expression for the shaded area A p under the parabola in Fig 4.5(a), and then

applying this formula along a continuous curve y f ( x) from x a to x b , an estimate of


b

f ( x) d x that is generally more accurate than T (Eq. (4.1)) for a given step size h can be obtained.
a

(a) (b)
Figure 4.5:

b
The Simpsons rule states that, to estimate f ( x) d x approximately, use
a

h
S y0 4 y1 2 y2 . . . . . 2 yn2 4 yn1 yn . (4.3),
3
ba
where n (must be even) is the number of subintervals of length h and
n
y0 f (a), y1 f ( x1 ) f (a h), . . . . . . , yn1 f ( xn1 ) f (a (n 1)h), yn f (b) .

4.6.4 Error Estimates for Simpsons Rule


If f (4) ( x) is continuous and M is any upper bound for the values of f (4) ( x) on [a, b] , then the

error ES in the Simpsons rule approximation of the integral of f ( x) from a to b satisfies the
inequality
6

ba 4
ES h M .. (4.4)
180

1
EXAMPLE 28 Use Simpsons rule with n 4 to approximate the integral 5x
4
d x . What
0
estimate do you get for the error in the approximation?
1
1
5x d x x 1.
4 5
Solution The exact value of the integral can be found directly as
0
0

To find the Simpson approximation, divide the interval of integration into 04


subintervals and list the values of f ( x) 5 x 4 at the end points and subdivision
points, evaluated with b 1 , a 0 , n 4 and h 1 4 .

x 0 14 24 34 1

y 5x4 0 5 256 80 256 405 256 5

h
S y0 4 y1 2 y2 4 y3 y4
3
1 5 80 405
S 0 4 2 4 5 1.00260 (rounded)
12 256 256 256
The difference between the exact and approximated values is 0.00260//

To estimate the error, find an upper bound M for the magnitude of the fourth
derivative of f ( x) 5 x 4 . f (4) ( x) 120 M 120
With b a 1 and h 1 4 ,
4
ba 4 1 1 1
Eq. (4.4) ES h M (129) 0.00261 //
180 180 4 384
2

x
3
EXAMPLE 29 Estimate the integral d x with Simpsons rule.
0

Solution The fourth derivative of f ( x) x3 is zero. The Simpsons rule can be


expected to give the integrals exact value with any even number (say 02) of
steps. With n 2 and h (2 0) 2 1
7

S
h
3
1

y0 4 y1 y2 (0)3 4(1)3 (2)3 4
3

2
x4 2
The exact value of the integral, x3 d x
4 0
4.
0

EXAMPLE 30 A town wants to drain and fill the swamp shown in Figure 3.6. The swamp
averages 5 ft deep. About how many cubic yards of dirt will be needed to fill the
area after the swamp is drained?

Figure 4.6
Solution To calculate the volume of the swamp, estimate the surface area and multiply by
5. To estimate the area, use Simpsons rule with h 20 ft and the ys equal to the
distances measured across the swamp shown in the figure.
h
S y0 4 y1 2 y2 4 y3 2 y4 4 y5 y6
3
20 20
S 146 488 152 216 80 120 13 (1215) 8100 ft 2
3 3
The volume is about (8100)(5) 40,500 ft 3 1500 yd3 //

Lesson 5
5.1 Exponentials and Logarithms
Important arithmetic properties of natural logarithms (Proofs are given in Lesson Notes)
x
ln ax ln a ln x ...... (5.1a), ln ln x ln a ..... (5.1b), ln x n n ln x ...... (5.1c)
a
8

These properties hold provided x and a are positive and the exponent n be a rational number.

x x5
EXAMPLE 1 Find d y d x if y ln .
( x 1)3
Solution By applying Eq.(5.1a), (5.1b) and (5.1c), we find that

x x5
y ln = ln x x 5 ln ( x 1)3 (from Eq. (5.1b))
( x 1) 3

ln x ln( x 5)1 2 ln ( x 1)3 (from Eq. (5.1a))


1
ln x ln( x 5) 3ln ( x 1) (from Eq. (5.1c))
2
dy 1 1 1 1
3 //
dx x 2 ( x 5) ( x 1)

Logarithmic differentiation can be used to find the derivative of a function, given by a


complicated equation.

cos x
EXAMPLE 2 Find d y d x if y 2
, 0 x .
x sin x 2
Solution Take logarithm of both sides and use Eq. (5.1a c).

cos x 1
ln y ln 2 ln cos x ln( x sin x ) ln cos x 2 ln x ln sin x
2

x sin x 2

Then, take the derivative of both sides.


1 d y 1 sin x 2 cos x

y d x 2 cos x x sin x

dy cos x 1 sin x 2 cos x


Solve for d y d x 2 //
dx x sin x 2 cos x x sin x

5.1.1 The graph of y ln x


dy 1
y ln x Slope of the curve = 0 , for all x 0 .
dx x

The graph of y ln x steadily rises from left to right.


The derivative is continuous function ln x itself is continuous.
9

d2 y 1
2
2 0 the graph is always concave down.
dx x

ln 1 0 the curve passes through (1, 0), makes an angle of 45 with the x-axis

As x 0 d y d x 1 x + (the curve makes an angle of 90 with the x-axis).


As x , ln x

At other x-values, the corresponding y-values and d y d x values of the curve can be found.
The graph of y ln x can be plotted using our knowledge on properties of curves discussed in
previous lessons and it is given in Fig. 5.1.

Fig. 5.1: The graph of y ln x .

5.1.2 The exponential Function e x


ln 2 0.69315 1 and ln 4 1.38630 1

there is a number, denoted by the letter e , between 2 and 4 whose logarithm is equal to 1.
( ln x is a one-to-one function there is only one such number)

ln e 1 and e ln 1 1, ............ (5.2)


The value of e has been calculated as e 2.718281828459045 . . . . . .
When x is a rational number,

ln e x x ln e x 1 x ............ (5.3)

When x is rational, e x is the number whose natural logarithm is x. In symbols,


10

e x ln 1 x , x rational .............. (5.4)

The function y e x is called the exponential function with base e and exponent x. (exp(x))

The graph of y e x is the same as the graph of x ln y .


It may be obtained by reflecting the graph of y ln x across the line y x .
lim lim x
The graph crosses the y-axis at y e0 1 . ex 0 and e .
x x

The graph of y e x is given in Fig. 5.2.

y e x (i.e. x ln y ) and y ln x (i.e. x e y ) are inverses of one another .

eln x x for all x 0 ln e x x for all x

Fig. 5.2: The graph of y ln x and its inverse y e x .

1
EXAMPLE 3 (a) ln e2 2 (b) ln e 1 1 (c) ln e (d) eln 2 2
2

1) e2 x
ln e2 x ln 5 2 x ln 5
2
(e) eln( x x2 1 (f) ln esin x sin x (g) ln
5
EXAMPLE 4 Solve for y.
2 2
(a) ln y x 2 eln y e( x )
y e( x ) //
11

1
(b) e3 y 2 cos x 3 y ln(2 cos x) y ln(2 cos x) //
3
y 1 y 1
(c) ln( y 1) ln y 3x ln 3x e3 x
y y
1
y //
1 e3 x

To remove logarithms from an equation, take the exponential of both sides.


To remove exponentials from an equation, take the logarithm of both sides.
1
Also it can be proven the relations that (i) e x1 e x2 e x1 x2 and (ii) e x .
ex
EXAMPLE 5 Using the above relations, simplify: (a) eln 2 3ln x and (b) e2 x ln x .

(a) eln 2 3ln x eln 2 e3ln x 2 eln x 2 x3 //


3

2 x ln x ln x e2 x e2 x
(b) e e e
2x
//
eln x x

5.1.3 The derivative and Integration of y e x

1 dy dy d ex
y ex ln y x 1 or y ex
y dx dx dx

The derivative of e x is > 0 for x > 0 values y e x is an increasing function of x.

When u is a differentiable function of x, the derivative of eu is obtained by the chain rule.

d eu d eu d u du
eu e du eu C
u
Integration formula
dx du d x dx

d esin x d
EXAMPLE 6 esin x (sin x) esin x cos x
dx dx
1
1
e tan x
EXAMPLE 7 Evaluate dx.
0 1 x 2

1
Solution Substitute u tan 1 x, du d x, tan 1 0 0, tan 1 1
1 x2 4
12

1 4
1
e tan x 4
Then, dx eu d u e u e 4
1 //
0
1 x2 0
0

dy
EXAMPLE 7 Evaluate 2 x e y , x 3 , subject to the condition that y 0 when
dx
x 2.
dy
Solution Multiply both sides by e y to obtain ey 2x.
dx

Integrate both sides with respect to x to obtain e y x 2 C .


Use the given condition that y 0 when x 2 , to obtain C 3 .

e y x2 3 ln e y ln( x 2 3) y ln( x 2 3) //
The above solution should satisfy the given equation.

5.2 Applications of Exponential and Logarithmic Functions - Growth &


Decay

5.2.1 The law of Exponential Change


If some quantity y grows or declines at a rate that, at any given time t, is proportional to the
amount that is present, this leads to the equation
dy
k y , ...................... (5.5)
dt
where the constant k > 0, if y is increasing and k < 0, if y is decreasing. To solve Eq. (5.5)

1 dy 1
y dt
k y d y k dt ln y kt C

y ek t C ek t eC Aek t , where A = eC

If y0 denotes the value of y when t 0 , then A = y0 . y y0 ekt . ........... (5.6)

This equation is called the law of exponential change.


13

EXAMPLE 8 The growth of a cell If we make the assumption that, at each instant of time, the
cells growth rate dm dt is proportional to the mass that has already been
accumulated, then we have
dm
km and hence m(t ) m0 ekt . (5.7)
dt

EXAMPLE 9 Birth rates and population growth: A large number of individuals in a population
may be described with a continuous and differentiable function.
If the no. of reproducing individuals and the fertility are constants, at any instant t,
Birth rate No. y ( t ) of individuals present Birth rate = k y (t )
If departures, arrivals and deaths are neglected
dy
Growth rate = Birth rate ky and hence y(t ) y0 ekt .
dt

5.2.2 Continuously Compounded Interest


If A0 - amount of money, r - annual interest rate (fixed) and k - no. times the interest is added to

the account/year and At - amount of money accumulated in the account at the end of t years
kt
r
At A0 1 .
k
The money can be added monthly (k = 12), weekly (k = 52), daily (k = 365), etc.
The limit to the amount of money that one will earn this way is
kt
lim lim r
At A0 1 A0 e k t .
k k k

The amount of money in the account after t years is A(t ) A0 ekt , and this is called the
continuous compound interest formula.

5.2.3 Radioactivity
At any given time, the rate of decay of a radioactive element is approximately proportional to the
number of radioactive nuclei present.
14

dN dN
N kN
dt dt

The number of radioactive nuclei present at time t will be N (t ) N0 ekt , where N 0 is the
number of nuclei that was present at time zero. The value of the decay constant k (< 0) is a
characteristic of the element that is decaying.

EXAMPLE 10 The half-life of a radioactive element: the time required for half of the radioactive
nuclei present in a sample to decay.

To find the value of t such that


1 1
N0 ek t N0 ek t
2 2
1 ln 2
kt ln ln 2 t (5.8)
2 k
The half-life depends only on the value k and not on N 0 .

5.2.4 Heat Transfer: Newtons Law of Cooling


When the temperature of any object is higher than that of its surrounding medium, the rate at
which the temperature of the object changes is roughly proportional to the difference between the
temperature of the object and that of the surrounding medium.
If T (t ) is the temperature of the object at time t, and Ts is the surrounding temperature, then

dT d (T Ts )
k (T Ts ) k (T Ts )
dt dt
the solution to the above equation is

(T Ts ) (T0 Ts ) ekt , .. (5.9)

where T0 is the value of T at time zero.

EXAMPLE 10 A hard-boiled egg at 98 C is put in a sink of 18 C water to cool. After 5 minutes


the eggs temperature is found to be 38 C. Assuming that the water has not warmed
appreciably, how much longer will it take the egg to reach 20 C?
15

Solution See Lesson Notes

5.2.5 The R-L Circuit

Fig. 5.3: The R-L circuit.

The switch connects a constant electrical source of V volts, across a resistance of R ohms and a
self-inductance of L henries.
The Ohms law, V I R , is given in the form
di
L R i V , .. (5.10)
dt

The current i (in amp.) at time t (in sec.) in the circuit can be determined by solving Eq. (5.10).

EXAMPLE 11 The switch in the R-L circuit in Fig 5.3 is closed at time t 0 . How will the current
flow as a function of time?
Solution To solve Eq. (5.10) for i under the initial condition that t 0 when i 0 .
di di 1
L Ri V dt (variable separation)
dt V Ri L

i
V
R

1 e R t L
//
The current is always less than V R but it approaches V R as a steady-state
value.
lim V
t R

1 e R t L
VR 1 0 VR .
16

The current I V R is the current that will flow in the circuit if either L 0 (no

inductance) or di dt 0 (steady current, i = constant). The graph of the current


versus time relation is shown in Fig. 5.4

Fig. 5.4: Growth of current in an R-L circuit.

5.3 Hyperbolic Functions


Combinations of e x and e x are called hyperbolic functions. They are used to describe the
motions of waves in elastic solids, the shapes of electrical power lines, temperature distributions
in metal fins that cool hot pipes, etc.

5.3.1 Definitions and Identities

The hyperbolic sine (often read as shine) and hyperbolic cosine (often read as kosh) are
defined by the following equations:

1 u
Hyperbolic sine of u : (e e u )
sinh u
2
. (5.11)
1 u u
Hyperbolic cosine of u : cosh u (e e )
2

The functions cos u and sin u may be identified with the point ( x, y ) on the unit circle

x2 y 2 1 and hence, they are called circular (or trigonometric) functions. The functions
17

cosh u and sinh u may be identified with the point ( x, y ) on the unit hyperbola x2 y 2 1 and
hence, they are called hyperbolic functions.

Analogous to the ordinary trigonometric identity, cos2 u sin 2 u 1 , there is hyperbolic


trigonometric identity

cosh 2 u sinh 2 u 1 . (5.12)

Fig. 5.5: Point P(cosh u, sinh u ) lies on the right-hand branch, and point P( cosh u, sinh u ) lies
on the left-hand branch of the hyperbola (not shown).

The remaining hyperbolic functions are defined in terms of sinh u and cosh u as follows.

sinh u eu e u
Hyperbolic tangent of u : tanh u
cosh u eu e u
cosh u eu e u
Hyperbolic cotangent of u : coth u
sinh u eu eu . (5.13)
1 2
Hyperbolic secant of u : sech u u
cosh u e e u
1 2
Hyperbolic cosecant of u : csch u u
sinh u e eu

Divide cosh 2 u sinh 2 u 1 by cosh 2 u 1 tanh 2 u sec h2u . (5.14)

Divide cosh 2 u sinh 2 u 1 by sinh 2 u coth 2 u 1 csch 2 u (4.15)


18

Eq. (5.11) cosh u sinh u eu (5.16) and cosh u sinh u eu .. (5.17)

Any combination of eu and eu can be replaced by a combination of sinh u and cosh u .

Fig. 5.6: The graphs of the six hyperbolic functions.

5.3.2 Comparisons with the Trigonometric Functions


Since cosh 0 1 and sinh 0 0 , the hyperbolic functions (all 06 of them) have the same values
at zero that the corresponding trigonometric functions have.
The hyperbolic cosine is an even function because
1 x 1
cosh ( x) (e e( x ) ) (e x e x ) cosh x for all x.
2 2
The hyperbolic sine is an odd function because
1 x 1
sinh ( x) (e e( x ) ) (e x e x ) sinh x for all x.
2 2
The graph of y cosh x is symmetric about the y-axis and the graph of y sinh x is anti-
symmetric about the origin.
19

The trigonometric functions are periodic while the hyperbolic functions are not periodic.

Fig. 5.7: The graphs of y sin x and y cos x functions


The ranges of hyperbolic and trigonometric functions are also very different as shown below.

Range of Trigonometric Function Range of Hyperbolic Function


sin x oscillates between 1 and +1 sinh x increases steadily from to

cos x oscillates between 1 and +1 cosh x varies from to 1 to

sec x is never less than 1 sech x is never greater than 1 and is always positive

tan x varies from to tanh x varies from 1 to 1

The behavior of the circular functions sin x , cos x , tan x , etc, as x cannot be specified.

But, the hyperbolic functions behave very much like e x 2 , e x 2 or the constant functions zero
and one.

For x large and positive For x negative, x large

1 x 1 x
cosh x sinh x e cosh x sinh x e
2 2
tanh x coth x 1 tanh x coth x 1

sech x csch x 2e x 0 sech x csch x 2e x 0

Identities
Eq. (5.11) sinh ( x y ) sinh x cosh y cosh x sinh y .. (5.18a)

cosh ( x y ) cosh x cosh y sinh x sinh y .. (5.18b)


20

x y in (5.18a) sinh 2 x 2sinh x cosh y . (5.19a)

x y in (5.18b) cosh 2 x cosh 2 x sinh 2 x .. (5.19b)

By combining (5.19b) with the identity cosh 2 x sinh 2 x 1


cosh 2 x 1 cosh 2 x 1
cosh 2 x (5.20a) and sinh 2 x . (5.20b)
2 2

Derivatives and Integrals


Let u be a differentiable function of x and differentiate
1 u 1 u
sinh u (e e u ) cosh u (e e u )
2 2
with respect to x. Applying the formulas

d eu du d e u du
eu , e u
dx dx dx dx

d (sinh u ) du d (cosh u ) du
cosh u sinh u . (5.21)
dx dx dx dx

sinh u d (tanh u ) du
Differentiate y tanh u as a fraction to get sech 2u
cosh u dx dx

d (tanh u ) du d (coth u ) du
sech 2u , csch 2u
dx dx dx dx
. (5.22)
d (sech u ) du d (csch u ) du
sech u tanh u , csch u coth u
dx dx dx dx

du d (sinh x) d (cosh x)
If u x , 1 cosh x , sinh x , , etc
dx dx dx

These derivative formulas produce the following integral formulas.

sinh u du cosh u C, cosh u du sinh u C


sech u du tanh u C, csch u du coth u C
2 2
(5.23)

sech u tanh u du sech u C , csch u coth u du csch u C


21

EXAMPLE 12: Evaluate coth 5x d x .

cosh 5 x 1 du
Solution coth 5x d x sinh 5x d x 5 u
, ( u sinh 5 x du 5cosh 5 x d x )

1 1
ln u C ln sinh 5 x C //
5 5

1
EXAMPLE 13: Evaluate sinh 2 x d x .
0

1 1
cosh 2 x 1 sinh 2 x x 1 sinh 2 1
sinh x dx dx 0.40672 //
2
Solution
0 0
2 4 2 0 4 2

EXAMPLE 14: Evaluate x sinh x d x .


Solution In the integration-by-parts formula u d v uv v du , (will be introduced later)

we take u x, d v sinh x d x v cosh x .

so that x sinh x d x x cosh x cosh x d x x cosh x sinh x C //

ln 4

e
x
EXAMPLE 15: Evaluate sinh x d x .
0

Solution From the definition of sinh x , we have

e x e x e2 x x ln 4
ln 4 ln 4 ln 4 2 x
e 1
e sinh x d x e dx dx
x x
2 2 4 2 0
0 0 0

e2ln 4 ln 4 1 eln16 2 ln 2 1

4 2 4 4 2 4
16 1 15
ln 2 ln 2 //
4 4 4
EXAMPLE 16: Find the area of the infinite region in the first quadrant that lies between the curve
y tanh x and the line y 1 .
Solution
22

Fig. 5.8:

The required area (shown in Fig 5.8) is given by the improper integral
b
lim
(1 tanh x) d x b (1 tanh x) d x
0 0

In terms of b, the integral on the right is


b b
sinh x b
(1 tanh x) d x 1 d x ( x ln cosh x) 0 b ln cosh b
cosh x
0 0

eb 2eb 2
ln eb ln cosh b ln ln b
ln
cosh b e e b
1 e2b
The value of the improper integral is therefore

lim 2 2
(1 tanh x) d x b ln 1 e2b ln
1 0
ln 2 //
0

You might also like