Suppose that f(x), g(x). and h(x) are functions such that f(x) is O(g(x)) and g(x) is O(h(x)). Show that f(x) is O(h(x)).

Solution:Step-1: In this problem we need to show that f(x) is O(h(x)).Note: Let us consider f and g are functions from the set of integers to the set of real numbers. The estimate value can be said that f(x) is O(g(x)) if there are constants C and k such that , where C > 0 and x> k.The constants C and k are called the witnesses to the relationship. The definition of f(x) is O(g(x)) says that f(x) grows slower than some fixed multiple of g(x) as x grows without bound.Step-2: Given : f(x) , g(x) , and h(x) are functions such that f(x) is O(g(x)) and g(x) is O(h(x)).That is , and .By using the above note : f(x) is O(g(x)) if there are constants and such that , where and x > .The constants and are called the witnesses to the relationship………….(1)Step-3:g(x) is O(h(x)) if there are constants and such that , where and x > .The constants and are called the witnesses to the relationship…………(2)From (1) , and (2) we get: So, clearly here , and .Therefore , , and x > k are witnesses for