To illustrate, we will take the 4 equations previously stated, and line up all of the terms:
It will be noted that the name of equivalent coefficients changes in each equation.
Constant y = a Linear y = ax + b Quadratic y = ax2 + bx + c Cubic y = ax3 + bx2 + cx + d
If we were to use a generic form for the equation, then this name changing goes away:
y = anxn + an-1xn-1 + ... + a3x3 + a2x2 + a1x + a0Whilst this looks more complex, if we just concentrate on equations of the cubic order and lower, we get:
y = a3x3 + a2x2 + a1x + a0If a3 is 0, then we get a quadratic equation, and so on:
y = a2x2 + a1x + a0I think this is potentially less confusing than having the coefficient names change with each order of equation. It also provides for a cleaner and clearer mapping between the underlying mathematics and Java arrays, if we were to chose that mechanism to store the coefficients.
No comments:
Post a Comment