Exercises – Short Day#

Exercise 1: Python Exercise#

This exercise revisits the formula mentioned in Question 2c from Long Day this week.

Use command console Python on your computer for running the following program. You can either type the given code into your console or copy-paste the given Python code lines below.

Question a#

A set in the form \(\{1,2,3\}\) can be input into Python by typing {1,2,3} in the command console. As explained in the beginning of Section 2.1 in the textbook the order of elements is not important in a set. How can we check with the help of Python that for example \(\{1,2,3\}=\{1,3,2\}\)? Duplicated elements in a set also does not change the set. For instance we have \(\{1,1,2\}=\{1,2\}\). Try to check this identity in Python.

Question b#

Run the following Python code:

A={9, 12, 15, 21, 24, 27, 30, 33, 36, 42, 48, 51, 54, 57, 60, 63, 66, 69, 72, 78, 81, 84, 87, 90, 93, 96}

B={12, 16, 24, 28, 32, 36, 48, 52, 56, 60, 64, 68, 72, 80, 84, 88, 92, 96}

len(A)

len(B)

What is the meaning of the command len?

Question c#

The intersection and the union of two sets \(A\) and \(B\) can be computed with Python as A.union(B) and A.intersection(B).

Try the commands on the two sets \(A\) and \(B\) from Question a.

Question d#

Now check with Python that the formula \(|A \cup B|=|A|+|B|-|A \cap B|\) holds true for the two sets from Question a.

Question e#

We now introduce a new set \(C\):

C={6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96}

Try formulating an identity about \(|A \cup B \cup C|\), now with the three sets \(A\), \(B\) and \(C\) rather than just the two from before. You can check with Python whether you have created a formula that works.


Exercise 2: Composite functions#

We are given the set \(A=\{0,1,2\}\) as well as the two function \(f: A \to A\) and \(g: A \to \mathbb{R}\). \(f\) is defined by the expression \(f(x)=2-x\) while \(g\) is defined by the expression \(g(x)=2x+\mathrm e^x\).

Question a#

Is the composite function \(f \circ g\) defined? What about \(g \circ f\)?

Question b#

Compute \((g\circ f)(a)\) for all \(a \in A\).

Question c#

Determine the functional expression, domain, co-domain, and image set (also called the range) of the function \(g\circ f.\)

Question d#

Is the function \(g \circ f\) injective? What about surjective?


Exercise 3: Invers Functions#

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}_{>0}\) given by the expression \(x\mapsto \mathrm e^x.\)

Question a#

State the domain, co-domain, and image set of \(\mathrm{ln}\).

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}\).

Question c#

Proof the algebraic rule

\[\ln(a\cdot b)=\ln(a)+\ln(b)\]

where \(a\) and \(b\) are positive real numbers, \(a,b \in \mathbb{R}_{>0}\).


Exercise 4: Logarithms#

Let \(a\) be a positive, real number different from \(1\). The function \(f: \mathbb R \to \mathbb R_{>0}\) 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?

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?

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\).


Exercise 5: Graph of Invertible Function#

Question a#

Sketch the graphs of the exponential and logarithmic functions from Example 2.3.2 in the same figure. Is there a symmetry between these two graphs?

Sketch also the graphs of the \(\tan\) and \(\mathrm{arctan}\) functions from Section 2.3 in the textbook in a (new) figure. Verify that the same symmetry appears.

What is the reason for this symmetry?


Exercise 6: Slope and Inverses#

Keep in mind in this exercise that if you mirror a line in the plane with a slope of \(r \in \mathbb{R}\setminus \{0\}\) about the line \(y=x\), then you get a line with a slope of \(1/r\). We consider an invertible function \(f: \mathbb R \to \mathbb R\).

Question a#

Use the result described in the answer to Exercise 5 to realise graphically that if the graph of \(f\) has a tangent line through \((x,f(x))\) with a slope of \(r \in \mathbb{R}\setminus \{0\}\), then the graph of \(f^{-1}\) has a tangent line through \((f(x),x)\) with a slope of \(1/r\).

Question b#

Conclude that if \(f\) has a derivative \(f'(x)\) in \(x\) then the derivative of \(f^{-1}\) in \(f(x)\) is equal to \(1/f'(x)\). In other words:

\[(f^{-1})'(f(x))=1/f'(x).\]

Question c#

By replacing the variable \(x\) with \(f^{-1}(x)\) rewrite the formula from Question b to \((f^{-1})'(x)=1/f'(f^{-1}(x)).\)

Question d#

Now use the formula from Question c to realise that \(\mathrm{arctan}'(x)=1/\tan'(\mathrm{arctan}(x))\).

Question e#

Use the formula \(\tan'(x)=\tan^2(x)+1\) to reach the formula

\[\mathrm{arctan}'(x)=1/(x^2+1).\]

Remark: a similar approach will give the formulas:

\[\mathrm{arccos}'(x)=-1/\sqrt{1-x^2}\]

and

\[\mathrm{arcsin}'(x)=1/\sqrt{1-x^2}.\]