Exercises – Short Day#
Exercise 1: Inverse Functions - the Natural Exponential Function and the Natural Logarithm#
For a given bijective function \(f: A \to B\) the corresponding inverse function is denoted by \(f^{-1}: B \to A\) (see Definition 2.2.1 in the textbook). The natural logarithm \(\mathrm{ln}\) is introduced in Example 2.3.2 as the inverse function of the exponential function \(\mathrm{exp}: \mathbb{R} \to \mathbb{R}_+\) given by the expression \(x\mapsto \mathrm e^x.\)
Question a#
State the domain, co-domain, and image set (also called range) of \(\mathrm{ln}\).
Answer
Domain: \(\mathbb{R}_+\).
Co-domain: \(\mathbb{R}\).
Image set: \(\mathbb{R}\).
Question b#
State the functional expression, domain, co-domain, and image set of the composite functions \(\mathrm{ln} \circ \mathrm{exp}\) and \(\mathrm{exp} \circ \mathrm{ln}\).
Hint
If you are in doubt about what the notation \(g \circ f\) exactly means, then see an explanation in the textbook right after Example 2.2.2. For the definition of an inverse function, see Definition 2.2.1.
Answer
From Definition 2.2.1 we have \(\mathrm{ln} \circ \mathrm{exp}=\mathrm{id}_{\mathbb R}\) and \(\mathrm{exp} \circ \mathrm{ln}=\mathrm{id}_{\mathbb{R}_+}\). Thus, the following applies:
\(\mathrm{ln} \circ \mathrm{exp}\) has the functional expression \(x \mapsto x\) (that is, \(\mathrm{ln}(\mathrm e^x)=x\)), the domain \(\mathbb R\), the co-domain \(\mathbb R\), and the image set \(\mathbb R\).
\(\mathrm{exp} \circ \mathrm{ln}\) has the functional expression \(x \mapsto x\) (that is, \(\mathrm e^{\mathrm{ln}(x)}=x\)), the domain \(\mathbb R_+\), the co-domain \(\mathbb R_+\), and the image set \(\mathbb R_+\).
Question c#
Prove the algebraic rule
where \(a\) and \(b\) are positive real numbers, \(a,b \in \mathbb{R}_+\).
Hint
You can use the fact that \(\mathrm e^x \cdot \mathrm e^y=\mathrm e^{x+y}\) for all real numbers \(x\) and \(y\). You can also use the fact that the exponential function has the image set \(\mathbb{R}_+.\)
Hint
Because the exponential function has the image set \(\mathbb{R}_+\) we can for given positive real numbers \(a\) and \(b\) always find real numbers \(x\) and \(y\) such that \(a=\mathrm e^x\) and \(b=\mathrm e^y\). More down to earth: if \(a=\mathrm e^{\ln(a)}\) and \(b=\mathrm e^{\ln(b)}\), then we have \(x=\ln(a)\) and \(y=\ln(b)\) for any given \(a\) and \(b\).
Exercise 2: Recursively Defined Functions#
Question a#
A function \(f: \mathbb{N} \to \mathbb{R}\) is defined as follows: \(f(1)=0\), and \(f(n)=2\cdot f(n-1)+1\) if \(n \ge 2\).
Compute \(f(5)\).
Hint
First, compute \(f(2)\). Can you use the value of \(f(2)\) to determine another value of the function \(f\)?
Answer
\(f(5)=15\).
Along the way in your calculation you should also have gotten \(f(2)=1\), \(f(3)=3\), and \(f(4)=7\).
Question b#
A function \(g: \mathbb{N} \to \mathbb{R}\) is defined recursively as follows: \(g(1)=3\), \(g(2)=1\), and \(g(n)=n\cdot g(n-1)+g(n-2)\) if \(n \ge 3\).
Compute \(g(6)\).
Hint
In order to determine \(g(n)\) from the given recursion, we must use not just \(g(n-1)\) but also \(g(n-2)\).
Another example of a recursion with depth 2 is the definition of Fibonacci numbers in Example 3.1.2 in the textbook.
Hint
The values \(g(1)\) and \(g(2)\) are read directly from the recursive definition. These allow you to compute \(g(3)\) as the next step; from the recursive definition we see that the formula is \(g(3)=3g(2)+g(1)\) for \(n=3\). Afterwards, \(g(4)\) can be computed, then \(g(5)\) and so on.
Answer
\(g(6)=811\).
Along the way in your calculation you should have gotten \(g(3)=6\), \(g(4)=25\), and \(g(5)=131\).
Question c#
An attempt has been made to define the function \(h: \mathbb{N} \to \mathbb{R}\) recursively as follows: \(h(1)=11\), and \(h(n)=h(n^2-5n+7)\) if \(n \ge 2\).
Compute \(h(4)\). Can \(h(5)\) also be computed?
Hint
For the value of \(h(4)\), the recursive definition gives \(h(4)=h(3)\). Now, you have to try computing the value of \(h(3)\).
Answer
\(h(4)=11\).
If you try to compute \(h(5)\), you will get
In each iteration step, the recursion calls itself for larger input values than what has already been computed. Hence, the recursion will never end, and \(h(5)\) cannot be computed.
Exercise 3: “Dot-Notation” and the Summation Symbol#
For a given natural number \(n\), we are given the sequence of real numbers \(a_1,\dots,a_n\). The sum of this sequence can be written as \(a_1+\cdots+a_n\) or, if preferred to indicate the pattern more clearly, as \(a_1+a_2+\cdots+a_n\). In this exercise we will dive into some examples of sums and notation uses like these.
Question a#
We define \(a_k=2k\) for \(k=1,2,3,4\). What is \(a_1+\cdots+a_n\) if \(n=4\)? And what if \(n=3\)?
Answer
\(n=4\):\(\quad a_1+a_2+a_3+a_4=2+4+6+8=20\).
\(n=3\):\(\quad a_1+a_2+a_3=2+4+6=12\).
Question b#
Repeat Question a for \(n=2\) and for \(n=1\).
Answer
\(n=2\): \(\quad a_1+a_2=2+4=6\). That is, the “dots” should simply be ignored in notation like \(a_1+\cdots+a_n\) if \(n=2\).
\(n=1\): \(\quad\) Now the answer is simply \(a_1=2\). Meaning, notation like \(a_1+\cdots+a_n\) for \(n=1\) might feel somewhat misleading since we actually do not have multiple terms but only the one term \(a_1\). This is one reason that some prefer using summation notation with the symbol \(\sum\), as we look at next.
Question c#
This Question concerns the Sigma summation symbol \(\sum\).
Compute \(\sum_{k=1}^4 k^2\). What is \(\sum_{k=1}^1 k^2\)?
Hint
The summation symbol is defined recursively in Equation (3.5) in the textbook.
Answer
\(\sum_{k=1}^4 k^2=1^2+2^2+3^2+4^2=30.\)
\(\sum_{k=1}^1 k^2=1^2=1.\)
Opgave 4: The Graph of an Invertible Function#
Question a#
Sketch the graphs of the exponential function and of the logarithmic function from Example 2.3.2 in the same figure. Describe the symmetry you see between the graphs.
What is the reason for this symmetry?
Answer
The symmetry is a mirroring about the line \(y=x\).
The reason for the symmetry is that \(\mathrm e^x=y\), if and only if \(x=\ln(y).\)
Generally, if \(f: A \to B\) is an invertible function and we have \(x \in A\) and \(y \in B\), then \(f(x)=y\) if and only if \(x=f^{-1}(y)\). The symmetry hence makes sense: if we mirror the point \((x,f(x))\) on the graph of \(f\) about the symmetry line, we achieve the point \((f(x),x)\). If we now denote \(f(x)\) by \(y\) (that is, \(y=f(x)\)), then we get \((f(x),x)=(y,f^{-1}(y)),\) which is a point on the graph of \(f^{-1}\). On the other hand, if we mirror a point from the graph of \(f^{-1}\) about the symmetry line, we get a point on the graph of \(f\).
Exercise 5: Logarithms#
Let \(a\) be a positive, real number different from \(1\). The function \(f: \mathbb R \to \mathbb R_+\) is given by the expression \(x \mapsto a^x\).
Question a#
Draw a sketch of the graph of the function for \(a \in \, ]0,1[\,\). Is \(f\) monotone? More precisely, is \(f\) strictly increasing or strictly decreasing?
Hint
If you are in doubt about what the terms “monotone”, “strictly increasing” and “strictly decreasing” mean then you can find an explanation in the text right after Lemma 2.3.1 in the textbook.
Answer
The function \(f\) is monotone. More precisely, it is strictly decreasing.
Question b#
Again draw a sketch of the graph of the function, but now under the assumption that \(a \in \mathbb{R}_{>1}\). Is \(f\) strictly increasing or strictly decreasing?
Answer
The function \(f\) is strictly increasing.
Question c#
One can show that \(f\) is bijective, which means that \(f\) has an inverse function. Provide a functional expression for the inverse function of \(f\).
Hint
Try solving the equation \(y=a^x\) for \(x\). The formula \(a=\mathrm e^{\ln(a)}\) can be of help, and so can the rule that \((u^v)^w=u^{vw}\) for all \(u \in \mathbb R_+\) and all \(v,w \in \mathbb R\).
Answer
\(f^{-1}(x)=\ln(x)/\ln(a).\)
Remark: one would typically write \(\log_a\) to denote this inverse function and then call it the logarithm with base \(a\). Often-used logarithmic functions apart from \(\mathrm{ln}\) are \(\log_2\) and \(\log_{10}\).