Course Webpage

Exercise

Given the values

$$ \begin{array}{|c|c|c|c|c|c|} \hline t & 2 & 4 & 6 & 8 & 10\\ \hline \hline Q & 18 & 90 & 260 & 510 & 990\\ \hline \end{array} $$

fit the potential function $Q\left(t\right)=r\,t^{s},$ finding $r$ and $s$ values with least squares criterion.


We linearize the function to approximate. If we take into account that

$$ \ln(AB)=\ln(A)+\ln(B) \quad \ln(A^B)=B\ln(A) $$

then

$$ Q = r\,t^s \quad \Longrightarrow \quad \ln Q = \ln(r\,t^s) \quad \Longrightarrow $$$$\Longrightarrow \quad \ln Q = \ln r +\ln(t^s) \quad \Longrightarrow \quad \ln Q = \ln r +s\,\ln t $$

And if we call

$$ y_k = \ln Q_k, \quad x_k =\ln t_k, \quad a_0 = \ln r , \quad a_1=s $$

we have

$$ \ln Q_k \approx \ln r +s\,\ln t_k \quad \Longrightarrow \quad y_k \approx a_0 + a_1\, x_k $$

The problem is now to fit a least squares regression line

$$ P_1(x) = a_0 + a_1\, x $$

to the transformed data $(x_k,y_k),\quad k = 1,\ldots,5$ with the system

$$ \left(\begin{array}{cc} \sum_{k=1}^{5}1 & \sum_{k=1}^{5}x_{k}\\ \sum_{k=1}^{5}x_{k} & \sum_{k=1}^{5}x_{k}^{2} \end{array}\right)\left(\begin{array}{c} a_{0}\\ a_{1} \end{array}\right)=\left(\begin{array}{c} \sum_{k=1}^{5}y_{k}\\ \sum_{k=1}^{5}x_{k}y_{k} \end{array}\right) $$

We compute the elements of these matrices

$$ \begin{array}{c|c|c|c|c|c|c|} \hline & t_k & Q_k & y_{k}=\ln Q_k & x_k=\ln t_k & x_{k}^{2} & x_{k}\,y_k\\ \hline & 2 & 18 & 2.890 & 0.6931 & 0.4805 & 2.003 \\ & 4 & 90 & 4.500 & 1.386 & 1.922 & 6.238 \\ & 6 & 260 & 5.561 & 1.792 & 3.210 & 9.963 \\ & 8 & 510 & 6.234 & 2.079 & 4.324 & 12.96\\ & 10 & 990 & 6.898 & 2.303 & 5.302 & 15.88\\ \hline \sum & & & 26.08 & 8.253 & 15.24 & 47.05\\ \hline \end{array} $$

and

$$ \begin{array}{rcrcc} 5\,a_{0} & + & 8.253\,a_{1} & = & 26.08\\ 8.253\,a_{0} & + & 15.24\,a_{1} & = & 47.05 \end{array} $$

And the solution is $a_0 = 1.312 \quad a_1=2.475$.

As

$$ a_0 =\ln r, \quad a_1=s \quad \Longrightarrow r = e^{a_0}\approx 3.1, \quad s = a_1 \approx 2.5 $$

The approximate curve is

$$ Q(t)=3.1\,t^{\,2.5} $$