Firstly we need to integrate f(x). The general rule is: the integral of x^n = (1/(n+1))x^(n+1)+CSo apply that rule to each term of f'(x) as so:Integral of 18x^2 = (18/(2+1))x^(2+1) = 6x^3Integral of -24x = (-24/(1+1))x^(1+1) = -12x^2Integral of -6 = (-6/(0+1))x^(0+1) = -6xThen put the parts back together to give f(x) = 6x^3-12x^2-6x+c remebering to add the plus c at the end from our general rule.Once we have this equation we can use the points we are given to calculate the value of C. To do this we insert our values of x and y to give40 = 6(3^3) - 12(3^2) - 6(3) + C = 162 - 108 - 18 +C = 36 +CWe then rearrange to find C, by subtracting 36 from both sides40 - 36 = C + 36 - 364 = CNow we have our value of C we can sub it back into the equation to give our final value of f(x) as:f(x) = 6x^3 - 12x^2 -6x +4