title: Making a function according to a formula (Python)
body: <p>I am having trouble with the question you see on the included image. With the very little knowledge I have in Python I am struggling to even find out where to begin with this problem. In particular, how do I make the function according to that formula? The user must be able to enter values for x_i and x_(i-1). All answers will be much appreciated. I don't expect full answer, just some idea of how I can begin this...</p>
  
  <p><img src="https://i.stack.imgur.com/TpMvo.png" alt="Here is the question"></p>