Let f(x) = a x^3 + b x^2 + c x + d .
Firstly, note that the leading coefficient is 1, which means a = 1 . So f(x) = x^3 + b x^2 + c x + d .
Now, calculate the derivatives of f . We get f'(x) = 3 x^2 + 2 b x + c , and f''(x) = 6 x + 2 b .
Secondly, since there is an inflection point at x = 1 , we know that f''(1) = 0 , which implies 6 + 2b = 0 , or b = -3 . So f(x) = x^3 - 3 x^2 + c x + d , and f'(x) = 3 x^2 - 6 x + c .
Thridly, since there is an critical point at x = 2 , we know that f'(2) = 0 , which implies 3 xx 2^2 - 6 xx 2 + c = 0 , or c = 0 . So f(x) = x^3 - 3 x^2 + d .
Finally, we use the fact that the curve passes through (1, 7) , so f(1) = 7 . Substituting, we get 1 - 3 + d = 7 , so d = 9 . So f(x) = x^3 - 3 x^2 + 9 .