The Sciences

Unsolicited Advice VIII: Make your integrals dimensionless

Cosmic VarianceBy Julianne DalcantonDec 17, 2008 6:53 PM

Newsletter

Sign up for our email newsletter for the latest science news
 

Having recently slogged through grading an enormous pile of graduate-level problem sets, I am compelled to share one of the most useful tricks I learned in graduate school. Make your integrals dimensionless. This probably seems silly to the theoretical physicists in the audience, who have a habit of changing variables and units to the point where everything is dimensionless and equals one. However, in astrophysics, you frequently are integrating over real physical quantities (numbers of photons, masses of stars, luminosities of galaxies, etc) that still have units attached. While students typically do an admirable job of setting up the necessary integrals, they frequently go off the rails when actually evaluating the integrals, as they valiantly try to propagate all those extra factors. Here's an example of what I mean. Suppose you want to calculate some sort of rate constant for photoionization, that when multiplied by the density of atoms, will give you the rate of photo-ionizations per volume. These sorts of rates are always density times velocity times cross section:

$latex displaystyle int_0^infty left({rm photon: density}right) , left({rm velocity}right) , left({rm cross: section} right)$

For a Planck spectrum of photons and a typical energy-dependent cross section above some threshold $latex displaystyle int_{nu_0}^infty left(frac{u_nu}{hnu}right) , cdot ,c , cdot , sigma_0,left(frac{nu}{nu_0}right)^{-3} , {rm d}nu $ which becomes $latex displaystyle int_{nu_0}^infty frac{8pi,hnu^3}{c^3} , frac{1}{e^{hnu/kT}-1} , cdot , c , cdot , sigma_0,left(frac{nu}{nu_0}right)^{-3} , frac{{rm d}nu}{hnu}$ This integral looks like a rough customer. You can pull some factors out front, but you're still left with that unpleasant business in the exponential. You're also using an integrating variable that has units, making it a bit tougher to check the dimensions of your answer to make sure it's sensible. Instead, if you force the variable you're integrating over to be dimensionless: $latex displaystyle x=frac{hnu}{kT} $ the integral reduces to something that you can start to wrap your brain around: $latex displaystyle frac{8pi}{c^2} , frac{(x_0,kT)^3}{h^3} , sigma_0 int_{x_0}^infty , frac{1}{e^x-1} , frac{{rm d}x}{x} $ Now you have the business end of the integral out front, where you can check the units and the scaling of the answer to see if it makes sense. The integral is also something that is far simpler to evaluate (although in this case, it's actually not a trivial integration, but at least you can recognize that early and plan on how to deal with it). If you're in a situation where you have to integrate by parts, the dimensionless integral will save you a world of pain. Even if you make a mistake in evaluating the integral, you're usually only off by a simple multiplicative factor like pi, or 2. All these things are good.

1 free article left
Want More? Get unlimited access for as low as $1.99/month

Already a subscriber?

Register or Log In

1 free articleSubscribe
Discover Magazine Logo
Want more?

Keep reading for as low as $1.99!

Subscribe

Already a subscriber?

Register or Log In

More From Discover
Recommendations From Our Store
Shop Now
Stay Curious
Join
Our List

Sign up for our weekly science updates.

 
Subscribe
To The Magazine

Save up to 70% off the cover price when you subscribe to Discover magazine.

Copyright © 2022 Kalmbach Media Co.