Calculate cubic from 2 gradients and 2 points

algebra-precalculusderivativesfunctionspolynomials

I have a question that is supposed to be solved using differentiation, wherein I have to find a cubic function f(x) where the gradient at (5,20) is zero and the gradient at (8,22) is two.

image of co-ordinates on the graph for cubic function

I know that I need to use 4 linear simultaneous equations with 4 variables (a,b,c,d), however, I'm not quite sure how to go about doing so.

Any help would be greatly appreciated

Best Answer

Alternatively, start with a linear function that passes through your two points. Add an appropriate multiple of $(x-5)(x-8)^2$ to get the slope you want at $x=5$ and an appropriate multiple of $(x-8)(x-5)^2$ to get the right slope at $x=8$.