# Fit predetermined curve to data set

I have a set of $5$ data points $(x, y)$. I need to find two constants ($a$ and $b$), so that the curve $x\cdot y^a=b$ fits my data set. The question states that I can find the constants from the fitting process. However, I'm not sure where to start. Which method do I use to do this?

Thanks for any help.

-
For some basic information about writing math at this site see e.g. here, here, here and here. –  Julian Kuelshammer Nov 2 '12 at 0:10
Unless you are very lucky, you can't find two constants which make a curve fit five data points --- all you can do is choose the constants so the curve fits the data as closely as possible. How to do this depends on your notion of what makes one curve fit better than another. This vital information is probably hidden in what you are calling "the fitting process". So, if you don't tell us what "the fitting process" is, we are groping in the dark if we try to answer your question. You ask, "which methhod do I use to do this?" I ask, "which methods have you been given?" –  Gerry Myerson Nov 2 '12 at 2:25
@GerryMyerson We are not told which method to use. I assume we are supposed to find a linear representation of this function, but all the examples of that that I can find are for when the equation is equal to y. The given equation is more complicated because y is raised to some constant. –  edc1591 Nov 3 '12 at 21:31

Applying the natural logarithm to your curve, we have $$\ln x + a \ln y = \ln b.$$ This shows a linear relationship between $\ln x$ and $\ln y$.
Take your data points $(x,y)$ and convert them to new points $(\ln x, \ln y)$ by applying the natural logarithm. Take this set of converted data points and find the line of best fit. Apply the exponential function to your line to get the curve you seek.
@edc1591 No. When you get a line of best fit, think of it as $\ln y =m \ln x + B$. Then $y = e^B x^m$. Take $m$-th roots, to get $y^{1/m} = e^{B/m} x$, so that $x y^{-1/m} = e^{-B/m}$. So for the curve form you seek, a would be -1/m and b would be -B/m. –  Matthew Conroy Nov 3 '12 at 22:23
I think you meant $b = e^{-B/m}$. Thanks so much for the help! –  edc1591 Nov 4 '12 at 18:42