Resources
Consider a large haploid bacterial culture undergoing continuous chemostat growth where a mutant allele arises that has a very small selective advantage over the ancestral allele , such that the relative growth rates are and , respectively. The frequency of the beneficial allele over time is governed by the differential equation , where is measured in generations. (a) Derive the expression for the time required for the allele frequency to shift from an initial value to a final value . (b) In the asymptotic limit where a newly arisen mutation at frequency sweeps toward fixation (), calculate the number of generations required for the allele to reach , assuming a selective advantage of . Express your answer to three significant figures.
Answer and steps
Final answer
(a) ; (b)
Steps
Part (a): Deriving the Time Required for Allele Frequency Change
The rate of change of the beneficial allele frequency over time (measured in generations) is modeled by the logistic selection equation:
To find the time required for the frequency to increase from an initial value to a final value , separate the variables:
Use partial fraction decomposition on the left-hand side:
Now, integrate both sides from the initial state to the final state :
Evaluate the definite integrals:
Combine the logarithmic terms:
Solving for yields:
Part (b): Calculating the Number of Generations
Substitute the given values into the derived equation:
- Initial frequency: , so
- Final frequency: , so
- Selection coefficient:
Compute the argument of the natural logarithm (the odds ratio):
Evaluate the natural logarithm:
Divide by the selection coefficient :
Rounding to three significant figures gives:
Common Pitfall: Remember that natural selection is slowest when is extremely close to or because the product becomes very small. The majority of generations during a selective sweep are spent during these initial and final phases rather than the rapid rise through intermediate frequencies.
Typical errors
01 The student forgets to apply the chain rule when integrating 1/(1 - p), missing the negative sign and producing an incorrect logarithm difference.
Sample Student Work
Reviewed by ACEpath TeacherStep-by-Step Review
Walk Through It with Your Teacher- Step 1
- Step 2Correct
When integrating with respect to , the derivative of the denominator is . By -substitution, , not .
- Step 3
\ln[p(1-p)]\Big|_{p_0}^{p_t} = s\cdot t \implies t = \frac{1}{s}\ln\left[\frac{p_t(1-p_t)}{p_0(1-p_0)} ight]
Correct\left[\ln\left(\frac{p}{1-p}\right)\right]_{p_0}^{p_t} = s\cdot t \implies t = \frac{1}{s}\ln\left(\frac{p_t(1-p_0)}{p_0(1-p_t)} ight)
Because of the missing negative sign in the integral, you combined the logarithms as a product rather than a quotient (the logit/odds ratio).
- Step 4Correct
You substituted the numerical parameters into your derived formula correctly and evaluated it accurately, but the result was altered by the sign error from part (a).
WHAT YOU DID WELL
Compliments from Your TeacherYou correctly separated the differential variables to prepare for integration.
You decomposed into correct partial fraction terms.
You correctly executed the arithmetic and logarithmic calculations with the given parameter values in part (b).
THE ERROR
Where Your ACEpath Teacher Spotted the MistakeYou treated as instead of .
WHY IT HAPPENED
ACEpath Teacher's DiagnosisOverlooking the inner derivative during -substitution when integrating reciprocals of linear binomials.
REASONING PATH
Your ACEpath teacher’s suggested approach- Linear Substitution Rule for Reciprocals
For any constant , because .
Differentiate your proposed antiderivative mentally: , which reveals the need for a compensatory negative sign.
- Biological Sense Check on Selection Trajectory
Allele frequency changes under selection follow a log-odds transformation , mapping monotonically to .
Check that the integrated function increases as approaches fixation (); is symmetric and drops near , whereas increases monotonically.
CORRECTED PATH
ACEpath Teacher's DemonstrationApply () so that .
Combine logarithms using subtraction: .
Set equal to , giving \ln\left(\frac{p_t}{1-p_t}\right) - \ln\left(\frac{p_0}{1-p_0}\right) = st \implies t = \frac{1}{s}\ln\left(\frac{p_t(1-p_0)}{p_0(1-p_t)} ight).
Substitute , , and : .
Calculate .
(a) t = \frac{1}{s}\ln\left(\frac{p_t(1-p_0)}{p_0(1-p_t)} ight); (b)
02 The student ignores the ancestral allele depletion term (1 - p) by mistaking logistic allele growth for simple exponential growth, leading to dp/dt = s · p.
Sample Student Work
Reviewed by ACEpath TeacherStep-by-Step Review
Walk Through It with Your Teacher- Step 1Correct
You dropped the factor from the differential equation provided in the problem statement, which models the finite availability and replacement of the ancestral allele.
- Step 2Correct
\int_{p_0}^{p_t} \left(\frac{1}{p} + \frac{1}{1 - p}\right) dp = \int_0^t s\,dt \implies t = \frac{1}{s}\ln\left(\frac{p_t(1 - p_0)}{p_0(1 - p_t)} ight)
Your integration technique was mathematically valid for your stated equation, but because the term was missing, you integrated instead of using partial fractions on .
- Step 3Correct
t = \frac{1}{0.0200}\ln\left(\frac{0.999(1 - 1.00 \times 10^{-4})}{(1.00 \times 10^{-4})(1 - 0.999)} ight) \approx 806\text{ generations}
You substituted the numerical parameters accurately and calculated the logarithm correctly, but using the exponential model severely underestimated the total time by neglecting the deceleration that occurs as .
WHAT YOU DID WELL
Compliments from Your TeacherYou correctly identified separation of variables as the right analytical technique to solve for time .
You evaluated natural logarithms and solved for accurately from your working equation.
You correctly substituted the numerical constants , , and in part (b).
THE ERROR
Where Your ACEpath Teacher Spotted the MistakeYou accidentally dropped the term when copying the differential equation .
WHY IT HAPPENED
ACEpath Teacher's DiagnosisConfusing relative allele frequency dynamics with unconstrained absolute population growth, overlooking that an increase in beneficial allele frequency requires a corresponding decrease in alternative allele frequency , making growth logistic rather than exponential.
REASONING PATH
Your ACEpath teacher’s suggested approach- Allele Frequency Boundaries
Allele frequencies are proportions bounded between and , where .
Always check whether your rate equation approaches zero as . If when , the equation allows to exceed , which is biologically impossible.
- Partial Fraction Integration
, which integrates to .
When separating variables for logistic selection, integrate both fractions to obtain the change in log-odds .
CORRECTED PATH
ACEpath Teacher's DemonstrationSeparate variables: .
Decompose into partial fractions: .
Integrate from to : \left[\ln\left(\frac{p}{1 - p}\right)\right]_{p_0}^{p_t} = st \implies t = \frac{1}{s}\ln\left(\frac{p_t(1 - p_0)}{p_0(1 - p_t)} ight).
Substitute , , and : .
Calculate : .
(a) t = \frac{1}{s} \ln\left(\frac{p_t(1 - p_0)}{p_0(1 - p_t)} ight); (b)
03 The student uses base-10 common logarithm instead of the natural logarithm when integrating 1/x, resulting in an answer scaled down by ln(10).
Sample Student Work
Reviewed by ACEpath TeacherStep-by-Step Review
Walk Through It with Your Teacher- Step 1
- Step 2Correct
The antiderivative of is the natural logarithm (base ), not the common logarithm . Writing and treating this as a base-10 logarithm introduces an error of factor .
- Step 3Correct
You evaluated the odds ratio arithmetic correctly, but you computed the base-10 logarithm rather than the natural logarithm .
- Step 4Correct
Because of using base 10 instead of base , your final numerical value is roughly generations instead of generations.
WHAT YOU DID WELL
Compliments from Your TeacherYou correctly separated variables and set up the differential equation.
You accurately completed the partial fraction decomposition of .
You correctly substituted the numerical initial and boundary conditions into the algebraic form.
THE ERROR
Where Your ACEpath Teacher Spotted the MistakeNo, this was a conceptual error in calculus integration rules rather than a simple arithmetic slip.
WHY IT HAPPENED
ACEpath Teacher's DiagnosisYou treated the antiderivative of as a base-10 logarithm rather than the natural logarithm (base ), which caused the evaluated time to be multiplied by .
REASONING PATH
Your ACEpath teacher’s suggested approach- Standard Antiderivative Rule
, where is the natural logarithm with base .
Always write and compute (natural log) when solving differential equations and integrating reciprocal functions.
- Base-10 Conversion Check
, meaning .
If you ever compute by habit, multiply the result by to recover the true natural logarithm.
CORRECTED PATH
ACEpath Teacher's DemonstrationEvaluate the natural logarithm of the odds ratio: .
Multiply by : .
Round to three significant figures.
Lock it in
What is the antiderivative , and why is there a negative sign?
. Using substitution , , which introduces a factor of .
Similar question
A continuous haploid selection model satisfies . If an advantageous allele has selection coefficient , how many generations are required for its frequency to increase from to ?
Answer
t = \frac{1}{s}\ln\left(\frac{p_t(1 - p_0)}{p_0(1 - p_t)} ight) = \frac{1}{0.050}\ln\left(\frac{0.90 \times 0.90}{0.10 \times 0.10}\right) = 20 \ln(81) \approx 87.9\text{ generations}.
In a chemostat, the frequency of an allele declines under negative selection according to with . Derive the time required for the allele frequency to drop from to , paying careful attention to the integration signs.
Answer
Separating variables gives . Thus t = \frac{1}{s}\ln\left(\frac{p_0(1 - p_t)}{p_t(1 - p_0)} ight) = \frac{1}{0.010}\ln\left(\frac{0.80 \times 0.80}{0.20 \times 0.20}\right) = 100 \ln(16) \approx 277\text{ generations}.
A diploid population undergoes selection favoring a completely dominant beneficial allele with frequency , modeled by . Write down the partial fraction decomposition needed to integrate and find its antiderivative.
Answer
Decomposition: . Integrating each term gives: , , and . Combining terms gives .