Forward stability

166 Views Asked by At

I am studying forward stability. My book proposes this exercise: find an algorithm to calculate $\frac{1-\cos x}{x^2}$ when $x \approx 0$ and prove its forward stability. I think one answer could be using the Taylor expansion. Are there any algorithms that are more elegant to use? I have tried to find them out but I wasn't able. Thank you in advance for the help. I expect you to give me only a pice of advice!