Last year in my Applied Linear Algebra class we were assigned a homework that introduced Backward Substituation, Forward Substitution, Horner’s Method. Something really interesting happened though as a side effect of the assigned work.
For one of the problems we were given the equation:
P = @(x) (x-2)^9;
Which produces this over [1.92, 2.08]
One of the awesome things about MATLAB (or GNU Octave) is that it has a great graphing libraries and a REPL that lets you literally “play” with the problems you are working on. You can visualize it different ways, you can dig deep into different corners, there is really no limit. The net result is a very fun and educational learn-by-doing system very much in the spirit of HtDP. That said I wanted to play around with the function we were given.
Out of curiosity I multiplied out P into PEX:
PEX = @(x) ... (x^9) - (18 * x^8) + (144 * x^7) - (672 * x^6) ... + (2016 *x^5) - (4032 * x^4) + (5376 * x^3) - (4608 * x^2) ... + (2304 * x) - (512);
Now you and I know that P and PEX are equivalent. What do you think will happen we we plot P and PEX together? I figured that we would get one line on top of the other since they are literally the same equation. Why did I want to do this? I can only attribute it to providence.
After thinking about it, go to the next page.