Resources

Consider a large haploid bacterial culture undergoing continuous chemostat growth where a mutant allele AA arises that has a very small selective advantage ss over the ancestral allele aa, such that the relative growth rates are 1+s1 + s and 1.001.00, respectively. The frequency of the beneficial allele over time is governed by the differential equation dpdt=s⋅p(1−p)\frac{dp}{dt} = s \cdot p(1 - p), where tt is measured in generations. (a) Derive the expression for the time tt required for the allele frequency to shift from an initial value p0p_0 to a final value ptp_t. (b) In the asymptotic limit where a newly arisen mutation at frequency p0=1.00×10−4p_0 = 1.00 \times 10^{-4} sweeps toward fixation (pt→1p_t \to 1), calculate the number of generations tt required for the allele to reach p=0.999p = 0.999, assuming a selective advantage of s=0.0200s = 0.0200. Express your answer to three significant figures.

Answer and steps

Final answer

(a) t=1sln⁡(pt(1−p0)p0(1−pt))t = \frac{1}{s} \ln\left(\frac{p_t(1 - p_0)}{p_0(1 - p_t)}\right); (b) t=806 generationst = 806\text{ generations}

Steps

Part (a): Deriving the Time Required for Allele Frequency Change

The rate of change of the beneficial allele frequency pp over time tt (measured in generations) is modeled by the logistic selection equation: dpdt=s⋅p(1−p)\frac{dp}{dt} = s \cdot p(1 - p)

To find the time tt required for the frequency to increase from an initial value p0p_0 to a final value ptp_t, separate the variables: dpp(1−p)=s dt\frac{dp}{p(1 - p)} = s \, dt

Use partial fraction decomposition on the left-hand side: 1p(1−p)=1p+11−p\frac{1}{p(1 - p)} = \frac{1}{p} + \frac{1}{1 - p}

Now, integrate both sides from the initial state (t=0,p=p0)(t = 0, p = p_0) to the final state (t,p=pt)(t, p = p_t): ∫p0pt(1p+11−p)dp=∫0ts dt\int_{p_0}^{p_t} \left(\frac{1}{p} + \frac{1}{1 - p}\right) dp = \int_0^t s \, dt

Evaluate the definite integrals: [ln⁡(p)−ln⁡(1−p)]p0pt=s⋅t\Big[\ln(p) - \ln(1 - p)\Big]_{p_0}^{p_t} = s \cdot t

Combine the logarithmic terms: [ln⁡(p1−p)]p0pt=s⋅t\left[\ln\left(\frac{p}{1 - p}\right)\right]_{p_0}^{p_t} = s \cdot t ln⁡(pt1−pt)−ln⁡(p01−p0)=s⋅t\ln\left(\frac{p_t}{1 - p_t}\right) - \ln\left(\frac{p_0}{1 - p_0}\right) = s \cdot t ln⁡(pt(1−p0)p0(1−pt))=s⋅t\ln\left(\frac{p_t(1 - p_0)}{p_0(1 - p_t)}\right) = s \cdot t

Solving for tt yields: t=1sln⁡(pt(1−p0)p0(1−pt))t = \frac{1}{s} \ln\left(\frac{p_t(1 - p_0)}{p_0(1 - p_t)}\right)


Part (b): Calculating the Number of Generations

Substitute the given values into the derived equation:

  • Initial frequency: p0=1.00×10−4p_0 = 1.00 \times 10^{-4}, so 1−p0=1−0.000100=0.99991 - p_0 = 1 - 0.000100 = 0.9999
  • Final frequency: pt=0.999p_t = 0.999, so 1−pt=1−0.999=0.0011 - p_t = 1 - 0.999 = 0.001
  • Selection coefficient: s=0.0200s = 0.0200

Compute the argument of the natural logarithm (the odds ratio): pt(1−p0)p0(1−pt)=0.999×0.9999(1.00×10−4)×(1.00×10−3)=0.99890011.00×10−7≈9.989×106\frac{p_t(1 - p_0)}{p_0(1 - p_t)} = \frac{0.999 \times 0.9999}{(1.00 \times 10^{-4}) \times (1.00 \times 10^{-3})} = \frac{0.9989001}{1.00 \times 10^{-7}} \approx 9.989 \times 10^6

Evaluate the natural logarithm: ln⁡(9.989×106)≈16.117\ln\left(9.989 \times 10^6\right) \approx 16.117

Divide by the selection coefficient ss: t=16.1170.0200≈805.85 generationst = \frac{16.117}{0.0200} \approx 805.85\text{ generations}

Rounding to three significant figures gives: t=806 generationst = 806\text{ generations}

Common Pitfall: Remember that natural selection is slowest when pp is extremely close to 00 or 11 because the product p(1−p)p(1 - p) 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

OverviewACEpath Teacher's Diagnosis

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 Teacher
Step-by-Step Review
Walk Through It with Your Teacher
Incorrect
  1. Step 1

    dpp(1−p)=s dt  ⟹  1p(1−p)=1p+11−p\frac{dp}{p(1-p)} = s\,dt \implies \frac{1}{p(1-p)} = \frac{1}{p} + \frac{1}{1-p}

  2. Step 2

    ∫(1p+11−p)dp=ln⁡(p)+ln⁡(1−p)\int \left(\frac{1}{p} + \frac{1}{1-p}\right) dp = \ln(p) + \ln(1-p)

    Correct

    ∫(1p+11−p)dp=ln⁡(p)−ln⁡(1−p)=ln⁡(p1−p)\int \left(\frac{1}{p} + \frac{1}{1-p}\right) dp = \ln(p) - \ln(1-p) = \ln\left(\frac{p}{1-p}\right)

    When integrating 11−p\frac{1}{1-p} with respect to pp, the derivative of the denominator is ddp(1−p)=−1\frac{d}{dp}(1-p) = -1. By uu-substitution, ∫11−p dp=−ln⁡(1−p)\int \frac{1}{1-p}\,dp = -\ln(1-p), not +ln⁡(1−p)+\ln(1-p).

  3. 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).

  4. Step 4

    t=10.0200ln⁡[0.999⋅0.0011.00×10−4⋅0.9999]  ⟹  t=115 generationst = \frac{1}{0.0200}\ln\left[\frac{0.999 \cdot 0.001}{1.00 \times 10^{-4} \cdot 0.9999}\right] \implies t = 115\text{ generations}

    Correct

    t=10.0200ln⁡[0.999×0.9999(1.00×10−4)×0.001]≈806 generationst = \frac{1}{0.0200}\ln\left[\frac{0.999 \times 0.9999}{(1.00 \times 10^{-4}) \times 0.001}\right] \approx 806\text{ generations}

    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 Teacher

You correctly separated the differential variables to prepare for integration.

You decomposed 1p(1−p)\frac{1}{p(1-p)} 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 Mistake
Missing Negative Sign in Linear Substitution Integral

You treated ∫11−p dp\int \frac{1}{1-p}\,dp as ln⁡(1−p)\ln(1-p) instead of −ln⁡(1−p)-\ln(1-p).

WHY IT HAPPENED
ACEpath Teacher's Diagnosis

Overlooking the inner derivative ddp(a−p)=−1\frac{d}{dp}(a - p) = -1 during uu-substitution when integrating reciprocals of linear binomials.

REASONING PATH
Your ACEpath teacher’s suggested approach
Linear Substitution Rule for Reciprocals
  • For any constant aa, ∫1a−u du=−ln⁡∣a−u∣+C\int \frac{1}{a - u}\,du = -\ln|a - u| + C because d(a−u)=−dud(a - u) = -du.

  • Differentiate your proposed antiderivative mentally: ddp[ln⁡(1−p)]=−11−p\frac{d}{dp}[\ln(1-p)] = \frac{-1}{1-p}, 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 ln⁡(p1−p)\ln\left(\frac{p}{1-p}\right), mapping p∈(0,1)p \in (0, 1) monotonically to (−∞,∞)(-\infty, \infty).

  • Check that the integrated function increases as pp approaches fixation (p→1p \to 1); p(1−p)p(1-p) is symmetric and drops near 11, whereas p1−p\frac{p}{1-p} increases monotonically.

CORRECTED PATH
ACEpath Teacher's Demonstration
  1. Apply u=1−pu = 1 - p (du=−dpdu = -dp) so that ∫11−p dp=−ln⁡(1−p)\int \frac{1}{1-p}\,dp = -\ln(1-p).

  2. Combine logarithms using subtraction: ∫p0pt(1p+11−p)dp=[ln⁡(p)−ln⁡(1−p)]p0pt=[ln⁡(p1−p)]p0pt\int_{p_0}^{p_t} \left(\frac{1}{p} + \frac{1}{1-p}\right)dp = \left[\ln(p) - \ln(1-p)\right]_{p_0}^{p_t} = \left[\ln\left(\frac{p}{1-p}\right)\right]_{p_0}^{p_t}.

  3. Set equal to ∫0ts dt=st\int_0^t s\,dt = st, 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).

  4. Substitute p0=1.00×10−4p_0 = 1.00 \times 10^{-4}, pt=0.999p_t = 0.999, and s=0.0200s = 0.0200: pt(1−p0)p0(1−pt)=0.999×0.99991.00×10−7≈9.989×106\frac{p_t(1-p_0)}{p_0(1-p_t)} = \frac{0.999 \times 0.9999}{1.00 \times 10^{-7}} \approx 9.989 \times 10^6.

  5. Calculate t=ln⁡(9.989×106)0.0200=16.1170.0200≈806 generationst = \frac{\ln(9.989 \times 10^6)}{0.0200} = \frac{16.117}{0.0200} \approx 806\text{ generations}.

Final answer

(a) t = \frac{1}{s}\ln\left(\frac{p_t(1-p_0)}{p_0(1-p_t)} ight); (b) t=806 generationst = 806\text{ generations}

NEXT STEPS
Final Takeaways from Your Teacher
  • Practice integrating expressions of the form 1c−kx\frac{1}{c - kx} with explicit uu-substitution to avoid missing negative coefficients.

  • Verify your population genetics formulas by checking asymptotic behavior: sweeping toward pt→1p_t \to 1 must take much longer (t→∞t \to \infty) than reaching an intermediate frequency.

OverviewACEpath Teacher's Diagnosis

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 Teacher
Step-by-Step Review
Walk Through It with Your Teacher
Incorrect
  1. Step 1

    dpdt=s⋅p  ⟹  dpp=s dt\frac{dp}{dt} = s \cdot p \implies \frac{dp}{p} = s\,dt

    Correct

    dpdt=s⋅p(1−p)  ⟹  dpp(1−p)=s dt\frac{dp}{dt} = s \cdot p(1 - p) \implies \frac{dp}{p(1 - p)} = s\,dt

    You dropped the factor (1−p)(1 - p) from the differential equation provided in the problem statement, which models the finite availability and replacement of the ancestral allele.

  2. Step 2

    ln⁡(pt/p0)=s⋅t  ⟹  t=1sln⁡(ptp0)\ln(p_t / p_0) = s \cdot t \implies t = \frac{1}{s}\ln\left(\frac{p_t}{p_0}\right)

    Correct

    \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 (1−p)(1 - p) term was missing, you integrated 1p\frac{1}{p} instead of using partial fractions on 1p(1−p)\frac{1}{p(1 - p)}.

  3. Step 3

    t=(10.0200)⋅ln⁡(0.9991.00×10−4)  ⟹  t=50⋅ln⁡(9990)≈460 generationst = \left(\frac{1}{0.0200}\right) \cdot \ln\left(\frac{0.999}{1.00 \times 10^{-4}}\right) \implies t = 50 \cdot \ln(9990) \approx 460\text{ generations}

    Correct

    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 p→1p \to 1.

WHAT YOU DID WELL
Compliments from Your Teacher

You correctly identified separation of variables as the right analytical technique to solve for time tt.

You evaluated natural logarithms and solved for tt accurately from your working equation.

You correctly substituted the numerical constants p0p_0, ptp_t, and ss in part (b).

THE ERROR
Where Your ACEpath Teacher Spotted the Mistake
Omission of logistic saturation factor (1 - p)

You accidentally dropped the (1−p)(1 - p) term when copying the differential equation dpdt=s⋅p(1−p)\frac{dp}{dt} = s \cdot p(1 - p).

WHY IT HAPPENED
ACEpath Teacher's Diagnosis

Confusing relative allele frequency dynamics with unconstrained absolute population growth, overlooking that an increase in beneficial allele frequency pp requires a corresponding decrease in alternative allele frequency (1−p)(1 - p), making growth logistic rather than exponential.

REASONING PATH
Your ACEpath teacher’s suggested approach
Allele Frequency Boundaries
  • Allele frequencies are proportions bounded between 00 and 11, where p+q=1p + q = 1.

  • Always check whether your rate equation approaches zero as p→1p \to 1. If dpdt>0\frac{dp}{dt} > 0 when p=1p = 1, the equation allows pp to exceed 11, which is biologically impossible.

Partial Fraction Integration
  • 1p(1−p)=1p+11−p\frac{1}{p(1 - p)} = \frac{1}{p} + \frac{1}{1 - p}, which integrates to ln⁡(p)−ln⁡(1−p)=ln⁡(p1−p)\ln(p) - \ln(1 - p) = \ln\left(\frac{p}{1 - p}\right).

  • When separating variables for logistic selection, integrate both fractions to obtain the change in log-odds ln⁡(p1−p)\ln\left(\frac{p}{1 - p}\right).

CORRECTED PATH
ACEpath Teacher's Demonstration
  1. Separate variables: dpp(1−p)=s dt\frac{dp}{p(1 - p)} = s\,dt.

  2. Decompose into partial fractions: (1p+11−p)dp=s dt\left(\frac{1}{p} + \frac{1}{1 - p}\right)dp = s\,dt.

  3. Integrate from (0,p0)(0, p_0) to (t,pt)(t, p_t): \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).

  4. Substitute s=0.0200s = 0.0200, p0=1.00×10−4p_0 = 1.00 \times 10^{-4}, and pt=0.999p_t = 0.999: pt(1−p0)p0(1−pt)=0.999×0.99991.00×10−4×1.00×10−3≈9.989×106\frac{p_t(1 - p_0)}{p_0(1 - p_t)} = \frac{0.999 \times 0.9999}{1.00 \times 10^{-4} \times 1.00 \times 10^{-3}} \approx 9.989 \times 10^6.

  5. Calculate tt: t=ln⁡(9.989×106)0.0200=16.1170.0200≈805.85≈806 generationst = \frac{\ln(9.989 \times 10^6)}{0.0200} = \frac{16.117}{0.0200} \approx 805.85 \approx 806\text{ generations}.

Final answer

(a) t = \frac{1}{s} \ln\left(\frac{p_t(1 - p_0)}{p_0(1 - p_t)} ight); (b) t=806 generationst = 806\text{ generations}

NEXT STEPS
Final Takeaways from Your Teacher
  • Review partial fraction decomposition for expressions of the form 1x(1−x)\frac{1}{x(1 - x)}.

  • Practice sketching dpdt\frac{dp}{dt} versus pp to visualize why selection slows down when p≈0p \approx 0 and p≈1p \approx 1.

OverviewACEpath Teacher's Diagnosis

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 Teacher
Step-by-Step Review
Walk Through It with Your Teacher
Incorrect
  1. Step 1

    dpp(1−p)=s dt  ⟹  1p(1−p)=1p+11−p\frac{dp}{p(1-p)} = s\,dt \implies \frac{1}{p(1-p)} = \frac{1}{p} + \frac{1}{1-p}

  2. Step 2

    ∫(1p+11−p)dp=log⁡(p)−log⁡(1−p)  ⟹  t=1s⋅log⁡[pt(1−p0)p0(1−pt)]\int \left(\frac{1}{p} + \frac{1}{1-p}\right) dp = \log(p) - \log(1-p) \implies t = \frac{1}{s} \cdot \log\left[\frac{p_t(1-p_0)}{p_0(1-p_t)}\right]

    Correct

    ∫(1p+11−p)dp=ln⁡(p)−ln⁡(1−p)  ⟹  t=1sln⁡[pt(1−p0)p0(1−pt)]\int \left(\frac{1}{p} + \frac{1}{1-p}\right) dp = \ln(p) - \ln(1-p) \implies t = \frac{1}{s} \ln\left[\frac{p_t(1-p_0)}{p_0(1-p_t)}\right]

    The antiderivative of 1x dx\frac{1}{x}\,dx is the natural logarithm ln⁡(x)\ln(x) (base ee), not the common logarithm log⁡10(x)\log_{10}(x). Writing and treating this as a base-10 logarithm introduces an error of factor ln⁡(10)\ln(10).

  3. Step 3

    t=(10.0200)⋅log⁡[0.999⋅0.99991.00×10−4⋅0.001]  ⟹  t=50⋅log⁡(9.989×106)  ⟹  t=50⋅6.9995t = \left(\frac{1}{0.0200}\right) \cdot \log\left[\frac{0.999 \cdot 0.9999}{1.00 \times 10^{-4} \cdot 0.001}\right] \implies t = 50 \cdot \log(9.989 \times 10^6) \implies t = 50 \cdot 6.9995

    Correct

    t=(10.0200)⋅ln⁡[0.999⋅0.99991.00×10−4⋅0.001]  ⟹  t=50⋅ln⁡(9.989×106)  ⟹  t=50⋅16.117t = \left(\frac{1}{0.0200}\right) \cdot \ln\left[\frac{0.999 \cdot 0.9999}{1.00 \times 10^{-4} \cdot 0.001}\right] \implies t = 50 \cdot \ln(9.989 \times 10^6) \implies t = 50 \cdot 16.117

    You evaluated the odds ratio arithmetic correctly, but you computed the base-10 logarithm log⁡10(9.989×106)≈6.9995\log_{10}(9.989 \times 10^6) \approx 6.9995 rather than the natural logarithm ln⁡(9.989×106)≈16.117\ln(9.989 \times 10^6) \approx 16.117.

  4. Step 4

    t=350 generationst = 350\text{ generations}

    Correct

    t=806 generationst = 806\text{ generations}

    Because of using base 10 instead of base ee, your final numerical value is roughly 350350 generations instead of 806806 generations.

WHAT YOU DID WELL
Compliments from Your Teacher

You correctly separated variables and set up the differential equation.

You accurately completed the partial fraction decomposition of 1p(1−p)\frac{1}{p(1-p)}.

You correctly substituted the numerical initial and boundary conditions into the algebraic form.

THE ERROR
Where Your ACEpath Teacher Spotted the Mistake
Logarithm Base Confusion in Calculus

No, this was a conceptual error in calculus integration rules rather than a simple arithmetic slip.

WHY IT HAPPENED
ACEpath Teacher's Diagnosis

You treated the antiderivative of 1x dx\frac{1}{x}\,dx as a base-10 logarithm rather than the natural logarithm (base ee), which caused the evaluated time tt to be multiplied by log⁡10(e)=1ln⁡(10)≈0.434\log_{10}(e) = \frac{1}{\ln(10)} \approx 0.434.

REASONING PATH
Your ACEpath teacher’s suggested approach
Standard Antiderivative Rule
  • ∫1u du=ln⁡∣u∣+C\int \frac{1}{u}\,du = \ln|u| + C, where ln⁡\ln is the natural logarithm with base e≈2.718e \approx 2.718.

  • Always write and compute ln⁡\ln (natural log) when solving differential equations and integrating reciprocal functions.

Base-10 Conversion Check
  • log⁡10(x)=ln⁡(x)ln⁡(10)\log_{10}(x) = \frac{\ln(x)}{\ln(10)}, meaning ln⁡(x)=ln⁡(10)⋅log⁡10(x)≈2.3026⋅log⁡10(x)\ln(x) = \ln(10) \cdot \log_{10}(x) \approx 2.3026 \cdot \log_{10}(x).

  • If you ever compute log⁡10\log_{10} by habit, multiply the result by ln⁡(10)≈2.303\ln(10) \approx 2.303 to recover the true natural logarithm.

CORRECTED PATH
ACEpath Teacher's Demonstration
  1. Evaluate the natural logarithm of the odds ratio: ln⁡(9.989×106)≈16.117\ln(9.989 \times 10^6) \approx 16.117.

  2. Multiply by 1s=10.0200=50\frac{1}{s} = \frac{1}{0.0200} = 50: t=50×16.117=805.85t = 50 \times 16.117 = 805.85.

  3. Round to three significant figures.

Final answer

t=806 generationst = 806\text{ generations}

NEXT STEPS
Final Takeaways from Your Teacher
  • Review the fundamental integration formulas to ensure you associate ∫1x dx\int \frac{1}{x}\,dx directly with ln⁡∣x∣\ln|x|.

  • Check whether your calculator is set to the natural logarithm button (ln⁡\ln) or the common logarithm button (log⁡\log) when working with calculus problems.

  • Practice integrating logistic growth equations to build automaticity with odds ratios and natural logs.

Lock it in

Similar question

01

A continuous haploid selection model satisfies dpdt=s⋅p(1−p)\frac{dp}{dt} = s \cdot p(1 - p). If an advantageous allele has selection coefficient s=0.050s = 0.050, how many generations are required for its frequency to increase from p0=0.10p_0 = 0.10 to pt=0.90p_t = 0.90?

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}.

02

In a chemostat, the frequency of an allele declines under negative selection according to dpdt=−s⋅p(1−p)\frac{dp}{dt} = -s \cdot p(1 - p) with s=0.010s = 0.010. Derive the time tt required for the allele frequency to drop from p0=0.80p_0 = 0.80 to pt=0.20p_t = 0.20, paying careful attention to the integration signs.

Answer

Separating variables gives ∫p0pt(1p+11−p)dp=−s∫0tdt  ⟹  [ln⁡(p1−p)]p0pt=−st\int_{p_0}^{p_t} \left(\frac{1}{p} + \frac{1}{1-p}\right)dp = -s \int_0^t dt \implies \left[\ln\left(\frac{p}{1-p}\right)\right]_{p_0}^{p_t} = -st. 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}.

03

A diploid population undergoes selection favoring a completely dominant beneficial allele AA with frequency pp, modeled by dpdt=s⋅p(1−p)2\frac{dp}{dt} = s \cdot p(1 - p)^2. Write down the partial fraction decomposition needed to integrate ∫dpp(1−p)2\int \frac{dp}{p(1 - p)^2} and find its antiderivative.

Answer

Decomposition: 1p(1−p)2=1p+11−p+1(1−p)2\frac{1}{p(1-p)^2} = \frac{1}{p} + \frac{1}{1-p} + \frac{1}{(1-p)^2}. Integrating each term gives: ∫1p dp=ln⁡∣p∣\int \frac{1}{p}\,dp = \ln|p|, ∫11−p dp=−ln⁡∣1−p∣\int \frac{1}{1-p}\,dp = -\ln|1-p|, and ∫(1−p)−2 dp=11−p\int (1-p)^{-2}\,dp = \frac{1}{1-p}. Combining terms gives ln⁡∣p1−p∣+11−p+C\ln\left|\frac{p}{1-p}\right| + \frac{1}{1-p} + C.

Loading workspace…