PDA

View Full Version : Math Problem.. regression line?


Mr biggums
05-18-2007, 06:39 PM
The following five points lie on a function:

(1,20) (2,4) (5,3) (6,2) (10,2)

Find an equation the passes through these points and has these features:

1. 3 points of inflection
2. At least 1 local minimum
3. At least 1 local maximum
4. At least 1 critical point in not at one of the given points
5. The curve is continuous and differentiable throughout
6. The equation must be defined as a piecewise function.


I believe the first step is to run a regression, but how do I make sure the regression line follows these 6 criteria.

HP
05-18-2007, 06:54 PM
there's a good chance that i have no idea what i'm talking about, but i'd start with assuming the function is of the form:

Ex^4+Dx^3+Cx^2+Bx+A

you should be able to find all solutions (if any) for the constants

then check if any of the solutions satisfy all the requirements

if that doesn't work, add in a Fx^5 term and repeat. if that doesn't work, add a Gx^6 term etc...

Mr biggums
05-18-2007, 06:56 PM
It can't be a single polynomial function. One of the stipulations is that it has to be piecewise.

ncray
05-18-2007, 07:09 PM
Set up the following system of equations:
\!\(\*
RowBox[{"Solve", "[",
RowBox[{
RowBox[{
RowBox[{"(", GridBox[{
{"1", "1", "1", "1", "1"},
{"16", "8", "4", "2", "1"},
{\(5^4\), \(5^3\), \(5^2\), "5", "1"},
{\(6^4\), \(6^3\), \(6^2\), "6", "1"},
{\(10^4\), \(10^3\), \(10^2\), "10", "1"}
}], ")"}], ".", \({a, \ b, \
c, \ d, \ e}\)}], "==", \({20, \ 4, \ 3, \ 2, \ 2}\)}], "]"}]\)

You end up getting the following quartic: 23/240x^4 - 259/120x^3 + 4003/240x^2 - 1571/30x + 231/4

This has 2 inflection points, >= 1 local min/max, and it probably has at least one crit point not at one of the given points. That part doesn't really matter. What greatly simplifies this problem is that it must be a piecewise function. So, just say like from (-infinity, 10) your function is 23/240x^4 - 259/120x^3 + 4003/240x^2 - 1571/30x + 231/4. Then from 10 to infinity, you want to attach another function that gives you another inflection point and critical point (maybe). The simplest one that comes to mind is a cubic. Try g(x) = (x-11)^3 + 3 from 10 to infinity. I kind of did this in a hurry, but check that it satisfies all the conditions. You might have to play around a little bit to get the derivatives to be continuous though.