Reviewing some basic ideas in differential equations.
Author
Andy Grogan-Kaylor
Published
November 25, 2023
1 Background
In this handout, we consider several simple differential equations that characterize growth. We then consider the solution of each differential equation in terms of \(y\) as a function of \(x\).
For logistic growth, I also consider a \(dp/dx\) formulation.
2 Constant (Linear) Growth
There is a constant rate of growth, expressed by \(k\).
Code
x <-seq(1,10)y1 <-as.numeric(x)mydata1 <-data.frame(x, y1)plinear <-ggplot(data = mydata1,aes(x = x,y = y1,group =1)) +geom_line(linewidth =2, color ="grey") +geom_point(aes(frame = x), color ="deepskyblue", size =3) +labs(title ="Constant Growth")
\[\frac{dy}{dx} = k\]
implies
\[y = kx + C\]
Code
plinearB <- plinear +labs(subtitle ="y Grows Linearly As A Function Of x",y ="y")ggplotly(plinearB)
3 Exponential Growth
Growth is a function of \(y\).
Code
x <-seq(1, 10, .5)y2 <-exp(x)mydata2 <-data.frame(x, y2)pexponential <-ggplot(data = mydata2,aes(x = x,y = y2,group =1)) +geom_line(linewidth =2, color ="grey") +geom_point(aes(frame = x), color ="deepskyblue", size =3) +labs(title ="Exponential Growth")
\[\frac{dy}{dx} = y\]
implies
\[y = e^x + C\]
Code
pexponentialB <- pexponential +labs(subtitle ="y Grows Exponentially As A Function Of x",y ="y")ggplotly(pexponentialB)
4 Logistic Growth
Growth is initially approximately exponential, but then tapers off as \(y\) approaches some limiting value.