9.4 Problems
Problem 1. Which of these functions are injective, surjective, or bijective? Find the inverse of bijective functions.
(a) f : ℝ → (0,∞), x→ex (b) g : ℝ → [0,∞), x→x2 (c) h : [0,∞) → [0,∞), x→x2 (d) sin : ℝ → [0,1], x→sin(x) (e) tan : ℝ →ℝ, x→tan(x),
Problem 2. Find a function f : ℝ →ℝ such that (f ∘f)(x) = −x.
Problem 3. Can any real function g : ℝ →ℝ be obtained as g = f ∘f for some f : ℝ →ℝ?
Problem 4. Following the example of the composition Section 9.2.1, implement
- the add function, taking f and g, returning f + g,
- the mul function, taking f and g, returning fg,
- and the div function, taking f and g, returning f∕g.
Join our community on Discord
Read this book alongside other users, Machine Learning experts, and the author himself. Ask questions...