Exercises – Short Day#
Exercise 1: 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, codomain and image set (also called the range) of \(\mathrm{ln}\).
Answer
Domain: \(\mathbb{R}_+\).
Codomain: \(\mathbb{R}\).
Image set: \(\mathbb{R}\).
Question b#
State the expression, domain, codomain 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 exactly the notation \(g \circ f\) means, see the 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 holds:
\(\mathrm{ln} \circ \mathrm{exp}\) has the expression \(x \mapsto x\) (that is, \(\mathrm{ln}(\mathrm e^x)=x\)), the domain \(\mathbb R\), the codomain \(\mathbb R\) and the image set \(\mathbb R\).
\(\mathrm{exp} \circ \mathrm{ln}\) has the expression \(x \mapsto x\) (that is, \(\mathrm e^{\mathrm{ln}(x)}=x\)), the domain \(\mathbb R_+\), the codomain \(\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 any 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 concretely: since \(a=\mathrm e^{\ln(a)}\) and \(b=\mathrm e^{\ln(b)}\), we can simply take \(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 have got \(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 the 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 got \(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 need to try calculating \(h(3)\).
Answer
\(h(4)=11\).
If you try to compute \(h(5)\), you will get
In each iteration step, the recursion calls itself with a larger input value than before. Hence, the recursion will never end, and \(h(5)\) cannot be computed.
Exercise 3: “Dot notation” and the summation symbol#
Let \(n\) be a natural number, and let \(a_1,\dots,a_n\) be a sequence of real numbers. The sum of this sequence (also called a series) can be written as \(a_1+\cdots+a_n\) or, if we want to show the pattern more clearly, as \(a_1+a_2+\cdots+a_n\). In this exercise we look at some examples of sums and of notation like this.
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\). This means that 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 why some people prefer using summation notation with the symbol \(\sum\), which 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.\)
Exercise 4: The graph of an invertible function#
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
One graph is the reflection of the other about the line \(y=x\), meaning \(y=x\) is a line of symmetry in their combined sketch.
The reason for the symmetry is that \(\mathrm e^x=y\) if and only if \(x=\ln(y)\).
In general, 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)\). This explains the symmetry: if we reflect the point \((x,f(x))\) on the graph of \(f\) about the symmetry line, we obtain 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 reflect 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, 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, sketch 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 an 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 helpful, 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\). Commonly used logarithmic functions besides \(\mathrm{ln}\) are \(\log_2\) and \(\log_{10}\).
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.