4 ms·
I think this is because automatic differentiation is a manifestation of just one rule of differentiation: the chain rule. With numerical differentiation, you on
by reikonomusha 3y ago
I think this is because automatic differentiation is a manifestation of just one rule of differentiation: the chain rule. With numerical differentiation, you only need to be able to evaluate the function at hand. With automatic differentiation, you need to "seed" your program with the differentials of all existing functions.
What's nice about a discussion of symbolic differentiation is that we can prove a few rules rigorously, and then use those rules to purely mechanically differentiate algebraic expressions we encountered up to trigonometry.
You're right though, in practice, for complex functions expressed as programs, automatic differentiation is superior.
- analog31 3y agoWhile in college, I wrote a program that did this. I thought I needed precise derivatives for a curve fitting program, so I wrote one that evaluated an expression and all of its derivatives, all at once. This was typical noobie chutzpah. First, I converted an infix expression into its postfix form using a textbook algorithm. Then I applied all of the differentiation rules to the postfix expression, including L'Hospital's rule. Was it correct? All I know is that I couldn't kill it.