# Cubic function

• Aug 30th 2009, 05:01 PM
s3a
Cubic function
I have never studied the cubic function before so it would be great if someone could explain it to me so that I can answer #25.

• Aug 30th 2009, 06:34 PM
skeeter
Quote:

Originally Posted by s3a
I have never studied the cubic function before so it would be great if someone could explain it to me so that I can answer #25.

you need to enter the data into your calculator and run a cubic regression. I set the year 1900 as 0. graph and equation screenshots follow ...
• Aug 30th 2009, 06:58 PM
DeMath
Quote:

Originally Posted by s3a
I have never studied the cubic function before so it would be great if someone could explain it to me so that I can answer #25.

MS Excel shown

So we have a equation of population $\displaystyle y = f\left( {x} \right) = 1.293{x^3} + 31.27{x^2} + 4.149x + 1688$

then in 1925 year the population is $\displaystyle {y_{1925}} = f\left( {2.5} \right) = 1.293 \cdot {2.5^3} + 31.27 \cdot {2.5^2} + 4.149 \cdot 2.5 + 1688 \approx 1914$
• Aug 30th 2009, 07:08 PM
Random Variable
let $\displaystyle P(x) = Ax^{3}+Bx^{2}+Cx + D$ where $\displaystyle P(x)$ is the population in year $\displaystyle x$

then $\displaystyle 1650 = 1900^{3}A+ 1900^{2}B + 1900C + D$

$\displaystyle 1750 = 1910^{3}A+1910^{2}B+1910C + D$

and so on

What you have is an overdetermined linear system that can be "solved" for the coefficients A, B, C, and D by the method of least squares (which can be done by a program like Maple or Mathematica).
• Aug 30th 2009, 07:48 PM
DeMath
Quote:

Originally Posted by Random Variable
let $\displaystyle P(x) = Ax^{3}+Bx^{2}+Cx + D$ where $\displaystyle P(x)$ is the population in year $\displaystyle x$

then $\displaystyle 1650 = 1900^{3}A+ 1900^{2}B + 1900C + D$

$\displaystyle 1750 = 1910^{3}A+1910^{2}B+1910C + D$

and so on

What you have is an overdetermined linear system that can be "solved" for the coefficients A, B, C, and D by the method of least squares (which can be done by a program like Maple or Mathematica).

Maybe this??

$\displaystyle {{\hat y}_t} = a{x^3} + b{x^2} + cx + d$

$\displaystyle S = f\left( {a,b,c,d} \right) = \sum\limits_{i = 1}^n {{{\left( {{y_i} - {{\hat y}_t}} \right)}^2}} = \sum\limits_{i = 1}^n {{{\left[ {{y_i} - \left( {ax_i^3 + bx_i^2 + c{x_i} + d} \right)} \right]}^2}} \to \min$

Then we have to solve the standard system of linear equations

$\displaystyle \frac{{\partial S}} {{\partial a}} = a\sum\limits_{i = 1}^n {x_i^6} + b\sum\limits_{i = 1}^n {x_i^5} + c\sum\limits_{i = 1}^n {x_i^4} + d\sum\limits_{i = 1}^n {x_i^3} - \sum\limits_{i = 1}^n {x_i^3{y_i}} = 0,$

$\displaystyle \frac{{\partial S}} {{\partial b}} = a\sum\limits_{i = 1}^n {x_i^5} + b\sum\limits_{i = 1}^n {x_i^4} + c\sum\limits_{i = 1}^n {x_i^3} + d\sum\limits_{i = 1}^n {x_i^2} - \sum\limits_{i = 1}^n {x_i^2{y_i}} = 0,$

$\displaystyle \frac{{\partial S}} {{\partial c}} = a\sum\limits_{i = 1}^n {x_i^4} + b\sum\limits_{i = 1}^n {x_i^3} + c\sum\limits_{i = 1}^n {x_i^2} + d\sum\limits_{i = 1}^n {{x_i}} - \sum\limits_{i = 1}^n {{x_i}{y_i}} = 0,$

$\displaystyle \frac{{\partial S}} {{\partial d}} = a\sum\limits_{i = 1}^n {x_i^3} + b\sum\limits_{i = 1}^n {x_i^2} + c\sum\limits_{i = 1}^n {{x_i}} + nd - \sum\limits_{i = 1}^n {{y_i}} = 0.$
• Aug 30th 2009, 07:58 PM
Random Variable
I would set up the system in matrix form and use the normal equation.

$\displaystyle A^{T}Ax = A^{T}b$

But it would probably be best to first factorize matrix A using QR decomposition.