Exercises – Long Day#
Exercise 1: Sets in roster form#
Let \(A\) and \(B\) be finite sets given as follows:
Question a#
Which elements do the sets \(A\) and \(B\) contain? State your answers in roster form.
Hint
The elements in the set \(A\) are the numbers \(m^2\) that are produced when \(m\) takes values in the set \(\{1,2,3,4,5\}\).
Answer
\(A=\{1,4,9,16,25\}\) and \(B=\{1,3,5,7,9\}\).
Question b#
Which elements do the sets \(A \cap B\) and \(A \cup B\,\) contain? State your answers in roster form.
Hint
To see how \(\cap\) (the symbol for set intersection) and \(\cup\) (the symbol for set union) are defined, see Equations (2.1) and (2.2) in the textbook.
Question c#
Which elements do the sets \(A \setminus B\) and \(B \setminus A\,\) contain?
Answer
\(A \setminus B=\{4,16,25\}\) and \(B \setminus A=\{3,5,7\}\,\).
Exercise 2: Sets in set-builder notation#
Let \(C\) and \(D\) be the following sets:
Describe which elements the sets \(C \cap D\) and \(C \cup D\,\) contain.
Answer
\(C \cap D\) contains all natural numbers that are multiples of both \(2\) and \(3\). Thus \(C \cap D\) consists of all natural numbers that are multiples of \(6\). In other words: \(C \cap D= \{n \in \Bbb{N} \, | \, n=6m \,\,\,\mathrm{where} \,\,\, m \in \Bbb{N}\}\).
\(C \cup D\) contains all natural numbers that are multiples of \(2\) or of \(3\). Thus, \(C \cup D = \{2,3,4,6,8,9,10,12,\dots\}\).
Exercise 3: The classical sets of numbers#
Describe in your own words the sets \(\Bbb{R} \setminus \Bbb{Q}\) and \(\Bbb{Z} \setminus \Bbb{N}\).
Exercise 4: Rules for set operations#
Question a#
Some identities from set theory can be illustrated by drawing a circle diagram, also known as a Venn diagram. In the textbook the concepts of union, set intersection and set difference are illustrated in this way in Section 2.1. Also, the set identities in Theorem 2.1.2 in the textbook can be visualised with the help of such diagrams.
Draw circle diagrams that visualise the identities in Equations (2.8) through (2.11) in Theorem 2.1.2 of the textbook.
Question b#
Use propositional logic to prove the identities given in Equations (2.4) and (2.10) in Theorem 2.1.2 in the textbook.
Hint
In particular, to prove the identity in Equation (2.10) you can draw inspiration from the proof of the identity in Equation (2.11) in Theorem 2.1.2 in the textbook.
Question c#
Let \(A\) and \(B\) be sets with a finite number of elements. Let the notation \(|W|\) denote the number of elements within a given set \(W\). Explain why the following identity holds:
\(|A \cup B| = |A| + |B| - |A \cap B|\).
Hint
To build some intuition, you can first check that the identity holds for the sets \(A\) and \(B\) from Exercise 1.
Exercise 5: Surjective, injective and bijective#
The following four sets are given:
Below, four functions are defined. Determine whether each of them is surjective, injective and/or bijective.
Question a#
\(f_1 :A\rightarrow B\)
\(\ \ x \mapsto x^2\)
Hint
If you are in doubt about the exact meanings of the terms “injective”, “surjective” and “bijective”, then you can refresh your memory by reading Section 2.2 in the textbook once more (more precisely, the text from Lemma 2.2.1 up to Definition 2.2.1).
Hint
It can be helpful to first write out the sets \(A\) and \(B\) explicitly. For example, note that \(A=\{1,2,3,4,5,6,7\}\).
Answer
\(f_1\) is both injective and surjective. Hence it is also bijective.
Question b#
\(f_2 :D\rightarrow B\)
\(\ \ x \mapsto x^2\)
Hint
To show that a function is not injective, it is sufficient to find two different elements from the domain of the function that are mapped to the same element in the codomain.
Answer
\(f_2\) is surjective but not injective, and hence also not bijective.
Question c#
\(f_3 :C\rightarrow B\)
\(\ \ x \mapsto x^2\)
Hint
To show that a function is not surjective it is sufficient to show that the image set (also called the range) of the function is not the entire codomain.
Answer
\(f_3\) is injective but not surjective, and hence also not bijective.
Question d#
\(f_4 :\Bbb Z\rightarrow \Bbb Z\)
\(\ \ x \mapsto |x|\)
Answer
\(f_4\) is neither injective nor surjective, and hence also not bijective.
Exercise 6: Composite functions#
We are given the set \(A=\{0,1,2\}\) as well as two functions \(f: A \to A\) and \(g: A \to \mathbb{R}\). The function \(f\) is given by \(f(x)=2-x\), while the function \(g\) is given by \(g(x)=2x+\mathrm e^x\).
Question a#
Is the composite function \(f \circ g\) defined? What about \(g \circ f\)?
Hint
In the textbook, right after Example 2.2.2, you can read about the requirements for forming a composition of two functions.
Answer
\(f \circ g\) is not defined since the codomain of \(g\) is \(\mathbb{R}\), which is not the same as the domain of \(f\) (which is \(A\)).
\(g \circ f\) is defined since the codomain of \(f\) is the same as the domain of \(g\) (that is, \(A\)).
Note that knowing the expressions of two functions is not necessary if all we need to know is whether compositions of them are defined. Just knowing their domains and codomains is enough for that.
Question b#
Compute \((g\circ f)(a)\) for all \(a \in A\).
Answer
\((g \circ f)(0)=4+\mathrm e^2\), \((g \circ f)(1)=2+\mathrm e\) and \((g \circ f)(2)=1\).
The steps to reach the last answer are these:
Question c#
Determine the expression, domain, codomain and range of the function \(g \circ f\).
Hint
The range (also called the image set) can be determined from the answer to Question b. Domain and codomain can be determined from the definition of a composite function.
Answer
Expression: \((g \circ f)(x)=2(2-x)+\mathrm e^{2-x}\) (or, more neatly: \((g \circ f)(x)=4-2x+\mathrm e^{2-x}\)).
Range: \(\{4+\mathrm e^2,2+\mathrm e,1\}\) (if sorted by size: \(\{1,2+\mathrm e,4+\mathrm e^2\}\)).
Domain: \(A\), so \(\{0,1,2\}\).
Codomain: \(\mathbb R\).
Question d#
Is the function \(g \circ f\) injective? What about surjective?
Answer
Injective: Yes. Surjective: No.
Exercise 7: An inverse function#
Let a function \(f: \mathbb{R} \rightarrow \mathbb{R}\) be given by
Question a#
Let \(g: \mathbb{R} \rightarrow \mathbb{R}\) be a function given by
Use Definition 2.2.1 from the textbook to show that \(g\) is the inverse function of \(f\).
Question b#
Show that \(f\) is bijective.
Hint
Rather than starting out by showing that \(f\) is injective and surjective, try applying Lemma 2.2.2.
Exercise 8: A piecewise defined function#
We define a function \(f: \mathbb{R} \to \mathbb{R}\) in the following way:
\(f(x)= \left\{ \begin{array}{ll} \sin(x) & \text{ if } x \le -\pi/2, \\ 2x & \text{ if } -\pi/2 < x < 0, \\ \mathrm e^x & \text{ if } x \ge 0. \\ \end{array} \right. \)
This function is an example of a piecewise defined function (see also Example 2.2.7 in the textbook) since the expression consists of three “pieces” that apply depending on which value \(x\) takes: one piece applies when \(x \le -\pi/2\), another when \(-\pi/2 < x < 0\) and yet another when \(x \ge 0\).
Question a#
Calculate \(f(-\pi)\), \(f(0)\), \(f(-3/2)\), \(f(-\pi/2)\) and \(f(1)\).
Answer
\(f(-\pi)=\sin(-\pi)=0\), \(f(0)=\mathrm e^0=1\), \(f(-3/2)=2\cdot(-3/2)=-3\), \(f(-\pi/2)=\sin(-\pi/2)=-1\), \(f(1)=\mathrm e^1=\mathrm e\).
Question b#
Sketch the graph of the function \(f\).
Hint
You can start by sketching the first piece from the expression in its part of the domain, and then add the other pieces in their parts of the domain.
Question c#
Is the given function \(f\) injective? What about surjective? Justify your answer.
Answer
No and no.
Exercise 9: Quadratic polynomial functions#
We consider a function \(h: \mathbb{R} \rightarrow \mathbb{R}\) given by
Question a#
Write the function \(h\) in the form \(h(x)=2(x-k_1)^2+k_2\), and state the constants \(k_1\) and \(k_2\). Use this form to determine the range of \(h\).
Hint
One possible method here is known as “completing the square”.
Answer
\(h\) has the range \(\{ x \in \mathbb{R} \, | \, x \ge 7\}\). This set can also be denoted as \(\mathbb{R}_{\ge 7}\).
Question b#
For a given subset \(J \subseteq {\Bbb R}_{\geq 0}\), the restriction of \(h\) to \(J\) is the function we obtain from \(h\) by keeping the same expression and codomain, while restricting the domain to \(J\). State the largest possible interval \(J \subseteq {\Bbb R}_{\geq 0}\) on which the restriction of \(h\) to \(J\) becomes injective.
Hint
Use Question a to draw a sketch of the graph of \(h\).
Answer
\(J=\{ x \in \mathbb{R} \, | \, x \ge 5\}\). This set can also be denoted as \(\mathbb{R}_{\ge 5}\).
Question c#
We now consider the restriction of \(h\) to the interval \(J\) from Question b and restrict the codomain of this function to the set \(\mathbb{R}_{\ge 7}\) from Question a. The resulting function is bijective and is denoted by \(h_1\). More precisely, \(h_1\) is the function \(h_1: J \rightarrow \mathbb{R}_{\ge 7}\) that is given by \(h_1(x)=2x^2 -20x +57\).
Provide an expression for the inverse function \({h_1}^{-1}\).
Hint
A good start is to solve the equation \(2x^2 -20x +57=y\) for \(x\).
Question d#
State the domain and the range of \({h_1}^{-1}\).
Answer
The function \(h_1^{-1}\) has the domain \(\mathbb{R}_{\ge 7}\) and the codomain \(\mathbb{R}_{\ge 5}\). Since \(h_1^{-1}\) is surjective (in fact bijective), the range (image set) of \(h_1^{-1}\) is the same as its codomain, so \(\mathbb{R}_{\ge 5}\).
Have you finished all the exercises?#
If it went too quickly and you are eager for more, then click here for some challenging optional extra exercises.