10 ms·
Under what circumstances does one choose an approximate solution over the exact solution especially given that both ways are of more or less the same complexity
by danbruc 12y ago
Under what circumstances does one choose an approximate solution over the exact solution especially given that both ways are of more or less the same complexity besides that you have to symbolically calculate the derivative once for the exact solution?
- yummyfajitas 12y agoExcept in Maple/Mathematica, it's generally not convenient to symbolically calculate the derivative. This method will also work if, for example, you want to compute W'(z), Gamma'(z), or other special functions. http://en.wikipedia.org/wiki/Lambert_W_function http://en.wikipedia.org/wiki/Lambert_W_function http://en.wikipedia.org/wiki/Gamma_function http://en.wikipedia.org/wiki/Gamma_function
- mattvvhat 12y agoIf you don't know the symbolic representation of a function, then you can still compute the numerical derivative. Additionally, evaluating the the function at a point is much more efficient than parsing the terms (which you might not know) symbolically.
- jwmerrill 12y agoOne nice thing about this technique is that its time complexity is essentially the same as evaluating the original function. This property is shared by dual number differentiation mentioned by iadunning above. Try symbolically differentiating deeply nested functions, and you will see that you end up with n^2 terms, where n is the depth of the nesting. E.g. Try differentiating n = 10 for (i=0; i<n; i++) x = sin(x) Then notice that evaluating this function with a complex argument is only O(n), not O(n^2).