* [[en:ecovirt:roteiro:math:exponencial|{{:ecovirt:logcalc.jpg?20|}}]] * [[en:ecovirt:roteiro:math:exponencialr|{{:ecovirt:rlogo.png?30|}}]] ====== Growth rates and the exponential function - Tutorial in R====== {{section>en:ecovirt:roteiro:math:exponencial_base#growth_rates_and_the_exponential_function}} ===== From discrete to continuous time ===== {{section>en:ecovirt:roteiro:math:exponencial_base#from_discrete_to_continuous_time}} == If you want to reproduce the plot == Open R and paste the code: time=1:10 nbact= c(2,4,8,16,32,64,128,256, 512,1024) plot(time, nbact, main="Bacterial growth", ylab= "number of bacteria", pch=16, col="red",cex.main=1.5, cex=1.5,cex.lab=1.5, cex.axis=1.5,bty="l") {{section>en:ecovirt:roteiro:math:exponencial_base#continuacao_tempo_discreto}} ==== Intuitive notion for derivatives ==== {{section>en:ecovirt:roteiro:math:exponencial_base#Intuitive_notion_for_derivatives}} ## t=1 time=1 ##let's create a vector with the delta t values decreasing dt=c(0.5,0.1,0.01,0.001,0.0001,0.00001,0.000001) tdt=time+dt Nt=time^2 Ntdt=tdt^2 (Ntdt-Nt)/dt {{section>en:ecovirt:roteiro:math:exponencial_base#continua_nocao_de_derivada}} ===Definition of a derivative=== {{section>en:ecovirt:roteiro:math:exponencial_base#definicao_de_uma_derivada}} ===== Exponential growth ===== {{section>en:ecovirt:roteiro:math:exponencial_base#crescimento_exponencial}} ==== The exponential function ==== {{section>en:ecovirt:roteiro:math:a_funcao_exponencial}} ########################## #### Continous growth #### ########################## n<- c(0:100, 200, 500,1000, 10000, 100000,1e+10) N0 <- 2 rd1 <- 1 N1<-N0* (1+ rd1/n)^n N1_N0= N1[length(N1)]/N0 plot(1:103, N1[1:103]/N0, type="l") text(x=50, y=2.5, labels= paste("Maximum = ", N1[length(N1)/N0])) N1_N0 {{section>en:ecovirt:roteiro:math:continua_funcao_exponencial}} ==== Duplication time ==== {{section>en:ecovirt:roteiro:math:exponencial_base#tempo_de_duplicacao}} ===== Exercises ===== {{section>en:ecovirt:roteiro:math:exponencial_base#exercises}} ===== To know more ===== {{section>en:ecovirt:roteiro:math:exponencial_base#to_know_more}} {{tag>R maxima uma_população crescimento_exponencial tempo_discreto tempo_contínuo equação_diferencial}}