title: Simplify algorithm with Horner Scheme
body: <p>I have a problem to solve the following excercise:</p>
  
  <p>*Be given the special polynomial: <a href="https://i.stack.imgur.com/4DhVi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4DhVi.png" alt="enter image description here"></a>
  and the input: coefficients a[n], a[n-1], ..., a[0], argument x</p>
  
  <p>Create an algorithm in C# or Pseudocode which will use Horner's method to solve the special polynomial for x.*</p>
  
  <p>I created an algorithm to solve default polynomial functions with Horner's method, but it doesn't work for the special function, because the exponents are squared. I don't know how to modify the algorithm to respect the squared exponents, because as far as I know, Horner's method doesn't use exponents.
  This is my code:</p>
  
  <pre><code>        int[] a = new int[] { 0, 3, 2, 1};//a[0] - a[n]
          int n = 3;
          int x = 2;
  
          double r = a[n];
          for (int i = n - 1; i &gt;= 0; i--)
          {
              r = r * x + a[i];
          }
          Console.WriteLine(r);
  </code></pre>
  
  <p>I'm thankful for any help!</p>