This is similar to this question, however the key difference that does not allow me to use that answer is that one of my known points is not x = 0.
I am required to find the equation of a cubic function, and I am only given one point [10,25] with slope 5 and a second point [45,f(x)] with slope of 4.
My attempts so far have dealt with the general form of a cubic: $$f(x)=ax^3+bx^2+cx+d\\f'(x)=3ax^2+2bx+c$$ Using this, and my known information I am able to get the following equations: $$25=10^3a+10^2b+10c+d\\5=3a10^2+20b+c\\4=3a45^2+90b+c$$ However, I have one less equation than I need in order to solve for the unknowns simultaneously.

  • 1
    $\begingroup$ Your second point has $x$ coordinate $45$ but in the equation you write $25$. Presumably one is a typo. The fact that $x=0$ is not one of your points is not a problem. You are correct that you have one piece of data too few to specify the cubic. $\endgroup$ Aug 15, 2018 at 2:22
  • 1
    $\begingroup$ The system is underdetermined, unless you have additional information besides what was posted. Solve the system for $d=0$ and $d=1$ for example, and you get two different cubics which both otherwise meet the given constraints. $\endgroup$
    – dxiv
    Aug 15, 2018 at 2:23
  • $\begingroup$ You're correct @RossMillikan, that was a typo. Not sure how I missed it. Either way, edited to fix it. $\endgroup$
    – Hamish W
    Aug 15, 2018 at 7:21

1 Answer 1


In comments, you received good explanations for sure but at the same time you can solve the problem expecting that, at some time, you will get the value of $f(45)$.

So the equations are $$a\, 10^3 +b\, 10^2+c\, 10+d =25$$ $$3\,a \,10^2+2\,b \,10 +c =5$$ $$a \,45^3 +b \,45^2+c \,45+d =f(45)$$ $$3\,a\, 45^2+2\,b\, 45 +c =4$$

Using the method of your choice, this would give $$a=\frac{365-2 f(45)}{42875}\qquad b=\frac{33 f(45)-6145}{8575}$$ $$ c=\frac{28775-108 f(45)}{1715}\qquad d=\frac{5(20 f(45)-5463)}{343}$$ So, you can write a small program (or use Excel) which, for a given value of $f(45)$ will output the coefficients $a,b,c,d$ and will be able to compute $f(x)$ for any other $x$.

It would be $$f(x)=\frac{-2 x^3+165 x^2-2700 x+12500}{42875}f(45)+\frac{73 x^3-6145 x^2+143875 x-682875}{8575}$$

  • $\begingroup$ Im afraid you've lost me slightly there, I can understand what it is you are talking about achieving by expecting a value of $f(45)$. Im struggling to see how you managed to get the values of the coefficients without using the others(Via straight rearranging), Would you be able to mention the method you used or otherwise equivalent so I can read up on it and hopefully follow you through to the end? Im in my final year of high school, but I am going a bit off the deep end with this assignment so I understand I will need to look into techniques I havent formally studied yet. $\endgroup$
    – Hamish W
    Aug 15, 2018 at 7:39
  • $\begingroup$ @HamishW. I just used elimination to compute parameters $a,b,c,d$ assuming that $f(45)$ is just a constant (call it $f$ for the time being). You could do it using matrix calculations to get them. Now, $f(x)$ is totally defined for a given value of $f(45)$. Is it better ? $\endgroup$ Aug 15, 2018 at 7:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .