Quartic equation generator

I have some data that look like the middle bit of a quartic equation of the form ax^4-b^x2+c=0. I know how to do it in principle, but the arithmetic is quite complex. Is there a site into which I can enter a number of points in (x,y) form and get the equation? My google-fu is weak, apparently.

I believe that Excel will do this. I don’t have a copy of Excel available to me right now, but I think if you chart your data and add a trendline, you can change the trendline properties to be polynomial of degree 4. I know LibreOffice supports this and I’m pretty sure Excel does too.

Note that while that is a quartic equation, it might be simpler to treat it as a quadratic equation in z = x^2.

But your question doesn’t really make sense. Do you mean you have z and y data that looks like
y = ax^4 - bx^2 + c, and you want to find a b c that gives you a best fit?

If so Solver will do that. Put your y and x points in columns. Then in a new column put (y - ax^4 + bx^2 - c)^2 with a b and c in three cells. Sum these, then use Solver to minimize that sum by changing the cells with a b and c.

You can use standard multi-linear regression techniques. Just use a matrix with columns x^4, x^2, and 1 as your regressor matrix.

I’ll also add that I’m a little confused how you determined not only that equation you sought was a quartic polynomial but also a very ‘nice’ quartic polynomial. What led you to this conclusion? Symmetry with respect to the y-axis but not quite a parabola?

Thank you, all!

markn+, you are right! You can simply plot the data in Excel, add the trend line, and it will calculate the equation and give you the R-squared:

[SuperKaplowzer]

r^2=.8337, bitches!

[/SuperKaplowzer]

Jesus Christ, are the stats in Excel now more powerful than in SPSS? It cacks out at cubic.

Lance Turbo, yes, when I ran the scatter plot, the curve looked almost parabolic (SPSS gave me an r=.6 something, which would normally be awesome), but the tails didn’t fit - they tailed off, if you follow, in a non-parabola manner. I was banging my head against the wall where I saw a curve like that, and then realized it was the bit between the minima of the type of equation in the OP. (Went through my old calculus assignments and found the template curve there.)

OldGuy Thanks for the tip on Solver. I did the Add On in Excel, and I think that’s going to be really helpful.

What’s SPSS? I’ve never seen any proper stats software that didn’t allow fitting to an arbitrary functional form.

SPSS is an old-school statistics software suite marketed to social scientists, and I’m positive it does allow fitting to an arbitrary form; there appear to be several Youtube videos demonstrating how to do this.

^Huh. I’ll look into this - but it certainly isn’t as simple as it is in Excel - simple once Markn+ tells you it can be done, that is! I had only used the “Curve Fitting” (which has a check box for quadratic or cubic, and then things like compound, logarithmic, and others, but doesn’t do functions as in the OP. It looks like more can be done with the “Non-Linear Regression” tab, however.

So if SPSS is old school (which I agree it is) and it is marketed to social scientists (which is how I came across it), then what are the cool, hip suites out there? I wouldn’t mind exploring other options. Especially if they are cheaper and easier to use. SPSS is one of those applications that has gotten more frustrating with each release!

D18: “what are the cool, hip suites out there?” – I cannot answer this unqualifiedly, as it depends on exactly what you are doing, but GNU R has been consistently making the recent “top n programming languages” lists for several years now, so that is what all the cool kids are using these days.

The good news is that it is completely free software, so it will not cost you anything more than a bit of free time to download and try it out, and there are loads of extension packages as well.

I have a relative who’s a PhD research economist. He and all his colleagues live in R. Everything else is last century’s tool.

I recall SPSS as finicky challenging elder-ware when I was an undergrad in the late 70s. I can’t imagine 40 years of accumulated plastic surgery have done it many favors. The only thing worse than a perfumed pig is a perfumed elderly pig.