title: Minimizing a function of vectors
body: <p>I need to minimize the following sum:</p>
  
  <p>minimize sum for all <code>i{(i = 1 to n) fi(v(i), v(i - 1), tangent(i))}</code></p>
  
  <p><code>v</code> and <code>tangent</code> are vectors. 
  <code>fi</code> takes the 3 vectors as arguments and returns a cost associated with these 3 vectors. For this function, <code>v(i - 1)</code> is the vector chosen in the previous iteration.<br> <code>tangent(i)</code> is also known. <code>fi</code> calculates the cost of choosing a vector <code>v(i)</code>, given the other two vectors <code>v(i - 1)</code> and <code>tangent(i)</code>. The <code>v(0)</code> and <code>v(n)</code> vectors are known. <code>tangent(i)</code> values are also known in advance for all<br><code>i = 0 to n</code>.<br>
  My task is to determine all such <code>v(i)</code>s such that the total cost of the function values for <code>i = 1 to n</code> is minimized.<br>
  Can you please give me any ideas to solve this?<br>
  So far I can think of Branch and Bound or dynamic programming methods.</p>
  
  <p>Thanks!</p>