Friday, February 2, 2018

Gauss and the Method of Least Squares

Intermediate Physics for Medicine and Biology: Gauss and the Method of Least Squares
Asimov's Biographical Encyclopedia of Science and Technology, by Isaac Asimov, superimposed on Intermediate Physics for Medicine and Biology.
Asimov’s Biographical Encyclopedia
of Science and Technology,
by Isaac Asimov.
In Chapter 11 of Intermediate Physics for Medicine and Biology, Russ Hobbie and I discuss fitting data using the method of least squares. This technique was invented by mathematicians Adrien Marie Legendre and Johann Karl Friedrich Gauss. Isaac Asimov describes Gauss’s contributions in Asimov’s Biographical Encyclopedia of Science and Technology.
While still in his teens he [Gauss] made a number of remarkable discoveries, including the method of least squares, advancing the work of Legendre in this area. By this [technique] the best equation for a curve fitting a group of observations can be made. Personal error is minimized. It was work such as this that enabled Gauss, while still in his early twenties, to calculate the orbit for [the asteroid] Ceres.
Of Time and Space and Other Things, by Isaac Asimov, superimposed on Intermediate Physics for Medicine and Biology.
Of Time and Space and Other Things,
by Isaac Asimov.
Asimov tells the story of Ceres in more detail in Of Time and Space and Other Things
Giuseppe Piazzi, an Italian astronomer … discovered, on the night of January 1, 1801, a point of light which had shifted its position against the background of stars. He followed it for a period of time and found it was continuing to move steadily. It moved less rapidly than Mars and more rapidly than Jupiter, so it was very likely a planet in an intermediate orbit …

Piazzi didn't have enough observations to calculate an orbit and this was bad. It would take months for the slow-moving planet to get to the other side of the Sun and into observable position, and without a calculated orbit it might easily take years to rediscover it.

Fortunately, a young German mathematician, Karl Friedrich Gauss, was just blazing his way upward into the mathematical firmament. He had worked out something called the “method of least squares,” which made it possible to calculate a reasonably good orbit from no more than three good observations of a planetary position.

Gauss calculated the orbit of Piazzi's new planet, and when it was in observable range once more there was [Heinrich] Olbers [a German astronomer] and his telescope watching the place where Gauss's calculations said it would be. Gauss was right and, on January 1, 1802, Olbers found it.
What is the role for least-squares fitting in medicine and biology? In many cases you want to fit experimental data to a mathematical model, in order to determine some unknown parameters. One example is the linear-quadratic model of radiation damage, presented in Chapter 16 of IPMB. Below is a new homework problem, designed to provide practice using the method of least squares to analyze data on cell survival during radiation exposure.
Section 16.9

Problem 29 ½. The fraction of cell survival, Psurvival, as a function of radiation dose, D (in Gy), is
D Psurvival
  0   1.000
  2   0.660
  4   0.306
  6   0.100
  8   0.0229
10   0.0037
Fit this data to the linear-quadratic model, Psurvival = eD – βD2 (Eq. 16.29) and determine the best-fit values of α and β. Plot Psurvival versus D on semilog graph paper, indicating the data points and a curve corresponding to the model. Hint: use the least-squares method outlined in Sec. 11.1, and make this into a linear least squares problem by taking the natural logarithm of Psurvival.
Gauss is mentioned often in IPMB. Section 6.3 discusses Gauss’s law relating the electric field to charge, and Appendix I discusses the Gaussian probability distribution (the normal, or bell-shaped curve). Asimov writes
Gauss…was an infant prodigy in mathematics who remained a prodigy all his life. He was capable of great feats of memory and of mental calculation…. Some people consider him to have been one of the three great mathematicians of all time, the others being Achimedes and Newton.

Friday, January 26, 2018

The Viscous Torque on a Rotating Sphere

Intermediate Physics for Medicine and Biology: The Viscous Torque on a Rotating Sphere In Section 9.10 of Intermediate Physics for Medicine and Biology, Russ Hobbie and I write
We saw in Chap. 4 (Stokes' law) that the translational viscous drag on a spherical particle is 6πηav. Similarly, the viscous torque on a rotating sphere is 8πηa3(dθ/dt).
Let’s calculate this torque. We always learn something when we see where such a result comes from.

To begin, we will redo Homework Problem 46 from Chapter 1 that asks you to calculate the translational Stokes’ law by considering a stationary sphere in a moving viscous fluid (equivalent to a sphere moving through a stationary viscous fluid). Below is the analogous problem for a sphere rotating in the same fluid.
Problem 46 ½. Consider a sphere of radius a rotating with angular velocity ω in a fluid of viscosity η. For low Reynolds number flow, the fluid velocity and pressure surrounding the sphere are

          vφ = ω a3 sinθ/r2

          vr = vθ = p = 0.

(a) Show that the no-slip boundary condition is satisfied.
(b) Integrate the shear torque over the sphere surface and find an expression for the net viscous torque on the sphere.
When I first tried to solve part (b), I kept getting an answer that was off by a factor of 2/3. I checked my work several times, but I couldn’t find any mistake. After much fussing, I finally figured out my error. For the shear stress at the sphere surface, I was using η dvφ/dr. This seemed right at first, but it’s not. The shear stress is actually η (dvφ/drvφ/r). Why? I could just say that I looked up the expression for the shear strain ε for spherical coordinates and found it had two terms. But that’s no fair (and no fun). We have to understand what we are doing, not just look things up. Why does the expression for the shear stress have two terms?

Let’s start on page 16 of IPMB, where Russ and I note that the shear stress is the viscosity times the rate of change of the shear strain. We need to see how the shear strain changes with time. There are two cases.
1. The first case will give us the familiar dv/dr expression for the shear stress. Consider an element of fluid with thickness dr, as shown below.
The velocity is in the φ direction, and depends on r. In time T, the top surface of the box moves to the right a distance vφ(r+dr) T, while the bottom surface moves only vφ(r) T, forming the dashed box in the figure. The shear strain is the angle θ (see Problem 14 in Chapter 1). Consider the shaded triangle having height dr and angle θ. The length of the bottom side of the triangle is vφ(r+dr) Tvφ(r) T. The tangent of θ is therefore

          tanθ = (vφ(r+dr) Tvφ(r) T) / dr .

In the limit as dr goes to zero, and for small angles such that tanθ is approximately θ, the shear strain becomes dvφ/dr T. Therefore, the rate of change of the shear strain is dvφ/dr, and the contribution to the shear stress is η dvφ/dr.
This is where I got stuck, until I realized there is a second case we must consider.
2. Even if vφ does not change with r, we can still get a shear strain because of the curvilinear coordinates. Consider the arc-shaped element of fluid shown below.
Suppose the fluid moves with the same speed, vφ, on both the top and bottom surfaces. After time T, the fluid element moves to the right and forms the dashed element. The problem is, this dashed shape is no longer an arc aligned with the curvilinear coordinates. It has been sheared! Consider the shaded triangle with angle θ. The top side has a length (r+dr) θvφ T, and the right side has length dr. The ratio of these two sides is tanθ, or for small angles just θ. So

          θ = [(r+dr) θvφ T]/dr

Solving for θ gives

          θ = (vφ/r) T,

so the shear stress is η vφ/r.

Notice that in the first case the top side is sheared to the right, whereas in the second case it is sheared to the left. We need a minus sign in case two.
In general, both of these effects act together, so the shear stress is η (dvφ/drvφ/r).

For a velocity that falls as 1/r2, the dvφ/dr term gives -2/r3, while the -vφ/r term gives -1/r3, with a sum of -3/r3. I was getting a factor of two when I was supposed to get a factor of three. 

Are you still not convinced about the second term in the stress? Look at it this way. Suppose the velocity were proportional to r. This would imply that the fluid was rotating as if it were a solid body (all the fluid would have the same angular velocity). Such a pure rotation should not result in shear. If we only include the dvφ/dr term, we would still predict a shear stress. But if we include both terms they cancel, implying no stress.

Let me outline how you do the integral in part (b) of the homework problem above. The torque is the force times distance. The distance from the axis of rotation to the surface where the shear acts (the moment arm) is a sinθ. The force is the shear stress times the area, and the area element is a2 sinθ dθ dφ. You end up getting three factors of sinθ: one from the moment arm, one from the shear stress, and one from the area element, so you have to integrate sin3θ.

If you want, you can add a third part to Homework Problem 35 in Chapter 1:
(c) Show that the velocity distribution in Problem 46 ½ is incompressible by verifying that the divergence of the velocity is zero.
Appendix L will help you calculate the divergence in spherical coordinates.

Finally, how did I get the velocity distribution vφ = ω a3 sinθ/r2 that appeared in the homework problem? When the pressure is zero, the velocity during low Reynolds number flow, known as Stokes flow, obeys ∇2v = 0. This is a complicated equation to solve, because v is a vector. In Cartesian coordinates, the Laplacian of a vector is just the Laplacian of its components. In curvilinear coordinates, however, the r, θ, and φ components of the vector mix together in a complicated mess. I will let you try to sort that all out. Don’t say I didn't warn you.

Friday, January 19, 2018

Is Magnetic Resonance Imaging Safe?

Intermediate Physics for Medicine and Biology: Is Magnetic Resonance Imaging Safe? In Chapter 18 of Intermediate Physics for Medicine and Biology, Russ Hobbie and I discuss safety issues in magnetic resonance imaging.
Safety issues in MRI include forces on magnetic objects in and around the patient such as aneurysm clips, hairpins, pacemakers, wheel chairs, and gas cylinders (Kanal et al. 2007), absorbed radio-frequency energy (Problem 21), and induced currents from rapidly-changing magnetic field gradients. The rapid changes of magnetic field can stimulate nerves and muscles, cause heating in electrical leads and certain tattoos, and possibly induce ventricular fibrillation. Induced fields are reviewed by Schaefer et al. (2000). Cardiac pacemakers are being designed to be immune to the strong—and rapidly varying—magnetic and rf fields (Santiniet al. 2013).
Recently, two more safety issues have emerged. The first is the possibility of genetic damage caused by MRI. This question is examined in the article “Will an MRI Examination Damage Your Genes?” by Kenneth Foster, John Moulder, and Thomas Budinger (Radiation Research, Volume 187, Pages 1-6, 2017). Foster and Moulder are cited extensively in Chapter 9 of IPMB, when we discuss the risks of low-frequency electric and magnetic fields. They are two of my heroes in the fight against pseudoscience. Budinger has studied MRI safety for years. They write
We conclude that while a few studies raise the possibility that MRI exams can damage a patient’s DNA, they are not sufficient to establish such effects, let alone any health risk to patients. Based on the failure of decades of research on biological effects of static and RF fields to establish genotoxic effects of such fields at levels comparable to those used in clinical MRI, we consider that genotoxic effects of MRI are highly unlikely. The likely increase in risk, if it were present at all, from a one-off MRI exam would surely be very small and possibly nil, but could not be proven to be zero.
In my opinion, the phrase “highly unlikely” is generous.

A second, more serious, safety issue is risks associated with the MRI contrast agent gadolinium. In IPMB, Russ and I explain
Differences in relaxation time are easily detected in an [MRI] image. Different tissues have different relaxation times. A contrast agent containing gadolinium (Gd3+), which is strongly paramagnetic, is often used in magnetic resonance imaging. It is combined with many of the same pharmaceuticals used with 99mTc [an isotope used extensively in nuclear medicine], and it reduces the relaxation time of nearby nuclei. Gadolinium has been used to assess ischemic myocardium.
MRI using gadolinium was recently discussed in a point/counterpoint article (“The Use of Gadolinium-Based Contrast Agents Should be Discontinued Until Proven Safe,” Medical Physics, Volume 44, Pages 3371–3374, 2017). Moderator Colin Orton writes
Gadolinium-based contrast agents (GBCAs) are widely used in MRI to increase the visibility of tissues. Some believe, however, that due to their documented toxicity, clinical use of these agents should be discontinued until proven safe. This is the premise debated in this month’s Point/Counterpoint. Arguing for the Proposition is Stacy Matthews Branch, Ph.D. Dr. Branch is a biomedical consultant, medical writer, and veterinary medical doctor…. Arguing against the Proposition is Michael F. Tweedle, Ph.D. Dr. Tweedle is the Stefanie Spielman Professor of Cancer Imaging and Professor of Radiology at The Ohio State University.
I am a big fan of point/counterpoint articles, and we discuss one every Friday in my Medical Physics class. This debate has more substance than the genetic damage controversy, but I tend to agree with Tweedle when he concludes
But is dissociated Gd a risk factor beyond NSF [Nephrogenic Systemic Fibrosis, a disease shown to be associated with some Gadolinium-based contrast agents]? At what level and for what? Research to better understand the risks of GBCAs should certainly continue. But discontinuation of all GBCAs would result in complete loss of their benefit, probably in loss of human life due to inaccurate or imprecise diagnosis, while we search for an hypothesized chronic toxicity of unknown seriousness that we, at this point, have no reason in evidence to anticipate. The reasonable response to the new findings is further research into chronic tolerance and more discriminating use of the available GBCAs.
A recent article featured in medicalphysicsweb highlighted new MRI contrast agents based on manganese instead of gadolinium, that may be safer.
Manganese-based contrast could allow safer MRI. A team at Massachusetts General Hospital has developed a potential alternative to gadolinium-based MRI contrast agents, which carry significant health risks for some patients and cannot be used in patients with poor renal function. In tests on baboons, the researchers demonstrated that the manganese-based agent Mn-PyC3A produced equivalent contrast enhancement of blood vessels to that of a gadolinium-based agent (Radiology doi:10.1148/radiol.2017170977).
A discussion of significant MRI safety issues can be found here.

So is magnetic resonance imaging safe? For the vast majority of MRIs that do not use any contrast agent, I would say overwhelmingly yes. When gadolinium is used, there is a small risk that in most cases will be far less significant than the benefit of obtaining the image.

Friday, January 12, 2018

#MieToo

Intermediate Physics for Medicine and Biology: #MieToo Many readers of Intermediate Physics for Medicine and Biology are undergraduate students who may be looking for their first research experience. Now is the time to be applying for summer undergraduate research opportunities; often they have application deadlines in early February. I’ve collected a list of many biomedical research programs on the Oakland University Center for Biomedical Research website. Another place to learn about research programs is Pathways to Science. The National Science Foundation funds a large number of Research Experiences for Undergraduates; find one here. If you are on Twitter, search for tweets with the hashtag #undergraduateresearch.

Be sure to apply to the Summer Internship Program at the National Institutes of Health #NIH. I worked at the NIH intramural program in Bethesda, Maryland during the 1990s, and can think of no better place to do a summer internship. They have a special program aimed at biomedical engineers #Bioengineering, which might be of particular interest to readers of IPMB. The deadline for the general program is March 1, but for the biomedical engineering program it is February 9. Sorry international students, but students eligible for the NIH program must be US citizens or permanent residents.

I had my own career-defining undergraduate research experience at the University of Kansas #KansasU. I worked with physics professor Wes Unruh and his graduate student Robert Bunch studying the scattering of light. We analyzed our data using a theory of light scattering developed by German physicist Gustav Mie (#MieToo...that's supposed to be a joke). My first publication was a 1983 abstract to the March Meeting of the American Physical Society titled “Size distributions of Ni and Co colloids within MgO”. Although in graduate school I switched from condensed matter physics to biological physics, this first exposure to scientific research set me on the path that led ultimately to coauthoring Intermediate Physics for Medicine and Biology.

Most applications for summer research programs require an essay, college transcripts, and letters of recommendation. Gathering all this stuff takes time. So, if you plan to apply for summer research programs, get to work now, now, now!

Friday, January 5, 2018

From Photon to Neuron: Light, Imaging, Vision

Intermediate Physics for Medicine and Biology: From Photon to Neuron: Light, Imaging, Vision
From Photon to Neuron, by Philip Nelson.
From Photon to Neuron,
by Philip Nelson.
The January issue of Physics Today, the magazine of the American Institute of Physics, contains my review of Philip Nelson’s new book From Photon to Neuron: Light, Imaging, Vision. The published review is the result of several iterations with the Physics Today book review editor, which improved it. Below, is my first draft. I think that readers of Intermediate Physics for Medicine and Biology will enjoy Nelson’s books.
From Photon to Neuron: Light, Imaging, Vision
Philip Nelson
Princeton University Press, 2017

Philip Nelson’s book From Photon to Neuron: Light, Imaging, Vision (Princeton University Press, 2017) completes a trilogy begun by Biological Physics (Freeman, 2014) and Physical Models of Living Systems (Freeman, 2015). These works establish Nelson as the preeminent textbook author at the intersection of physics and biology. All three books aim at upper-level undergraduates who already have studied a year of physics and calculus, but the texts are rich enough for the graduate level too.

Is From Photon to Neuron aimed at physicists interested in biology, or biologists interested in physics? Physics students will gain the most from this book. The mathematics (for example, the Fresnel integral) is beyond what most premed students are comfortable with. Biology majors will be challenged, but they need a book like this to improve their quantitative skills. Students with a weak command of calculus and no desire to improve it may find Sonke Johnsen’s excellent The Optics of Life (Princeton University Press, 2011) more palatable. A third-year physics major should be able to handle the math, except for some advanced topics in Part III that seemed out of place in an undergraduate book.

The wave and particle properties of light are both crucial for biology. For instance, diffraction limits your visual acuity, but a rod cell in your retina responds to a single photon. Nelson adopts a light hypothesis like that Richard Feynman presented in QED: The Strange Theory of Light and Matter (Princeton University Press, 1985): photons are governed by a probability amplitude that obeys a stationary-phase principle. Physics students will appreciate this powerful point of view; I am not sure what biology students will make of it. This approach highlights the intimate relationship between quantum mechanics, probability, and vision. For me, it works. Its disadvantage is that you must add a lot of es to explain simple concepts like reflection and refraction.

Readers who are interested primarily about vision, with little concern for light or imaging, might prefer Robert Rodieck’s masterpiece The First Steps in Seeing (Sinauer, 1998). The books by Rodieck and Nelson share several characteristics: eloquent prose, outstanding artwork (including some beautiful drawings by David Goodsell in From Photon to Neuron), and a quantitative approach that most biology textbooks lack. Nelson’s book, however, is more useful for teaching; it includes homework problems, end-of-chapter summaries, and recommendations for additional reading. Many of the homework exercises require analyzing data that you can download from the author’s website (www.physics.upenn.edu/~pcn). To do these exercises, you must know how to program a computer using MATLAB or similar software (you can download Nelson’s free Student Guide to MATLAB from his website). One critical skill students gain when taking a class using From Neuron to Brain is the ability to write short computer programs to analyze data numerically. Nelson teaches using words, pictures, formulas, and code to construct models and interpret data. His books provide a masterclass in how to integrate these four different approaches into a complete learning experience. Most biology books combine words and pictures, and a few include equations. Nelson’s emphasis on code—or at least his insistence that the students write their own code—sets his books apart. Computerphobes may hesitate initially, but they will gain the most from numerical modeling.

From Photon to Neuron covers topics throughout biological physics. For instance, fluorescence microscopy is a theme Nelson introduces early and revisits often. He devotes one chapter to color vision and another to superresolution microscopy. My favorite chapter begins with Rosalind Franklin’s iconic x-ray diffraction pattern of DNA, and then develops just enough theory to explain how Watson and Crick could, at a glance, obtain the key information they needed to derive their famous structure. Nelson presents enough electrophysiology to describe how absorption of a photon by rhodopsin causes a voltage signal across the neural membrane, and enough physical optics to explain the iridescence of butterfly wings. The network diagrams of signaling cascades seemed a little dry, but that may reflect my own tastes rather than Nelson’s presentation. Other topics include photosynthesis, Fluorescence Resonance Energy Transfer (FRET), and two-photon imaging.

Overall, I found From Photon to Neuron to be an outstanding textbook; a worthy successor to Biological Physics and Physical Models of Living Systems. Philip Nelson has done it again. His books define the field of biological physics.
Brad Roth
Oakland University
Rochester, Michigan
Brad Roth is a professor of physics at Oakland University, and is coauthor with Russell Hobbie of Intermediate Physics for Medicine and Biology (Springer, 2015).
Three books by Philip Nelson: Biological Physics, from Photon to Neuron, and Physics Models of Living Systems.
Three books by Philip Nelson.

Friday, December 29, 2017

Used Math

Used Math, by Clifford Swartz, superimposed on Intermediate Physics for Medicine and Biology.
Used Math,
by Clifford Swartz.
How much mathematics is needed when taking a class based on Intermediate Physics for Medicine and Biology? Students come to me all the time and say “I am interested in your class, but I don’t know if I have enough math background.” I wish I had a small book that reviewed the math needed for a class based on IPMB. Guess what? Used Math by Clifford Swartz is just what I need. In the preface, Swartz writes:
In this book, which is part reference and part reminder, we are concerned with how to use math. We concentrate on those features that are most needed in the first two years of college science courses. That range is not rigorously defined, of course. A sophomore physics major at M.I.T. or Cal. Tech. must use differential equations routinely, while a general science major at some other place may still be troubled by logarithms. It is possible that even the Tech student has never really understood certain things about simple math. What, for instance, is natural about the natural logs? We have tried to cover a broad range to topics—all the things that a science student might want to know about math but has never dared ask.
Students and instructors might benefit if I went through Used Math chapter by chapter, assessing what math is needed, and what is math not needed, when studying from IPMB. Also, what math is needed but is not included in Used Math.

Chapter 1: Reporting and Analyzing Uncertainty

Russ Hobbie and I assume our readers know about scientific notation and significant figures. The best time to teach significant figures is during laboratory. (Wait! Is there is a lab that goes along with IPMB? No. At least not that I know of. But perhaps there should be.) In my Biological Physics class, students often answer homework using too many significant figures. I don’t take off points, but I write annoying notes in red ink.

Chapter 2: Units and Dimensions

Russ and I do not review how to convert between units. My students usually don’t have trouble with this. Often, however, they will do algebra and derive an equation that is dimensionally wrong (for example, containing “a + a2” where a has units of length). I take off extra points for such mistakes, and I harp about them in class.

Chapter 3: Graphs

We assume students can plot a simple graph of y(x) versus x. In class, when we derive a result such as y(x) = x/(x2 + a2), I ask the students what a sketch of this function looks like. Often they have trouble drawing it. Our homework problems routinely ask students to plot their result. I deduct points if these plots are not qualitatively correct. IPMB discusses semilog and log-log plots in Chapter 2.

Chapter 4: The Simple Functions of Applied Math

Students should be familiar with powers, roots, trigonometric functions, and the exponential function before taking a class based on IPMB. Chapter 2 is devoted to the exponential, and Appendix C lists properties of exponents and logarithms. We define the hyperbolic functions sinh and cosh upon first use (Eq. 6.98). I don’t give placement quizzes at the first class meeting, but if I did I would have the students sketch plots of x2, √x, sin(x), cos(x), tan(x), ex, log(x), sinh(x), cosh(x), and tanh(x). If you can’t do that, you will never be able to translate mathematical results into physical insight.

Chapter 5: Statistics

I discussed the statistics used in IPMB before in this blog. We analyze probability distributions in Chapter 3 on thermodynamics and Chapter 4 on diffusion, and go into more detail in Appendix G (mean and standard deviation), Appendix H (the binomial distribution), Appendix I (the Gaussian distribution), and Appendix J (the Poisson distribution). We don’t discuss analyzing data, such as testing a hypothesis using a student t-test. One topic missing from Used Math is simple concepts from probability; for example, when you role two dice what is the probability that they add to five? When I taught quantum mechanics (a subject in which probability is central), I spent an entire class calculating the odds of winning at craps. You will understand probability by the time you finish that calculation.

Chapter 6: Quadratic and Higher Power Equations

Russ and I use the quadratic equation without review. We don’t solve any higher order equations in IPMB, and we never ask the student to factor a polynomial using a procedure similar to long division (yuk!).

Chapter 7: Simultaneous Equations

Students should know how to solve systems of linear equations. I often solve small systems (two or three equations) in class. Sometimes when teaching I derive the equations and then say “the rest is just math” and state the solution. This happens often when doing a least-squares fit at the start of Chapter 11. I don’t ask students to solve a system of many (say, five) equations.

Chapter 8: Determinants

IPMB does not stress linear algebra and we never require that students calculate the determinant of a matrix. However, we do occasionally require the student to calculate a cross product using a method similar to taking a determinant (Eq. 1.9), so students need to know the rules for evaluating 2 × 2 and 3 × 3 determinants.

Chapter 9: Geometry

Used Math goes into more detail about analytical geometry (conic sections, orbits, and special curves like the catenary) than is needed in IPMB. The words ellipse and hyperbola never appear in our book (parabola does.) We discuss cylindrical and spherical coordinates in Appendix L. Students should know how to find the surface area and volume of simple objects like a cube, cylinder, or sphere.

Chapter 10: Vectors

Russ and I use vectors throughout IPMB. They are reviewed in Appendix B. We define the dot and cross product of two vectors when they are first encountered.

Chapter 11: Complex Numbers

We avoid complex numbers. I hate them. One exception: we introduce complex exponentials when discussing Fourier methods, where we present them as an alternative to sines and cosines that is harder to understand intuitively but easier to handle algebraically. You could easily skip the sections using complex exponentials, thereby banishing complex numbers from the class.

Chapter 12: Calculus—Differentiation

Students must know the definition of a derivative. In class I derive a differential equation for pressure by adding the forces acting on a small cube of fluid and then taking the limit as the size of the cube shrinks to zero. If students don’t realize that this process is equivalent to taking a derivative, they will be lost. Also, they should know that a derivative gives the slope of a curve or a rate of change. What functions should students be able to differentiate? Certainly powers, sines and cosines, exponentials, and logarithms. Plus, students must know the chain rule and the product rule. They should be able to maximize a function by setting its derivative to zero, and they should realize that a partial derivative is just a derivative with respect to one variable while the other variables are held constant (Appendix N).

Chapter 13: Integration

Students must be able to integrate simple functions like powers, sines and cosines, and exponentials. They should know the difference between a definite and indefinite integral, and they should understand that an integral corresponds to the area under a curve. Complicated integrals are provided to the student (for example, Appendix K explains how to evaluate integrals of e-x2) or a student must consult a table of integrals. In my class, I always use the “guess and check” method for solving a differential equation: guess a solution containing some unknown parameters, plug it into the differential equation, and determine what parameters satisfy the equation; no integration is needed. One calculation that some students have problems with is integrating a function over a circle. In class, I carefully explain in how the area element becomes rdrdθ. At first the students look bewildered, but most eventually master it. I avoid integration by parts (which I dislike), but it is needed when calculating the electrical potential of a dipole. Perhaps you can devise a way to eliminate integration by parts altogether?

Chapter 14: Series and Approximations

Appendix D of IPMB is about Taylor series. If you remember only that ex is approximately 1+x, you will know 90% of what you need. The expansions of sin(x) and cos(x) are handy, but not essential. When deriving the dipole approximation, I use the Taylor series of 1/(1-x). (The day I discuss the dipole is one of the most mathematical of the semester.) Student’s never need to derive a Taylor series, and they rarely require more than the first two terms of the expansion. The geometric series (1+x+x2+…) appears in Homework Problem 28 of Chapter 8, but the sum of the series is given. In IPMB, we never worry about convergence of an infinite series. Fourier series is central to imaging. In Medical Physics (PHY 3260), I spend a couple weeks discussing Fourier series and Fourier transforms, the most mathematically intensive part of IPMB. If students can handle Chapters 11 and 12, they can handle any math in the book.

Chapter 15: Some Common Differential Equations

I always tell my class “if you can solve only one differential equation, let it be dy/dx = by” (in case you are wondering, the solution is y = ebx). As I mentioned earlier, I preferred to solve differential equations by guess and check. In IPMB, you can get away with guesses that involve powers, trig functions, and exponentials. Some students claim that a course in differential equations is needed before taking a class using IPMB. I disagree. We don’t need advanced methods (e.g., exact differential equations) and we never analyze existence and uniqueness of solutions. We just guess and check. Appendix F discusses differential equations in general, but my students rarely need to consult it. I emphasize understanding differential equations from a physical point-of-view. I expect my students to be able to translate a physical statement of a problem into a differential equation. Yes, I put such questions on my exams. To me, that is a crucial skill.

Chapter 16: Differential Operators

What Used Math calls differential operators, I call vector calculus: divergence, gradient, and curl. Russ and I use vector calculus occasionally. I expect students to be able to do homework problems using it, but I don’t expect them to do such calculations on exams. Mostly, vector calculus appears when talking about electricity and magnetism in Chapters 6-8. I think an instructor could easily design the class to avoid vector calculus altogether. Whenever Russ and I use vector calculus, we typically cite Div, Grad, Curl and All That, which is my favorite introduction to these concepts.


That sums up of the topics in Used Math. Is there any other math in IPMB? Special functions sometimes pop up, such as Bessel functions, the error function, and Legendre polynomials. Usually these appear in homework problems that you don’t have to assign. We occasionally ask students to solve differential equations numerically (see Sec. 6.14), usually in the homework. I skip these problems when I teach from IPMB; there is not enough time for everything. In some feedback problems in Chapter 10 (for example, Problems 10.12 and 10.17) the operating point must be evaluated numerically. I do assign these problems, and I tell students to find the solution by trial and error. We don’t spend time developing fancy methods for solving nonlinear equations, but I want students to realize they can solve equations such as xex = 1 numerically (the solution is approximately x = 0.57).

In summary, Used Math contains almost all the mathematics you need when taking a class from IPMB. It would be an excellent supplementary reference for students. From now on, when students ask me how much math they need to know for my Biological Physics or Medical Physics class, I will tell them all they need is in Used Math.

Friday, December 22, 2017

Abramowitz and Stegun

Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, by Abramowtiz and Stegun, on top of Intermediate Physics for Medicine and Biology.
Handbook of Mathematical Functions,
by Abramowtiz and Stegun
When Russ Hobbie and I discuss a special mathematical function in Intermediate Physics for Medicine and Biology, we often cite the Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, by Milton Abramowitz and Irene Stegun. My copy is the paperback Dover edition, which is a unaltered replication of the original book published in 1964 by the National Bureau of Standards. According to Google Scholar, the Handbook is approaching its 100,000th citation, which means it has been cited on average about once every five hours for over 50 years!

A screenshot from Google Scholar, showing that the Handbook of Mathematical Functions, by Abromowitz and Stugus, has been cited 95539 times

Abromowitz and Stegun,” as the Handbook is universally known, has a fascinating history. According to David Alan Grier’s article “Irene Stegun, the ‘Handbook of Mathematical Functions’, and the Lingering Influence of the New Deal” (The American Mathematical Monthly, Volume 113, pages 585–597, 2006), the Handbook began as part of President Franklin Roosevelt's Work Projects Administration during the Great Depression. Grier describes the group gathered to calculate mathematical tables in the days before electronic computers.
The WPA organized the Mathematical Tables Project in the fall of 1937 and began its operations at the start of February 1938. The project was designed to employ 450 workers as human computers, individuals who did scientific calculations by hand. Using nothing but paper and pencil, these workers were instructed to create large, high precision tables of mathematical functions: the exponential function, natural and common logarithms, circular and hyperbolic trigonometric functions, probability functions, gamma, elliptical, and Bessel functions.

The Mathematical Tables Project operated in New York City and occupied the top floor of a decaying industrial building in the “Hell’s Kitchen” neighborhood of New York City. All of the project’s computers were drawn from the city’s welfare rolls and were desperately poor. Most had been unemployed for at least a year. Only a few had attended high school. Roughly 20 percent of them were polio victims, amputees, or handicapped in some way. Another 20 percent of the computers were African American. The project also had a large cohort of Jewish workers from the tenements of the lower East Side of Manhattan and a group, of roughly equal size, from the cramped Irish neighborhoods on the West Side. Approximately 45 percent of the computers were women who were supporting their families.
This motley crew performed the heroic work that led eventually to the accurate tables in the Handbook. Grier continues
The [Planning] committee [which included Abramowitz and Stegun] occupied a few desks in one corner of the project’s vast computing floor. From that corner, the committee oversaw the 450 human computers. Most of these computers had no mathematical training. Many of them did not know the steps of long division and at least a few did not understand negative numbers.
The Mathematical Tables Project eventually morphed into an effort to produce a definitive mathematical handbook.
The Handbook of Mathematical Functions…is an unusual artifact, for it is both an example of a large, collaborative research project, which is a rare activity in the mathematical sciences, and one of the very few scientific activities of the 1950s led by a woman. As was often the case with early scientific contributions by women, the gender of the leader is obscure. The title page lists two editors, one male and one female: Milton Abramowitz (1913-1958) and Irene Stegun (1919?)… Initially, these two mathematicians shared editorial duties, though Abramowitz clearly played the leading role. He prepared the outline for the book, drafted preliminary material, and recruited the first group of contributors.... His role ended on a hot summer's day in 1958, when he unwisely decided to mow the lawn of his home in suburban Washington. Succumbing to the heat, he collapsed and died, leaving Stegun as the sole editor.
When Computers Were Human, by David Alan Grier.
When Computers Were Human,
by David Alan Grier.
Grier has written an entire book about large scale computations done before the invention of electronic computers: When Computers Were Human. I've gotten it interlibrary loan and plan to read it over the holiday break. If you prefer listening to reading, watch the Youtube video of a talk by Grier, shown below. Anyone who watched the movie Hidden Figures saw human computers working for NASA.

One of the best things about Abramowitz and Stegun is that you can access it for free online at http://numerical.recipes/aands. NIST (the National Institutes of Standards and Technology, formerly known as the National Bureau of Standards) also maintains an updated electronic math handbook at http://dlmf.nist.gov

Enjoy!

Friday, December 15, 2017

Gopalasamudram Narayanan Ramachandran, Biological Physicist

Many followers of the Intermediate Physics for Medicine and Biology Facebook page are from India, and I would like to somehow thank them for their interest in our book. The only way I can express my appreciation is by writing in this blog. So, today’s post is about the great Indian physicist Gopalasamudram Narayanan Ramachandran (1922-2001).

In an obituary published in the Biographical Memoirs of Fellows of the Royal Society (Volume 51, Pages 367–377, 2005), Vijayan and Johnson write
G. N. Ramachandran has been among the most outstanding crystallographers and structural biologists of our times. He is considered by many to be the best scientist to have worked in independent India. The model of collagen developed by him has stood the test of time and has contributed greatly to understanding the role of this important fibrous protein. His pioneering contributions in crystallography, particularly in relation to methods of structure analysis using Fourier techniques and anomalous dispersion, are well recognized. A somewhat less widely recognized contribution of his is concerned with three-dimensional image reconstruction. Much of the foundation of the currently thriving field of molecular modelling was laid by him. The Ramachandran plot remains the simplest and the most commonly used descriptor and tool for the validation of protein structures.
Ramachandran appears in Intermediate Physics for Medicine and Biology in Chapter 12, when Russ Hobbie and I discuss computed tomography. He and A. V. Lakshminarayanan developed one of the two man main tomographic techniques: filtered back projection. We write
Filtered back projection is more difficult to understand than the direct Fourier technique. It is easy to see that every point in the object contributes to some point in each projection. The converse is also true. In a back projection every point in each projection contributes to some point in the reconstructed image…A very simple procedure would be to construct an image by back-projecting every projection…We will now show that the image fb(x,y) obtained by taking projections of the object F(θ,x') and then backprojecting them is equivalent to taking the convolution of the object with the function h.
h(x) is
Unfortunately, this function does not exist; the integral doesn’t converge. The factor |k| diverges as k goes to ±∞. But Ramachandran and Lakshminarayanan realized that you don’t need to integrate to infinity. In the above integral, k is the spatial frequency. He suggested there should be an upper limit on the spatial frequency, kmax. What should the upper limit be? The measured projection F(θ,x') is not a continuous function of position x'. The data is discrete, measured at a finite number of points. The largest spatial frequency is that given by the Nyquist sampling criterion: there should be at least two points per wavelength. Using this upper limit for kmax, Ramachandran and Lakshminarayanan were able to solve the integral for h(x) analytically, and found that

where i denotes the ith discrete value of x. This result looks slightly different than Eq. 12.44 in IPMB; Here I factored N2/16 out of each term, and I use i for the integer instead of k, because I don’t want to use k for both spatial frequency and an integer. Below is a plot of h(i).
Convolution with function h(i) corresponds to a passing the signal through a high pass filter (often called the "Ram-Lak filter"). Therefore, the convolution of a constant should vanish, implying that all the values of h(i) should add to zero. In fact, this is true. The infinite series
 
 is exactly what is needed to ensure this.

At the end of their obituary, Vijayan and Johnson discuss Ramachandran’s impact on science and India.
To more than a generation of scientists in India, and some abroad, Ramachandran was a source of scientific and personal inspiration. Many of his contributions were based on simple but striking ideas. He demonstrated how international science could be influenced, even from less well-endowed neighbourhoods, through ingenuity and imagination. It is remarkable that although Ramachandran left structural biology and mainstream research about a quarter of century ago, his presence in the field remains as vibrant as ever. Indeed, Ramachandran established a great scientific tradition. That tradition lives on and thrives in the world, in India, and in the two research schools he founded.
Thanks to all the Indian readers of IPMB. I’m glad you like the book.

Friday, December 8, 2017

Shattered Nerves: How Science is Solving Modern Medicine's Most Perplexing Problem

Shattered Nerves: How Science is Solving Modern Medicine's Most Perplexing Problem, by Victor Chase, superimposed on Intermediate Physics for Medicine and Biology.
Shattered Nerves:
How Science is Solving Modern
Medicine's Most Perplexing Problem,
by Victor Chase.
In his book Shattered Nerves: How Science is Solving Modern Medicine’s Most Perplexing Problem, Victor Chase tells the story of neural prostheses. Russ Hobbie and I discuss neural stimulation in Section 7.10 of Intermediate Physics for Medicine and Biology.
The information that has been developed in this chapter can also be used to understand some of the features of stimulating electrodes. These may be used for electromyographic studies; for stimulating muscle to contract called functional electrical stimulation (Peckham and Knutson 2005); for a cochlear implant to partially restore hearing (Zeng et al. 2008); deep brain stimulation for Parkinson’s disease (Perlmutter and Mink 2006); for cardiac pacing (Moses and Mullin 2007); and even for defibrillation (Dosdall et al. 2009).
Chase begins by describing the cochlear implant. A common cause of deafness is the death of hair cells in the cochlea, leaving the auditory nerve intact but not activated by sound. A cochlear implant stimulates the auditory nerve using several electrodes, each corresponding to a different frequency. Chase often describes medical devices from the point of view of a patient, and in this case he tells the story of Michael Pierschalla, who not only benefited from this technology but contributed to its development.

I am fascinated by idiosyncratic inventors such as Giles Brindley. Chase writes
An often-told tale about Giles Brindley might reveal something about the person referred to as the grandfather of neural prostheses. In 1983, the inveterate innovator and self-experimenter stood before a scientific audience and removed his pants. The venue was Las Vegas, Nevada, and the audience that witnessed this occurrence was the membership of the American Urological Association. Brindley was demonstrating, quite graphically, the success of an injection of phenoxybenzamine, a treatment he had developed for erectile dysfunction.
Brindley developed one of the first visual prostheses that stimulated the brain. He also invented a musical instrument he called the “undilector,” which is something like a computer-controlled bassoon.

One hero of Chase’s story is F. Terry Hambrecht, who led the National Institutes of Health Neural Prosthesis Program. When I was working at the NIH intramural program in the early 1990s, I often attended Hambrecht’s annual Neural Prosthesis Workshop. Sometimes I would submit a poster about magnetic stimulation. It was close enough to the workshop’s theme to be worth a poster, but far enough from its main thrust to be a little off-topic. At these workshops, held on the NIH campus, I met many of the scientists highlighted by Chase.

Shattered Nerves focuses on research performed at Case Western Reserve University. J. Thomas Mortimer founded the Applied Neural Control Laboratory there. His student P. Hunter Peckham developed a prosthetic device to restore function to a patient's paralyzed hand. Another Case researcher, Ronald Triolo, invented a stimulator that allowed a wheelchair-bound patient to stand and move around. Quadriplegics often have difficulty controlling their urination and bowel movements. Mortimer and Graham Creasey developed a prosthesis to control the bladder and bowel muscles.

Rather than summarizing Shattered Nerves myself, I will let Chase do so in his own words.
Unfortunately, in some people, the circuitry that generates and conducts electrical signals goes bad, rendering them unable to fully partake of the miracle of the senses, as in the case of the blind, when the rod and cone photoreceptors inside the eye can no longer translate light into the electrical signals that send information to the brain. Or when the hair cells inside the cochlea of the inner ear, which process sound waves, die off, and a person loses the ability to hear. Failure of the body's electrical circuitry is also responsible for paralysis that occurs when spinal cord injuries damage the nerve cells that carry electrical signals from the brain's motor cortex to the muscles and from the skin's tactile receptors to the somatosensory portion of the brain. Until recently, these conditions were deemed irreversible. Now there is hope.
What did I gain from reading Shattered Nerves? First, I like to study the history of a field in order to better appreciate the current problems and future directions. Second, the researchers and patients that Chase describes are inspirational. Third, I was amazed at how these pioneers combined physics and engineering with medicine and biology, as Russ and I advocate in IPMB.

All books have advantages and disadvantages. One disadvantage is that Shattered Nerves was written in 2006. In a fast moving field like neural prostheses, I wish the book was up-to-date. An advantage is that you can read it for free through Project Muse.

Enjoy!

Friday, December 1, 2017

Suki Has Fleas

Suki Roth, resing in her bed.
Suki
Suki has fleas. It’s her worst infestation ever. My wife and I have battled them for about a month, and are finally gaining the upper hand by constantly vacuuming the house, washing her bedding, and giving her baths.

While I am sure you empathize with our little puppy, you are probably asking “what do Suki’s fleas have to do with Intermediate Physics for Medicine and Biology?” A lot! In Problem 47 of Chapter 2, Russ Hobbie and I ask students to determine how jumping height scales with mass. I won’t give away the answer here, but when you are asked how something scales with mass, one possible answer is that it doesn’t. In other words, if the allometric relationship is Jumping Height = C Massn, where C and n are constants, then one possible value for n is zero; jumping height is independent of mass.

Scaling: Why is Animal Size So Important? by Knut Schmidt-Nielsen, superimposed on Intermediate Physics for Medicine and Biology.
Scaling: Why is Animal
Size So Important?
by Knut Schmidt-Nielsen.
The next homework exercise, Problem 48, analyzes one of the many scaling arguments made by Knut Schmidt-Nielsen in his marvelous book Scaling: Why is Animal Size so Important? The start of Problem 48 gives away the answer to Problem 47:
Problem 48. In Problem 47, you should have found that all animals can jump to about the same height (approximately 0.6 m), independent of their mass M.
Are you skeptical that, for instance, a tiny flea can jump 60 cm (about two feet)? I can tell you from first-hand experience that those little buggers can really jump. Each evening we inspect Suki with a flea comb, and sometimes a flea jumps away before we can kill it. 

Problem 48 requires that students calculate the flea's acceleration. Again, I won’t give you the answer, but those fleas sure undergo large accelerations! If you don’t believe me, do Problem 48, or read what Knut Schmidt-Nielsen writes.
For a flea, acceleration takes place over less than 1 mm, and takeoff time is less than 1 msec. The average acceleration during takeoff must therefore exceed 200 g. It is worth a moment's reflection to think of what such high acceleration means. It means that the force on the animal is 200 times its weight (any mammal would be totally crushed under such forces), and the insect must have a skeleton and internal organs able to resist such acceleration forces.
I wonder how fleas avoid concussions?

I’m glad that our little fleabag is cleaning up her act. Suki turned 15 a few months ago, and she is the old lady of the family. But she is still up for our walks, during which I listen to audiobooks and she snoots around (that’s probably how she got the fleas). And what is her favorite book? Intermediate Physics for Medicine and Biology, of course.