Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Tyler's answer is the right answer if you have to compute this change of variable z = ax+b many times (I mean for many different polynomials). On the other hand, if you have to do it just once, it is much faster to combine the computation of the coefficients of the matrix with the final evaluation. The best way to do it is to symbolically evaluate your polynomial at point (ax+b) by Hörner's method:</p> <ul> <li>you store the polynomial coefficients in a vector V (at the beginning, all coefficients are zero), and for i = n to 0, you multiply it by (ax+b) and add C<sub>i</sub>.</li> <li>adding C<sub>i</sub> means adding it to the constant term</li> <li>multiplying by (ax+b) means multiplying all coefficients by b into a vector K<sub>1</sub>, multiplying all coefficients by a and shifting them away from the constant term into a vector K<sub>2</sub>, and putting K<sub>1</sub>+K<sub>2</sub> back into V.</li> </ul> <p>This will be easier to program, and faster to compute. </p> <p>Note that changing y into w = cy+d is really easy. Finally, as mattiast points out, a general change of coordinates will not give you a polynomial.</p> <p><strong>Technical note</strong>: if you still want to compute matrix T (as defined by Tyler), you should compute it by using a weighted version of Pascal's rule (this is what the Hörner computation does implicitely):</p> <p>t<sub>i,j</sub> = b t<sub>i,j-1</sub> + a t<sub>i-1,j-1</sub></p> <p>This way, you compute it simply, column after column, from left to right.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload