[FrontPage] [TitleIndex] [WordIndex

Note: You are looking at a static copy of the former PineWiki site, used for class notes by James Aspnes from 2003 to 2012. Many mathematical formulas are broken, and there are likely to be other bugs as well. These will most likely not be fixed. You may be able to find more up-to-date versions of some of these notes at http://www.cs.yale.edu/homes/aspnes/#classes.

Many people do ComputerScience because they like math (or at least mathematical styles of reasoning) but fear calculus. Though it is not entirely unreasonable to fear integrals (see HowToIntegrate), no self-respecting computer scientist should fear differentiation, which can be done by memorizing a few simple rules. In the table below, u and v, by ancient convention, are functions of x, du and dv are their derivatives, f'(x) is the derivative of f(x) evaluated at x, and a is a constant.






a du


n xn-1




ex ln a [follows from ax=ex ln a]

ln x



du + dv


u dv + v du


f'(g(x)) g'(x) [the Chain Rule]

Example: d/dx x2/ln x = x2 (d/dx 1/ln x) + (1/ln x) (d/dx x2) [product rule] = x2 * -1 * (ln x)-2 * (d/dx ln x) + 2x/ln x [chain rule in first term] = -x2/ln2 x/x + 2x/ln x= -x/ln2 x + 2x/ln x. The idea is that whatever the outermost operation in an expression is, you can apply one of the rules above to move the differential inside it, until there is nothing left. Even mere computers can be programmed to do this. You can do it too.

If you want to read a lot more about this, look at http://www.karlscalculus.org/calculus.html.

CategoryAlgorithmNotes CategoryMathNotes

2014-06-17 11:58