There are three terms in the expression for f(x): "x3
", "xlog(x)", and "-x". We want to show that the sum of these terms is less than or equal to another expression which we can trivially show is O(g(x)). The easiest way to do that is to show that each of the terms is less than or equal to x4
, for x ≥ 1, and combine them. Note that since both x and log(x) are ≤ x for x ≥ 1, we have that xlog(x) ≤ x(x) ≤ x4
. As for the right term, it should be apparent that -x ≤ x4
for x ≥ 1. And the same holds for the first term.
Edit: Fixed a "≤".