Sample Midterm Questions 1 Math 21B, Winter 2013 Solutions

Sample Midterm Questions 1
Math 21B, Winter 2013
Solutions
1. Suppose that f (x), g(x) are functions such that
Z
Z 3
Z 0
g(x) dx = 5,
f (x) dx = 2,
Evaluate
Z
f (x) dx = 1.
2
0
2
3
3
{3f (x) + 2g(x)} dx.
0
Solution.
• By the additivity and exchange-of-limits properties of the integral, we
have
Z 3
Z 2
Z 3
f (x) dx =
f (x) dx +
f (x) dx
0
0
2
Z 0
Z 3
= −
f (x) dx +
f (x) dx
2
2
= −2 + 1
= −1.
• By the linearity of the integral, we have
Z
Z 3
Z 3
f (x) dx + 2
{3f (x) + 2g(x)} dx = 3
0
0
= 3 · (−1) + 2 · (5)
= 7.
0
3
g(x) dx
2. Find the following indefinite integrals:
Z
Z
1
dx;
√
√
2 sec2 (5x) tan(5x) dx.
1+x 1+ 1+x
Solution.
• Using the substitution
u=1+
we get
Z
√
1
du = √
dx,
2 1+x
1 + x,
1
dx = 2
√
√
1+x 1+ 1+x
Z
1
dx
√
√
1+ 1+x 2 1+x
Z
1
du
= 2
u
= 2 ln |u| + C
√
= 2 ln 1 + 1 + x + C.
• Using the substitution
du = 5 sec2 (5x),
u = tan(5x),
we get
Z
2
2 sec (5x) tan(5x) dx =
=
=
=
Z
2
tan(5x) 5 sec2 (5x)dx
5
Z
2
u du
5
1 2
u +C
5
1
tan2 (5x) + C.
5
3. Evaluate the definite integral
Z π/2
ecos x sin x + esin x cos x dx.
0
Solution.
• We have
Z π/2
Z
cos x
sin x
e
sin x + e
cos x dx =
0
π/2
cos x
e
Z
sin x dx+
0
π/2
esin x cos x dx
0
• For the first integral on the right hand side, we use the substitution
u = cos x,
du = − sin x dx
which gives
π/2
Z
cos x
e
Z
cos(π/2)
eu (−du)
sin x dx =
cos 0
Z 0
0
= −
eu du
1
− [eu ]01
=
= −1 + e.
• For the second integral, we use the substitution
u = sin x,
du = cos x dx
which gives
Z
π/2
sin x
e
0
Z
sin(π/2)
cos x dx =
eu du
Zsin1 0
=
eu du
0
u 1
e ]0
=
= e − 1.
• It follows that
Z
0
π/2
ecos x sin x + esin x cos x dx = 2(e − 1).
Remark. Here’s an alternative method to compute one of the integrals.
• Using the substitution x = π/2 − u, we find that
Z
π/2
e
cos x
Z
0
ecos(π/2−u) sin(π/2 − u) (−du)
sin x dx =
0
π/2
Z
0
esin u cos u du
= −
Z
=
π/2
π/2
esin u cos u du.
0
• It follows that
Z
Z π/2
cos x
sin x
e
sin x + e
cos x dx = 2
0
π/2
esin x cos x dx
0
= 2(e − 1),
where we evaluate the integral on the right hand side by use of the
substitution u = sin x as before.
4. Suppose
Z
x3
cos t2 dt.
F (x) =
0
0
Calculate the derivative F (x).
Solution.
• Let
Z
G(u) =
u
cos t2 dt.
0
Then the fundamental theorem of calculus implies that
G0 (u) = cos u2 .
• We have F (x) = G (x3 ), so by the chain rule
0
F 0 (x) = G0 x3 · x3
2
= cos x3
· 3x2
= 3x2 cos x6 .
5. Find the area enclosed between the graphs
y = x − 1,
y = (e − 1) ln x
for 1 ≤ x ≤ e.
Solution.
• We write
f (x) = (e − 1) ln x,
g(x) = x − 1.
The region whose area we want to compute is given by
g(x) ≤ y ≤ f (x),
for 1 ≤ x ≤ e.
• The area A enclosed between the curves is
Z e
A =
{f (x) − g(x)} dx
1
Z e
{(e − 1) ln x − (x − 1)} dx
=
1
Z e
Z e
= (e − 1)
ln x dx −
(x − 1) dx
1
1
e
1 2
e
= (e − 1) [x ln x − x]1 − x − x
2
1
1 2
1
= (e − 1) {(e − e) − (−1)} −
e −e −
−1
2
2
1 2
1
= (e − 1) −
e −e −
2
2
1 2
3
= − e + 2e −
2
2
1
=
(e − 1)(3 − e)
2
• Here, we use the antiderivative
Z
ln x dx = x ln x − x + C,
which holds because
d
1
(x ln x − x) = 1 · ln x + x · − 1 = ln x.
dx
x
Remark. In this computation of the area, we used ‘vertical rectangles’ and
integrated the y-height with respect to x. We can also compute the area by
using ‘horizontal rectangles’ and integrating the x-width with respect to y.
Although this method isn’t any easier to use in this problem than the one
above, we illustrate it for completeness.
• Solving for x in terms of y, we can write the curves as
x = F (y),
where
F (y) = exp
y
e−1
x = G(y)
,
G(y) = y + 1.
• The region whose area we want to compute is given by
F (y) ≤ x ≤ G(y)
for 0 ≤ y ≤ e − 1.
• The area A enclosed between these curves is
Z e−1
A =
{G(y) − F (y)} dy
0
Z e−1 y
=
y + 1 − exp
dy
e−1
0
e−1
y
1 2
y + y − (e − 1) exp
=
2
e−1 0
1
=
(e − 1)2 + (e − 1) − e(e − 1) − (−(e − 1))
2
1
=
(e − 1)(3 − e).
2
• We get the same answer as before.
6. Find the function y(x) such that
d2 y
= e−x
dx2
y(0) = 0,
dy
(0) = 0.
dx
Solution.
• Integrating the differential equation for y(x) once, we get
Z
dy
=
e−x dx
dx
= −e−x + C1 .
• Imposing the initial condition that y 0 (0) = 0, we get
0 = −e−0 + C1 ,
which implies that C1 = 1. Hence,
dy
= −e−x + 1.
dx
• Integrating this equation, we get
Z
y =
−e−x + 1 dx
= e−x + x + C2 .
• Imposing the condition that y(0) = 0, we get
0 = e−0 + 0 + C2 ,
which implies that C2 = −1.
• The solution is therefore
y(x) = e−x + x − 1.
7. (a) Write out a Riemann sum for the integral
Z π
sin(x) dx
0
using a partition of [0, π] into 4 equally spaced subintervals and the left
endpoints of the subintervals and evaluate it.
(b) Write the integral
Z
π
sin(x) dx
0
as a limit of Riemann sums using a partition of [0, π] into n equally spaced
subintervals and the left endpoints of the subintervals.
Solution.
• (a) We use the partition
π π 3π
{x0 , x1 , x2 , x3 , x4 } = 0, , , , 1
4 2 4
of [0, π], with intervals of length
∆xk = xk − xk−1 =
π
4
and left end points xk−1 ≤ ck ≤ xk
π π 3π
{c1 , c2 , c3 , c4 } = 0, , ,
.
4 2 4
• The corresponding Riemann sum, I4 say, is given by
I4 =
4
X
sin (ck ) ∆xk
k=1
π π
π π
π
3π
π
= sin 0 · + sin
· + sin
· + sin
·
4
4
4
2
4
4
4
√
√
2 π
π
2 π
= 0+
· +1· +
·
2 4
4
2 4
√
π
=
1+ 2 .
4
• (b) For n intervals, we use the partition of [0, π]
{x0 , x1 , . . . , xk , . . . , xn }
with xk = πk/n and ∆xk = π/n. The left end points xk−1 ≤ ck ≤ xk
are
π(k − 1)
ck =
.
n
Thus,
Z
π
sin x dx =
0
lim
n→∞
n
X
sin (ck ) ∆xk
k=1
n
πX
sin
= lim
n→∞ n
k=1
π(k − 1)
n
.
Remark. This limit exists because sin x is continuous and therefore Riemann
integrable on [0, π].
8. Write the limit
"
lim
n→∞
2n
1 X 3
k
n4 k=n
#
as an integral, and evaluate it.
Solution.
• Defining f (x) = x3 , and writing out the term with k = n explicitly, we
have
#
"
2n
2n 3
X
1
k
1 X 3
·
k
=
4
n k=n
n
n
k=n
2n
X
1
k 1
=
+
f
n k=n+1
n n
2n
X
1
+
f (ck ) ∆x
n k=n+1
=
where ck = k/n and ∆x = 1/n. The last term on the right hand side is a
Riemann sum for the integral of f (x) on the interval [1, 2]. The interval
[1, 2] is partitioned into n subintervals of equal length ∆x = 1/n with
endpoints {xn , xn+1 , . . . , x2n } where xk = k/n and n ≤ k ≤ 2n.
• Since the limit of 1/n as n → ∞ is 0, we get that
)
#
(
"
2n
2n
X
1
1 X 3
f (ck ) ∆x
k
= lim
+
lim
n→∞
n→∞ n4
n k=n+1
k=n
2n
X
= 0 + lim
n→∞
Z
k=n+1
2
=
f (x) dx
1
Z
2
x3 dx
1
2
1 4
=
x
4
1
15
=
.
4
=
f (ck ) ∆x
9. Define a function f : [0, 1] → R by
n if x = 1/2n for n = 1, 2, 3, . . .
f (x) =
0 otherwise
meaning that for x = 1/2, 1/4, 1/8, 1/16. . . . we have
f (1/2) = 1,
f (1/4) = 2,
f (1/8) = 3,
f (1/16) = 4, . . .
and
R 1 f (x) = 0 otherwise. Is f Riemann integrable on [0, 1]? If so, what is
f (x) dx?
0
Solution.
• The function is unbounded, so it is not Riemann integrable. (We can
make the first term f (c1 )∆x1 in a Riemann sum
n
X
f (ck )∆xk
k=1
as large as we wish by choosing c1 = 1/2m for m sufficiently large, in
which case f (c1 ) = m.)
• Since f is not Riemann integrable,
Z 1
f (x) dx
0
is not defined.
Remark. Although this function is not Riemann integrable on [0, 1], it is
integrable on the interval [a, 1] for any 0 < a < 1 since it differs at only
finitely many points from 0 on this interval. Furthermore,
Z 1
Z 1
f (x) dx =
0 dx = 0.
a
a
Thus, it follows that
Z
lim+
a→0
1
f (x) dx = 0.
a
This limit defines the improper Riemann integral of f on [0, 1], and it exists
even though the Riemann integral itself is not defined.