Calculus Essentials

Chem 3240 · Appendix A.1

Davit Potoyan

Why calculus, in one slide

  • Chemistry asks two questions of any changing quantity: how fast does it change, and how much accumulates

\text{rate} = -\frac{d[\mathrm{A}]}{dt} \qquad\qquad q = \int_{T_1}^{T_2} C_p\, dT

  • Two pictures carry the whole subject: the derivative is a slope, the integral is an area
  • Two tools do most of the work: the chain rule and integration by parts
  • Later the same moves act on waves and quantum states; sharpen them now

The derivative is a slope

f'(x) = \lim_{h \to 0}\frac{f(x+h) - f(x)}{h}

  • Slope of the secant through two nearby points; merge them and it becomes the tangent
  • Rate of change: position gives velocity, concentration gives rate
  • Read backwards, a step recipe: f(x+h) \approx f(x) + f'(x)\,h

Live: shrink the spacing

secant pivots into the tangent; the step prediction f(x) + f'(x)\,h misses the curve by h^2

Derivatives predict: the Taylor series

f(x + a) = f(x) + a\,f'(x) + \frac{a^2}{2!}\,f''(x) + \frac{a^3}{3!}\,f'''(x) + \cdots = \sum_{n=0}^{\infty} \frac{a^n}{n!}\,\frac{d^n f}{dx^n}

  • Two terms: the step recipe; the a^2 term corrects for the bending
  • Know by heart: e^x \approx 1 + x, \sin\theta \approx \theta, \cos\theta \approx 1 - \tfrac12\theta^2
  • Keep the x^2 term of a potential near its minimum: a real bond becomes a harmonic oscillator

Reading the first derivative

  • f' > 0: rising. f' < 0: falling. The size of f' is the steepness
  • f' = 0: horizontal tangent, a stationary point: maximum, minimum, or shelf
  • Finding where f' = 0 locates the most probable position, the equilibrium bond length, the lowest energy

The second derivative is bending

  • f'' is the derivative of the slope: how fast the slope is changing
  • f'' > 0: bends up like a bowl, so a stationary point is a minimum
  • f'' < 0: bends down like a dome, so a stationary point is a maximum
  • f'' = 0 with a sign change: inflection, the bending switches

Worked: the Gaussian, read by its derivatives

  • f' = -2x\,e^{-x^2} vanishes only at x = 0, where f'' = -2 < 0: the peak is a maximum
  • f'' = (4x^2 - 2)\,e^{-x^2} = 0 at x = \pm 1/\sqrt{2}: the inflection points
  • Remember them: when this curve returns as a vibrational state they are the classical turning points

In time: velocity and acceleration

  • x' is velocity, x'' is acceleration; Newton’s F = m\,x'' makes physics live in the bending
  • x = \cos t gives x'' = -x: the higher it climbs, the harder it bends back. That is the harmonic oscillator
  • Same in space: \dfrac{d^2}{dx^2}\sin kx = -k^2 \sin kx, which is why sines solve the wave equation. In quantum mechanics the curvature of \psi is its kinetic energy: wigglier means faster

Rules of differentiation

  • Constant multiple: (c f)' = c f'
  • Sum: (f \pm g)' = f' \pm g'
  • Power: \dfrac{d}{dx} x^n = n x^{n-1}
  • Product: (fg)' = f'g + fg'
  • Quotient: \left(\dfrac{f}{g}\right)' = \dfrac{f'g - fg'}{g^2}

\frac{d}{dx} f(g(x)) = \frac{df}{dg}\cdot\frac{dg}{dx}

  • The chain rule: nearly every function in this course is a composition, e^{-\alpha x^2}, \sin(kx), e^{ikx}
  • Outer derivative times inner derivative

Worked: a product with a composition inside

Differentiate f(x) = x^2\, e^{-\alpha x^2} (product rule, chain rule inside the exponential):

\frac{df}{dx} = (x^2)'\, e^{-\alpha x^2} + x^2\, \big(e^{-\alpha x^2}\big)' = 2x\, e^{-\alpha x^2} + x^2\,(-2\alpha x)\, e^{-\alpha x^2} = 2x\,(1 - \alpha x^2)\, e^{-\alpha x^2}

  • Product rule for the two factors, chain rule for (e^{-\alpha x^2})' = -2\alpha x\, e^{-\alpha x^2}
  • f' = 0 at x = 0 and x = \pm 1/\sqrt{\alpha}: a minimum flanked by two maxima
  • Same moves for the Gaussian e^{-ax^2}: f' = -2ax\,e^{-ax^2}, f'' = (4a^2x^2 - 2a)\,e^{-ax^2}, inflection points at x = \pm 1/\sqrt{2a}

Derivatives you should know by heart

f(x) f'(x) f(x) f'(x)
x^n n x^{n-1} e^{ax} a\,e^{ax}
\sin x \cos x \cos x -\sin x
\ln x 1/x \tan x \sec^2 x
e^{ikx} ik\,e^{ikx} e^{-\alpha x^2} -2\alpha x\, e^{-\alpha x^2}
  • The last row is the course in miniature: plane waves and Gaussians
  • Behind the table: \lim_{\theta\to0} \sin\theta/\theta = 1 and \lim_{h\to0}(e^h - 1)/h = 1, which is why e^x is its own derivative

Several variables: hold the rest fixed

\frac{\partial f}{\partial x} = \lim_{h \to 0}\frac{f(x+h,\,y) - f(x,\,y)}{h}

  • A surface has no single slope: slice it along one variable, freeze the others
  • Compute with the ordinary rules; the frozen variables ride along like constants
  • Shorthands f_x, f_{xx}, f_{xy}, and \left(\partial P/\partial V\right)_T in thermodynamics
  • Mixed partials commute: f_{xy} = f_{yx}

The chain rule on a sliding shape

u(x,t) = f(x - vt): the profile f moving right at speed v. Chain rule with s = x - vt:

\frac{\partial u}{\partial x} = f'(s), \qquad \frac{\partial u}{\partial t} = -v\,f'(s), \qquad \frac{\partial^2 u}{\partial x^2} = f''(s), \qquad \frac{\partial^2 u}{\partial t^2} = v^2 f''(s)

  • Each t derivative brings down one factor of -v
  • Eliminate f'': a relation holds for every sliding shape, whatever f is

\frac{\partial^2 u}{\partial x^2} = \frac{1}{v^2}\,\frac{\partial^2 u}{\partial t^2}

  • This is the classical wave equation, straight out of calculus. Chapter 2 gives it physics

The integral is an area

\int_a^b f(x)\,dx = \lim_{n\to\infty}\sum_{i=1}^{n} f(x_i)\,\Delta x, \qquad \Delta x = \frac{b-a}{n}

The fundamental theorem

\int_a^b f(x)\,dx = F(b) - F(a), \qquad F'(x) = f(x)

  • Differentiation and integration are inverse operations
  • An infinite sum becomes a single subtraction: find an antiderivative and you are done
f(x) F(x) f(x) F(x)
x^n \dfrac{x^{n+1}}{n+1} e^{ax} \dfrac{1}{a}e^{ax}
\sin x -\cos x \cos x \sin x

Two techniques cover almost everything

Substitution, the chain rule run backwards: \int f(g(x))\,g'(x)\,dx = \int f(u)\,du

\int u\,dv = uv - \int v\,du

  • Integration by parts is the product rule run backwards: \int x\,e^{-x}dx, \int x \sin x\,dx, every expectation value
  • For sines and cosines: \sin^2 x = \tfrac12(1 - \cos 2x), \cos^2 x = \tfrac12(1 + \cos 2x)

Symmetry kills integrals on sight

  • Even f(-x) = f(x): \displaystyle\int_{-a}^{a} f\,dx = 2\int_0^a f\,dx
  • Odd f(-x) = -f(x): \displaystyle\int_{-a}^{a} f\,dx = 0
  • Check the symmetry before you integrate: \langle x \rangle = 0 for every symmetric state

The two integrals you will use all semester

\int_0^L \sin^2\!\left(\frac{n\pi x}{L}\right) dx = \frac{L}{2}

  • Power reduction, the cosine integrates to zero over whole half-periods. This is the \sqrt{2/L} in front of every particle in a box state

\int_0^\infty x^n e^{-x}\, dx = n!

  • Integrate by parts n times, or recognize the Gamma function. The workhorse of hydrogen atom radial integrals

Takeaway

A derivative is a slope and a step recipe, an integral is an area, and the fundamental theorem makes them inverses. A partial derivative is the same slope with the other variables frozen. The chain rule and integration by parts do most of the work; check the symmetry of the integrand before doing either.