Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I need to find a polynomial (or other continuous elementary function) on the interval [70, 180] such that it passes through the points (70, 0) (this is a relative min), (105, 17) (this is a relative max), (130, 5) (min), (150, 13) (max), (180, 12) (min). I was able to find a series of cubics and quadratics which connect 2 points at a time, but I need just one function that fits all of this data (or at least a function which fits 3 points) and I'm not sure how to do it. Thanks!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You can let $f(x)$ be your equation. Since you have a total of 5 min/max, it means that your equation must be at least 6th degree.

$f(x) = ax^6 + bx^5 + cx^4 + dx^3 + ex^2 + fx + g$

And using the points you have:

$f(70) = a(70)^6 + b(70)^5 + c(70)^4 + d(70)^3 + e(70)^2 + f(70) + g = 0$

$f(105) = a(105)^6 + b(105)^5 + c(105)^4 + d(105)^3 + e(105)^2 + f(105) + g = 17$

$f(130) = a(130)^6 + b(130)^5 + c(130)^4 + d(130)^3 + e(130)^2 + f(130) + g = 5$

$f(150) = a(150)^6 + b(150)^5 + c(150)^4 + d(150)^3 + e(150)^2 + f(150) + g = 13$

$f(180) = a(180)^6 + b(180)^5 + c(180)^4 + d(180)^3 + e(180)^2 + f(180) + g = 12$

Using the fact that there are optimums:

$f'(x) = 6ax^5 + 5bx^4 + 4cx^3 + 3dx^2 + 2ex + f$

$f'(70) = 6a(70)^5 + 5b(70)^4 + 4c(70)^3 + 3d(70)^2 + 2e(70) + f = 0$

$f'(105) = 6a(105)^5 + 5b(105)^4 + 4c(105)^3 + 3d(105)^2 + 2e(105) + f = 0$

$f'(130) = 6a(130)^5 + 5b(130)^4 + 4c(130)^3 + 3d(130)^2 + 2e(130) + f = 0$

$f'(150) = 6a(150)^5 + 5b(150)^4 + 4c(150)^3 + 3d(150)^2 + 2e(150) + f = 0$

$f'(180) = 6a(180)^5 + 5b(180)^4 + 4c(180)^3 + 3d(180)^2 + 2e(180) + f = 0$

You have 10 equations and 7 variables. There should be one solution, although it looks tedious to look for it.

share|improve this answer
3  
The min/max add a constraint, as you show. To guarantee a solution will require a 9th degree polynomial-that has 10 constants to match the 10 equations. –  Ross Millikan Apr 22 '13 at 16:09
1  
@RossMillikan Woops, I forgot about the optimums being max or min. But can't this be made simpler by using $f''(x) > 0$ for minimums (although we would be adding inequalities to it...)? I thought that 7 equations out of the 10 would have sufficed. Would you be kind enough to explain the need for 3 additional equations? –  Jerry Apr 22 '13 at 16:21
2  
Generally speaking, if you have fewer unknowns than equations, the system is overdetermined and has no solution. It can have, but usually that comes about because there is some linkage between the equations. It isn't that he requires specifically max or min, just requiring zero derivative at those points. That is what created your last five equations. –  Ross Millikan Apr 22 '13 at 17:04
1  
Thanks a lot for taking the time to answer this time-consuming question. I connected 2 points at a time using this exact same method, and most of my functions were of the form ax^3+bx+c. However, the coefficients were always very messy and since I later had to find the area under this curve i figured it would be much better to just do it in one shot with one equation. –  Ovi Apr 22 '13 at 21:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.