Diagnostic Exam Solutions

Diagnostic Quiz
EECS 401
January 9, 2007
Total Points: 25
PROBLEM 1 (9 points) Let
A = set of all persons taller than 6 feet
B = set of all persons heavier than 150 lbs.
C = set of all persons who wear glasses
(a) (1 points) What is the set of all persons who are shorter than 6 feet or wear glasses?
Solution Ac ∪ C
(b) (1 points) What is the set of all persons who are taller than 6 feet and are heavier than
150 lbs, but do not wear glasses?
Solution A ∩ B ∩ Cc
(c) (2 points) Express these statements in terms of A, B , C :
(1) (1 points) There is no one who wears glasses and is shorter than 6 feet.
Solution C ∩ Ac = ∅
(2) (1 points) If a person is lighter than 150 lbs., then he or she must either wear
glasses or is taller than 6 feet.
Solution Bc ⊆ A ∪ C
(d) (4 points) Can you relate:
(1) (2 points) A ∪ B and A ∩ B?
Solution A ∩ B ⊆ A ∪ B.
A
B
A∪B
A
B
A∩B
If a person is taller than 6 feet and heavier than 150 lbs., then he or she is taller than 6 feet
or heavier than 150 lbs.
1
January 9, 2007
Solutions
Diagnostic Quiz
(2) (2 points) A ∪ B and Ac ∩ Bc ?
Solution (A ∪ B)c = Ac ∩ Bc .
A
B
A
B
A0 ∩ B0
A∪B
The set of people shorter than 6 feet and lighter than 150 lbs. is the same as the set of
people who are not taller than 6 feet or heavier than 150 lbs.
Note: A ∪ B and Ac ∩ Bc are also mutually exclusive and collectively exhaustive sets.
Draw Venn diagrams and also express your mathematical statements in terms of
plain English.
(e) (1 points) If A ⊂ B , what can you say about the relationship between Ac and Bc ?
What is the corresponding statement in English?
Solution Bc ⊂ Ac
If everyone who is taller than 6 feet is also heavier than 150 lbs., then everyone who is
lighter than 150 lbs. is also shorter than 6 feet.
PROBLEM 2 (16 points)
(a) (2 points) Compute
n
X
i
p and
i=1
n
X
ipi .
i=1
Solution First let’s assume p 6= 1. Note that the first summation is a geometic series. If
you do not remember the expression for the sum of a geometric series, it can be derived
quickly as follows for p 6= 1:
S = p + p2 + p3 + . . . + pn
Let
p2 + p3 + . . . + pn + pn+1
pS =
Thus,
(1 − p)S = p − pn+1
∴
n
X
i=1
pi = p
1 − pn
1−p
The second summation can be summed in different ways. It is a arithemetico-geometric
series. If you do not remember the expression for the sum of a arithemetico-geometric
series, it can be quickly derived as follows:
2
January 9, 2007
Solutions
Diagnostic Quiz
S = p + 2p2 + 3p3 + . . . + npn
p2 + 2p3 + . . . + (n − 1)pn + npn+1
pS =
Thus,
(1 − p)S = p + p2 + p3 + . . . + pn −npn+1 =
|
{z
}
p − pn+1
− npn+1
1−p
geometric series
n
X
∴
ipi =
i=1
p − pn+1 npn+1
−
(1 − p)2
1−p
Another method is to take the result of the geometric series and differentiate both sides
with respect to p
n
X
pi = p
i=1
=⇒
n
X
i−1
ip
i=1
∴
1 − pn
1−p
1 − pn
(1 − p)(−npn−1 ) − (−1)(1 − pn )
=
+p
1−p
(1 − p)2
=
1 − pn
npn
1 − pn
−
+p
1−p
1−p
(1 − p)2
=
1 − pn
npn
−
(1 − p)2 1 − p
n
X
ipi =
i=1
p − pn+1 npn+1
−
(1 − p)2
1−p
Finally, if p = 1 then the first summation becomes:
n
X
1i = n
i=1
The second summation becomes:
n
X
i=1
3
i(1i ) =
n(n + 1)
2
January 9, 2007
Solutions
Diagnostic Quiz
(b) (2 points) Let a > 0. Compute
R∞
0
e−ax dx and
R∞
0
eax dx.
Solution
Z∞
∞
e−ax e
dx =
=
−a 0
0
∞
Z∞
eax =
eax dx =
a 0
−ax
1
a
∞
0
(c) (2 points) Compute
R1
0
xe−x dx.
Solution Use intergration by parts
Z1
0
1 Z
Z
1 Z 1 Z
1
dx
e−x dx dx = −xe−x + e−x dx
xe−x dx = x e−x dx −
0
0 dx
0
0
Z1
xe−x dx = 1 −
0
2
e
(d) (2 points) Is it true that
Z1
Z1
Z1
f(x) + g(x) dx =
f(x)dx + g(x)dx for all functions f and
(1) (1 points)
g?
0
0
0
Solution Integration is a linear operator, so the above state is true provided that f and
g are integrable in the interval (0, 1), that is the integrals on the right hand side exist
Z1
Z1
Z1 Z1
(2) (1 points)
f(x)g(y)dxdy =
f(x)dx g(x)dx for all functions f and g
?
0
0
0
0
Solution This is true.
"Z
#
"Z
#Z
Z1 Z1
Z1
1
1
1
f(x)g(y)dxdy = g(y)
f(x)dx dy =
f(x)dx
g(y)dy
0
Notice that
0
R1
0
0
g(y)dy =
R1
0
0
0
0
g(x)dx
4
January 9, 2007
Solutions
Diagnostic Quiz
(e) (4 points) Plot the curves:
2
(1) (2 points) f(x) = e−x
2
, −∞ < x < ∞.
Solution
y
−x2 2
y=e
x
(2) (2 points) f(x) = log x.
Solution
y = log x
y
+1
5
x
January 9, 2007
Solutions
Diagnostic Quiz
(f) (4 points) Suppose c > 0 and a > b.
(1) (2 points) Plot the curve for ax2 + by2 = c, and label the key features.
Solution For 0 > a > b, there is no solution.
For a > 0 > b, we have an hyperbola
y
r
c
−
a
For a > b = 0, we have x2 =
p
and another at x = − c/a.
r
c
a
x
c
a , so the plot would be two vertical lines, one at x
For a > b > 0, we have an ellipse
y
r
c
b
r
6
c
a
x
January 9, 2007
p
= + c/a
Solutions
Diagnostic Quiz
(2) (2 points) Repeat for the curve ax2 + 2ax + by2 − 2by = c.
Solution This equation can be transformed as follows
ax2 + 2ax + by2 − 2by = c ≡ a(x + 1)2 + b(y − 1)2 = c + a + b
Thus we will have the same curves as before, with the origin shifted to (−1, 1).
For 0 > a > b, there is no solution.
p
c
For 0 = a > −c > b, p
we have (y − 1)2 = 1 + b
. Thus,pthe plot would be two horizontal
c
c
.
lines, one at y = 1 + 1 + b and the other at y = 1 − 1 + b
For 0 = a > b > −c, then we have (y − 1)2 = 1 +
1 + bc < 0.
c
b,
which has no real solution since
For a > 0 > b, we have an hyperbola
y
(-1,1)
x
For a > bp
= 0, we have a(x + 1)2 = c + a, p
which reduces to two vertical lines, one at
x = −1 + 1 + ac and the other at x = −1 − 1 + ac .
7
January 9, 2007
Solutions
Diagnostic Quiz
For a > b > 0, we have an ellipse
y
(-1,1)
x
8
January 9, 2007