Given that \(f '(x) = 3x^{2} - 6x + 1\) and f(3) = 5, find f(x).

A.

\(f(x) = x^{3} - 3x^{2} + x + 20\)

B.

\(f(x) = x^{3} - 3x^{2} + x + 31\)

C.

\(f(x) = x^{3} - 3x^{2} + x + 2\)

D.

\(f(x) = x^{3} - 3x^{2} + x - 13\)

Correct answer is C

\(f ' (x) = 3x^{2} - 6x + 1\)

\(f(x) = \int (3x^{2} - 6x + 1) \mathrm {d} x\)

= \(x^{3} - 3x^{2} + x + c\)

\(f(3) = 5 = 3^{3} - 3(3^{2}) + 3 + c\)

\(27 - 27 + 3 + c = 5 \implies 3 + c = 5\)

\(c = 2\)

\(f(x) = x^{3} - 3x^{2} + x + 2\)