The Derivative of a Function

Similar documents
Derivatives and the Product Rule

Newton s Cooling Model in Matlab and the Cooling Project!

Mathematical Induction

Sin, Cos and All That

Sin, Cos and All That

Generating Function Notes , Fall 2005, Prof. Peter Shor

Introduction to Algebra: The First Week

Predator - Prey Model Trajectories and the nonlinear conservation law

Sequences and infinite series

Descriptive Statistics (And a little bit on rounding and significant digits)

Chapter 1 Review of Equations and Inequalities

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2:

Conditional probabilities and graphical models

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

CS1800: Sequences & Sums. Professor Kevin Gold

Instructor (Brad Osgood)

Consequences of Continuity

Solving Quadratic & Higher Degree Equations

Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore

Section 4.6 Negative Exponents

CIS 2033 Lecture 5, Fall

Algebra Exam. Solutions and Grading Guide

Math 138: Introduction to solving systems of equations with matrices. The Concept of Balance for Systems of Equations

Lesson 21 Not So Dramatic Quadratics

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Lecture for Week 2 (Secs. 1.3 and ) Functions and Limits

Mathematical Induction Again

Alex s Guide to Word Problems and Linear Equations Following Glencoe Algebra 1

Finding Limits Graphically and Numerically

MITOCW ocw-18_02-f07-lec02_220k

c 2007 Je rey A. Miron

TheFourierTransformAndItsApplications-Lecture28

Algebra & Trig Review

Mathematical Induction Again

8.3 Partial Fraction Decomposition

Select/Special Topics in Atomic Physics Prof. P. C. Deshmukh Department of Physics Indian Institute of Technology, Madras

MA 510 ASSIGNMENT SHEET Spring 2009 Text: Vector Calculus, J. Marsden and A. Tromba, fifth edition

Quadratic Equations Part I

Pre-calculus is the stepping stone for Calculus. It s the final hurdle after all those years of

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Lines and Their Equations

Project One: C Bump functions

O.K. But what if the chicken didn t have access to a teleporter.

Lecture 4: Constructing the Integers, Rationals and Reals

Mathematics-I Prof. S.K. Ray Department of Mathematics and Statistics Indian Institute of Technology, Kanpur. Lecture 1 Real Numbers

Riemann Sums. Outline. James K. Peterson. September 15, Riemann Sums. Riemann Sums In MatLab

Project Two. James K. Peterson. March 26, Department of Biological Sciences and Department of Mathematical Sciences Clemson University

MITOCW watch?v=y6ma-zn4olk

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

Pattern Recognition Prof. P. S. Sastry Department of Electronics and Communication Engineering Indian Institute of Science, Bangalore

Please bring the task to your first physics lesson and hand it to the teacher.

TAYLOR POLYNOMIALS DARYL DEFORD

Lecture 4: Training a Classifier

Convergence of Fourier Series

DIFFERENTIAL EQUATIONS

Project Two. Outline. James K. Peterson. March 27, Cooling Models. Estimating the Cooling Rate k. Typical Cooling Project Matlab Session

Sequence convergence, the weak T-axioms, and first countability

( )( b + c) = ab + ac, but it can also be ( )( a) = ba + ca. Let s use the distributive property on a couple of

Predator - Prey Model Trajectories are periodic

Stephen F Austin. Exponents and Logarithms. chapter 3

Big-oh stuff. You should know this definition by heart and be able to give it,

Main topics for the First Midterm Exam

Implicit Differentiation Applying Implicit Differentiation Applying Implicit Differentiation Page [1 of 5]

Math 5a Reading Assignments for Sections

Antiderivatives! Outline. James K. Peterson. January 28, Antiderivatives. Simple Fractional Power Antiderivatives

Introduction. So, why did I even bother to write this?

Regression, part II. I. What does it all mean? A) Notice that so far all we ve done is math.

Lesson 3-2: Solving Linear Systems Algebraically

3 Algebraic Methods. we can differentiate both sides implicitly to obtain a differential equation involving x and y:

More Protein Synthesis and a Model for Protein Transcription Error Rates

Math 31 Lesson Plan. Day 5: Intro to Groups. Elizabeth Gillaspy. September 28, 2011

Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Antiderivatives! James K. Peterson. January 28, Department of Biological Sciences and Department of Mathematical Sciences Clemson University

Volume vs. Diameter. Teacher Lab Discussion. Overview. Picture, Data Table, and Graph

SYDE 112, LECTURE 7: Integration by Parts

Math Lecture 4 Limit Laws

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction

How to Use Calculus Like a Physicist

Linear Systems of ODE: Nullclines, Eigenvector lines and trajectories

One-to-one functions and onto functions

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Math 3C Midterm 1 Study Guide

Figure 1: Doing work on a block by pushing it across the floor.

MITOCW MITRES18_006F10_26_0602_300k-mp4

Sequences and Series

Edexcel AS and A Level Mathematics Year 1/AS - Pure Mathematics

the time it takes until a radioactive substance undergoes a decay

Evolution of quantitative traits

Predator - Prey Model Trajectories are periodic

Linear Systems of ODE: Nullclines, Eigenvector lines and trajectories

Take the Anxiety Out of Word Problems

Linear Algebra for Beginners Open Doors to Great Careers. Richard Han

The trick is to multiply the numerator and denominator of the big fraction by the least common denominator of every little fraction.

1 Rational Exponents and Radicals

Solution to Proof Questions from September 1st

Consequences of Continuity

MATH 320, WEEK 7: Matrices, Matrix Operations

Solving Quadratic & Higher Degree Equations

Assignment 16 Assigned Weds Oct 11

Lesson 5b Solving Quadratic Equations

Transcription:

The Derivative of a Function James K Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University March 1, 2017 Outline A Basic Evolutionary Model The Next Generation A Difference Equation The Functional Form of the Frequency Biology and the Model Abstracting Generation Time Change and More Change

Viability Selection Let s back up and approach the ideas of basic calculus by just looking at how far we can go with applying algebra alone We are going to look carefully at a model of natural selection called viability selection This is a model used in a typical Calculus for Biology course and is a nice example of applying limiting ideas These discussions come from a great book on evolutionary biology Mathematical Models of Social Evolution: A Guide for the Perplexed by McElreath and Body which we encourage you to pick up and study at some point We are interested in understanding the long term effects of genes in a population Obviously, it is very hard to even frame questions about this One of the benefits of our use of mathematics is that it allows us to build a very simplified model which nevertheless helps us understand general principles These are biological versions of the famous Einstein gedanken experiments: ie thought experiments which help develop intuition and clarity We start by assuming we have a population of N individuals at a given time It also seems reasonable to think of our time unit as generations So we would say the population at generation t is given by Nt Each adult has Q chromosomes and the reproduction process does not mix genetic information from another adult and hence the zygote formed by what is evidently some form of asexual reproduction also has Q chromosomes We also assume in each generation individuals go through their life cycle exactly the same: all individuals are born at the same time and all individuals reproduce at the same time We will call this a discrete dynamic Note a zygote does not have to live long enough to survive to an adult

Since we want to develop a very simple model we assume there are only two genotypes, type A and type B We also assume A is more likely to survive to an adult NA is the number of individuals of phenotype A and NB is the number of individuals of phenotype B in a given generation N is the number of individuals in the population and this number changes each generation as N NA + NB This is our first equation and note it is pretty simple It simply counts things Now if we really wanted to be careful, we might let t represent the generation we are in: ie we start at generation 0 so t 0 initially Then the first generation is t 1 and so forth So if we wanted to be really explicit, we would add the variable t to our equation above to get Nt NAt + NBt We also keep track of the fraction of individuals in the population that are genotype A or B This fraction is also called the frequency of type A and B respectively P A N A N A + N B P B N B N A + N B We can also explicitly add the generation variable t to get P At N At N At + N Bt P Bt N Bt N At + N Bt Individuals of each phenotype do not necessarily survive to adulthood so each survives to adulthood with a certain probability, V A and V B, respectively

We will keep track of how the frequency PA changes Let PAt be the frequency for A at generation t What is the frequency at the next generation t + 1? The number of zygotes from individuals of genotype A at generation t is assumed to be z NAt where z is the number of zygotes each individual of type A produces Note that z plays the role of the fertility of individuals of type A We assume individuals of type B also create z zygotes Hence, their fertility is also z So the number of zygotes of B type individuals is z NBt The frequency of A zygotes at generation t is then PAZ t z NAt z NAt + z NBt where we add an additional subscript to indicate we are looking at zygote frequencies Note the z s cancel to show us the frequency of A zygotes in the population does not depend on the value of z at all We have PAZ t NAt NAt + NBt PAt But not all zygotes survive to adulthood If we multiply numbers of zygotes by their probability of survival, VA or VB, the number of A zygotes that survive to adulthood is VA NAt and the number of B zygotes that survive to adulthood is VB NBt We see the frequency of A zygotes that survive to adulthood to give the generation t + 1 must be PAZSt + 1 VA NAt VA NAt + VB NBt where we have added yet another subscript S to indicate survival Note we add the generation label t + 1 to PAZS because this number is the frequency of adults that start generation t + 1

Also, note this fraction is exactly how we define our usual frequency of A at generation t + 1 Hence, we can say PAt + 1 VA NAt VA NAt + VB NBt Now for the final step From the way we define stuff, notice that PAt NAt NAt + NBt Now replace the denominator by Nt and multiply both sides by this denominator to get Nt PAt NAt Then consider the frequency for B Note 1 PAt 1 Getting a common denominator, we find NAt NAt + NBt 1 NAt Nt 1 PAt Nt NAt Nt But we can simplify Nt NAt to simply NBt Using this in the last equation, we have found that 1 PAt NBt Nt which leads to the identity we wanted: NBt 1 PAt Nt

This analysis works just fine at generation t + 1 too, but at that generation, we have NAt + 1 Nt VA PAt NBt + 1 Nt VB PBt Nt VB 1 PAt So we can say PAt + 1 NAt + 1 NAt + 1 + NBt + 1 PAt Nt VA PAt Nt VA + 1 PAtNt VB Cancelling the common Nt, we get PAt + 1 VA PAt This tells us how the frequency of the A genotype changes each generation Let VA 7 and VB 45 and assume PA0 03 Find PA1 Solution We know PA1 VA PA0 PA0 VA + 1 PA0 VB 7 003 7 003 + 45 097 00210 00210 + 04365 00459

We can also derive a formula for the change in frequency at each generation by doing a subtraction We consider PAt + 1 PAt VA PAt PAt Now the algebra gets a bit messy, but bear with us Get a common denominator next VA PAt PAt + 1 PAt PAt Multiply everything out and put into one big fraction PAt + 1 PAt VA PAt PAt VA PAt PAt 2 VA PAt 1 PAt VB Whew! Messy indeed Now factor a bit to get PAt + 1 PAt PAt PA 2 t VA PAt 1 PAt VB

Almost done As a final step note that PAt PA 2 t is the same as PAt 1 PAt So in the numerator of this complicated fraction, we can factor that term out to give PAt + 1 PAt PAt 1 PAt VA VB This is what is called a recursion equation For example, if the frequency of A in the population started at P0 p0, the change in frequency of A in the next generation is given by PA1 PA0 PA0 1 PA0 VA VB PA0 VA + 1 PA0 VB Substituting in the value p0 we find we can solve for PA1 as follows: PA1 p0 + p0 1 p0 VA VB p0 VA + 1 p0 VB and continuing in this vein, the frequency at generation 2 would be PA2 p1 + p1 1 p1 VA VB p1 VA + 1 p1 VB where we denote PA1 more simply by p1

Find the frequency of type A individuals at generation 1 if initially the frequency of A individuals is p0 01 with probabilities VA 8 and VB 3 Solution p0 1 p0 VA VB PA1 p0 + p0 VA + 1 p0 VB 001 099 08 03 001 + 001 08 + 099 03 00262 So the change in frequency of A is 00262 001 00162 with the new frequency given by PA1 00262 Let s derive a functional form for PAt We start with the number of A in the population initially, NA0 We know at the next generation, the number of A is NA1 Fertility of A number of A at generation 0 probability an A type lives to adulthood z NA0 VA NA2 number of A at generation 1 Fertility of A probability an A type lives to adulthood z NA1 VA z z NA0 VA VA NA0 z VA 2

We can do this over and over again You should note this argument is a relaxed version of POMI! We find NA3 NA0 z VA 3 NA4 NA0 z VA 4 We can easily extrapolate from this to see that, in general, a similar analysis shows us that NAt NA0 z VA t NBt NB0 z VB t We are now ready to figure out a functional form for PAt From the definition of the frequency for A, we have PAt NAt NAt + NBt Now divide top and bottom of this fraction by NAt to get PAt NAt NAt NAt+NB t NAt 1 NB t 1 + NAt Now plug in our formulae for NAt and NBt Note the fraction NBt NAt NB0 z VBt NA0 z VA t NB0 t VB NA0 VA

1 Using this in our frequency formula, we have PAt 1+ N B 0 N A 0 t V B VA Now let s learn how to use this formula Note we have derived this cool formula using just algebra and a lot of thinking! Find the frequency of type A individuals at generation 1 if initially the frequency of A individuals is p0 01 and the probabilities are VA 8 and VB 3 Solution Since p0 01, we can find the initial values NA0 and NB0 PA0 001 Thus, NA0 NA0+NB 0 1 1+ N B 0 N A 0 1 NB 0 001 1 + 1+ N B 0 NA0 1 001 N A 0 the probabilities, we find 1 PA1 1+ N B 0 N A 0 1 1 V B 1+990 3 VA 8 1 1+990 3 8 NB 0 100 and so NA0 99 Using 1 38125 00262 Let s step back a minute and ask what we are doing We have been interested in exploring how a population of two phenotypes spread throughout a population Since the size of the population can change at each generation, it is much more useful to look at the frequencies of each phenotype in the population We have developed a model that gives us insight into how this happens Recall our recursion equation for the A s change in frequency: PAt 1 PAt VA VB PAt + 1 PAt It is traditional in evolutionary biology to look at the denominator term and try to understand what it means biologically A common way to interpreting it is to tag the term PAt VA as the fitness of type A in the population and the other term, 1 PAt VB as the fitness of type B

Hence, the denominator term is like a weighted or average fitness of the entire population We often use a bar above a variable to indicate we are looking at that quantities average value The fitness is usually denoted by the variable w and hence, this denominator term is w To get additional insight, let s let the symbol PA represent the change PAt + 1 PAt; we read the symbol as change in Let s drop all the t labels so we can rewrite our recursion as PA PA 1 PA VA VB w Finally, we could do this sort of analysis for any phenotype not just type A So let s replace the specific term PA by just p Also the term VA VB is the difference in fitness between A and B Let s denote that by f where f represents fitness Then we can rewrite our recursion again as p p 1 p f w If we assume the difference in fitness is constant, then the amount of change in the frequency of A is determined by the leading term p 1 p To see what this means, consider the graph of p on the interval [0, 1] We don t need to use any other values of p as it is a frequency as so ranges from 0 to 1 Look at the graph below:

The largest value the product p 1 p can be seen by looking at the plot This maximum value occurs at p 05 Hence, the change in fitness is largest when the product p 1 p is largest If p is small or close to 1, the product p 1 p is also small We usually interpret our equation p p 1 p f w as the magnitude of natural selection acting on our population Hence, we can see that natural selection is made largest we say maximized when the product p 1 p is maximized It turns out the product p 1 p is known as the variance in genotypes in the population We are now ready to start discussing an important topic which is the smoothness of a function Recall, the frequency of type A individuals at generation t was given by PAt 1 NB 0 1 + NA0 VB VA t and the change from generation t to t + 1 was governed by the formula PAt + 1 PAt PAt 1 PAt VA VB

The length of a generation can vary widely So far we are just letting t denote the generation number and we have not paid attention to the average time a generation lasts Another way of looking at it is that we are implicitly thinking of our time unit as being a generation The actual duration of the generation was not needed in our thinking For convenience, let s switch variables now You need to get comfortable with the idea that we can choose to name our variables of interest as we see fit It is usually better to name them so that they mean something to you for the biology you are trying to study So in viability selection, variables and parameters like PA and NB were chosen to remind us of what they stood for However, that name choice is indeed arbitrary Switch PA to x and the ratio NB0/NA0 to simply a and the ratio VB/VA to just b and we have xt 1 1 + a b t This looks a lot simpler even though it says the same thing Our biological understanding of the viability selection problem tells us that b is not really arbitrary We know VB/VA < 1 because VB is smaller than VA We also know these values are between 0 and 1 as they are frequencies The same can be said for a; the initial values of NA and NB are positive and so a is some positive number So should say a bit more xt 1, where a > 0 and 0 < b < 1 1 + a bt Currently, xt is defined for a time unit that is generations, so it is easy to see that this formula defines a function which generates a value for any generation t whether t is measured in seconds, days, hours, weeks or years! It is really quite general Our viability selection model gives us a function which models the frequency of a choice of action for any t regardless of which unit is used to measure t

In fact, we could assume this formula works for any value of t We stop thinking of t measured in terms of integer mulriples of a time unit and extend our understanding of this formula by letting it be valid for any t Make no mistake, this is an abstraction as our arguments only worked for generations! We often make this step into abstraction as it allows us to bring powerful tools to bear on understanding our models that we can t use if we are restricted to finite time measurements In general, Build a model using units that are relevant for the biology Use generations, seasonal cycles and so forth Work hard to make the model realistic for you choice of units This is a hard but important step From your discrete time unit model, make the abstract jump to allow time to be any value at all With the model extended to all time values, apply tools that allow you to manipulate these models to gain insight These tools from Calculus include things like limiting behavior, smoothness issues called continuity and rate of change smoothness issues called differentiability Now continuity for our model roughly means the graph of our model with respect to time doesn t have jumps Well, of course, our model for generational time has jumps! The xt value simply jumps to the new value xt + 1 when we apply the formula The continuity issue arises when we pass to letting t be any number at all Another way of looking at it is that the generation time becomes smaller and smaller For example, the generation time for a virus or a bacteria is very small compared to the generation time of a human! So letting our model handle shrinking generation time seems reasonable and as the generation time shrinks, it makes sense that the jumps we see get smaller Continuity is roughly the idea that as the generation time shrinks to zero yeah, odd concept! the model we get has no jumps in it at all!

To get a feel for the differentiability thing, again we resort to passing to an abstract model from a discrete time one The frequency update law can be rewritten in terms of x also as xt 1 xt c d xt + 1 xt c xt + d 1 xt, c > d > 0, where we let c VA and d VB Now our time units are generations here, so t is really thought of as an integer So t + 1 t is always 1! Now rewrite what we have above as xt + 1 xt t + 1 t xt 1 xt c d c xt + d 1 xt Now let s start thinking about the size of that generation Now think of t + 1 t as One time unit Call this unit h just for fun So our general t is really some multiple of the generation time unit h Call it Nh for some N Then t + 1 N + 1h But it is easier to think of t + 1 as this: t + 1 Nh + h t + h! Thus, xt + h xt h xt 1 xt c d c xt + d 1 xt Now we are being a lot more clear about generation time An obvious question is what happens as the generation time, now measures as h, gets smaller and smaller If as we let h get really tiny, xt+h xt we find the fraction h approaches some stable number, we can be pretty confident that this stable number somehow represents an abstraction of the rate of change of x over a generation This shrinking of h and our look at the behavior of the fraction xt+h xt h as h shrinks is the basic idea of what having a derivative at a point means Of course, this model is very discrete and possesses jumps and this fraction makes no sense for time units smaller than the particular generation time we were using for our model But we want our models to be independent of the generation time unit, so we wonder we what happens to this ratio as the generation time unit shrinks Given our discussions so far, a reasonable thing to do is to ask what happens to this ratio as h gets smaller and smaller Now this particular example is very hard, so let s make up a very simple example strictly mathematical! and see how it would go

Let s simplify our life and choose the function f x x 2 Let s choose an h and consider the ratio f x + h f x x + h x Now we need to do some algebra We have f x + h f x x + h2 x 2 h h x + h 2 x 2 x 2 + 2 x h + h 2 x 2 2 x h + h 2 Plugging this into our fraction, we find f x + h f x x + h x f x + h f x x + h2 x 2 h h 2 x h + h2 h 2 x + h As h gets smaller and smaller, we see the limiting value is simply 2x We would say f x + h f x lim 2 x h 0 h This kind of limit works well for many functions f, including our function for the frequency of the gene of type A in the population if we assume our frequency function can be extended from being defined for just discrete generation times to all time which we routinely do It is such an important limiting process, it is given a special name: the derivative of f with respect to x We often write this difference of function values of f divided by differences in x values as f x, which of course hides a lot, and say lim x 0 f x 2 x The traditional symbol we use for this special limiting process is taken from the notation As h gets smaller and smaller, we use the symbol df dx to indicate we are taking this limit and write df dx lim x 0 f x 2 x More to come naturally, but this is all there is to derivatives We will add some graphical interpretations and other stuff but you have the idea now!

Write down the limit formula for the derivative of f x x 3 at x 2 using both the h and x forms Solution df dx 2 lim x 0 2+ x 3 2 3 x 2+h 2 3 limh 0 h Write down the limit formula for the derivative of f x x 4 at x 1 using both the h and x forms Solution df dx 1 lim x 0 1+ x 4 1 4 x 1+h 1 4 limh 0 h Write down the limit formula for the derivative of f x 2x 3 at x 4 using both the h and x forms Solution df 2 4 + x 3 2 4 3 4 lim dx x 0 x 2 4 + h 3 2 4 3 lim h 0 h

Homework 20 201 Find the minimum of f x 3 x + 3 + 8 x 4 two ways: first, graphically and second using subdifferentials as we have done in the examples in Lecture 19 202 Find the frequency of type A individuals at generation 1 and generation 2 given that initially the frequency of A individuals is p0 02 and the probabilities of A and b are VA 75 and VB 3 203 Find the frequency of type A individuals at generation 10 given that initially the frequency of A individuals is p0 04 and the probabilities of A and b are VA 65 and VB 2 204 Write down the limit formula for the derivative of f x 5x 2 at x 1 using both the h and x forms 205 Find the derivative of f x 2x 2 + 4x + 8 using the definition at x 3 206 Find the derivative of f x x 3 + 8 using the definition at x 1