Intro to Mathematics for Computer Science (06-20415 2012/13 Term 1) School of CS, University of Birmingham In-Class Exercises -- 15. Nov 2012 1) You can use books and a calculator. 2) You can talk with your neighbor about the topics. 3) You can ask Dr. Bernd Bohnet or Prof. John Barden for help. 4) Use a extra sheet of paper to solve the exercises of one page. Ex. 1: The Cartesian product of two sets X and Y, denoted X × Y, is the set of all possible ordered pairs: X Y = { (x,y) | x Xy Y } a) What is the Cartesian product of the sets X = {1,2} and Y={a,b,c}? Please, write the Cartesian product as the set of pairs : X Y = {(1,a), ... b) A function is a subset of the Cartesian product f X Y and written as f : XY . Underline the correct term (more than one term might be correct): X Y f(x) x y f(X) range, independent, domain, co-domain, dependent, function, image range, independent, domain, co-domain, dependent, function, image range, independent, domain, co-domain, dependent, function, image range, independent, domain, co-domain, dependent, function, image range, independent, domain, co-domain, dependent, function, image range, independent, domain, co-domain, dependent, function, image c) Given the function f, g and h: XY and X = {1,2,3} and Y={a,b,c} with f := { (1,a), (2, b)}, g :={(1,a),(2,b),(3,c)}, and h:={(1,a),(2,b),(3,b)}. Is f, g and h surjective, injective and/or bijective? Does anyone of the functions f, g or h have an inverse function, if yes define the inverse function? Ex. 2: Given the equation: x² + y² = 1 a) Transpose the equation to make y the subject. b) Construct ordered pairs of numbers corresponding to the integer values of x where -1x1 in intervals of 0.2. c) Plot the ordered pairs of numbers on a Cartesian graph and join the points with a continuous curve. Ex. 3: Given the functions: 2x, x³ - x, sin x, 1/x, 1/(x²-1) and x/x a) Draft each of the functions. (You do not need to draw the exact graphs.) b) What are the domain and co-domain of the functions. Ex.4: Which of the following equations is a function? 3 (a) 𝑦 = 𝑥 2 , (b) 𝑦 = 𝑥 2 + 𝑥 + 1 , (c) y = 𝑦 = (√𝑥)3 Ex. 5: Given the two functions f and g by 𝑓(𝑥) = 2𝑥 − 2 for -4<x<4 𝑔(𝑥) = 5𝑥 + 1 for -4 <x<0 a) find the domain and range of h(x) = f(x) - g(x) b) Calculate the function k(x) = f(x) / g(x) c) Find the domain of k(x) Ex. 6: Given the two functions f and g by 2𝑥 𝑓(𝑥) = (5𝑥−10)(3𝑥+3) 𝑔(𝑥) = 1 3𝑥 for -4<x<1 , x -1 for -2 <x < 0 d) Find the domain and range of h(x) = f(x) - g(x) e) Calculate the function k(x) = f(x) / g(x) f) Find the domain of k(x) Ex. 7: Composition of functions 𝑓(𝑥) = 3x + 12 𝑔(𝑥) = 2𝑥 + 6 a) What is the result of f(g(2)) ? b) Find each of the expressions f(g(x)) and g(f(x)) Ex. 8:Trigometric functions a) b) c) d) What is the radius of the unit circle r and what is its perimeter? Assign the appropriate function to a, b and d (sin ϴ, cos ϴ, tan ϴ)? Draw the graphs of sin ϴ, cos ϴ, and tan ϴ. What is a² + b² = ? Ex. 9:Composition of functions 𝑓(𝑥) = sin x 𝑔(𝑥) = cos 𝑥 ℎ(𝑎, 𝑏) = a2 + b2 e) Find the expression of h(f(x),g(x)). f) Compute h(f(x),g(x)) for x = 1, x=, x=2 g) What is the range of the function? Ex. 10: Inverse function a) What happens with the ordered pairs (x,y) of a inverse function? 1 b) What is the inverse function of f(x)=x and 𝑔(𝑥) = 𝑥 ? c) Does 𝑦 = 𝑥 3 have an inverse function and if yes what is the inverse function? 1 d) Does 𝑦 = 𝑥 5 have an inverse function and if yes what is the inverse function?