Showing posts with label polynomial functions. Show all posts
Showing posts with label polynomial functions. Show all posts

Monday, August 18, 2014

Pascal's triangle: fitting polynomials

Taking another look at Pascal's triangle is always worth it. One will always notice something new. There's a neat limit in Pascal's triangle. And here's a neat example of a Pascal's triangle pattern:


The first diagonal is constant.


The second diagonal is linear. If one indexes it as f (0)=1, then the function is f (x)= x+1.



The third diagonal is quadratic. It presents a good challenge to Algebra 2 students to find the quadratic that fits. (Thanks to Tara Slesar for the idea.) Again, if f (0)=1, then the quadratic is f(x)=12x2+1.5x+1.

The pattern continues. The next diagonal is given by a cubic. This represents a good problem for calculus students. They usually start by stating that f(x)=ax3+bx2+cx+1, since f (0)=1. They also know that the third derivative of f (x) will be a constant 1. Since f(3)(x)=6a=1, which means a=16. The students are usually tempted to try using the same method to find b and c, but it fails because we don't know how to index them. In other words, f(2)(x)=6ax+2b, and we know a, but we can't say for what value of x the second derivative is 1, or 2, or 3. Of course, they can solve it using known points in f (x) such as (1, 4) and (2, 10) and just making a system of equations. Another method I mentioned in this post.

Anyway, it gets even neater. The linear diagonal is f (x)=x+1. The quadratic diagonal is f(x)=12(x+1)(x+2). The cubic diagonal is f(x)=16(x+1)(x+2)(x+3). This pattern continues. Why? Well, let's stop and make the connection to combinatorics. Here is Pascal's triangle in terms of combinations.


The quadratic diagonal cuts through 2C2, 3C2, 4C2, etc. Given that a combination nCr can be calculated by taking n!r!(n-r)!, the quadratic pattern, starting at x = 0, will go 2!2!(2-2)!, 3!2!(3-2)!, 4!2!(4-2)!, ... (x+2)!2!(x+2-2)!. The general term simplifies down to (x+2)(x+1)2·1, which is what I found before.

One other neat pattern: because of the way the diagonals cut across Pascal's triangle, every polynomial function is guaranteed at one point to exactly double.

Sunday, July 6, 2014

Writing polynomial functions

Let's say you need to write a polynomial function that exactly goes through certain points. For example, let's say you need a polynomial that will go through (1, 3), (2, 8), and (4, 2). The easiest way to do this is by splitting your polynomial into three parts: f(x) = A(x) + B(x) + C(x). The trick is that A(1) = 3, B(1) = 0, and C(1) = 0; B(2) = 8, A(2) = 0, and C(2) = 0; and C(4) = 2, A(4) = 0, and B(4) = 0. Because A(1) = 3, A(2) = 0, and A(4) = 0, therefore A(x) = (x - 2)(x - 4).

Likewise, because B(2) = 8, B(1) = 0, and B(4) = 0, therefore B(x) = -4 (x - 1)(x - 4).

And finally, because C(4) = 2, C(1) = 0, and C(2) = 0, therefore

C(x)=(x-1)(x-2)3

That means our final function is

f(x)=(x-2)(x-4)-4(x-1)(x-2)+(x-1)(x-4)3

Of course, one can simplify it into a traditional quadratic, or one can just leave it in this form. Tip of the hat to Marc Rios for alerting me to this method, attributed to Lagrange.