Show pageOld revisionsBacklinksAdd to bookExport to PDFODT exportBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. <WRAP tabs> * [[en:ecovirt:roteiro:math:exponencial|{{:ecovirt:logcalc.jpg?20|}}]] * [[en:ecovirt:roteiro:math:exponencialr|{{:ecovirt:rlogo.png?30|}}]] </WRAP> <html> <script src="https://sagecell.sagemath.org/static/jquery.min.js"></script> <script src="https://sagecell.sagemath.org/static/embedded_sagecell.js"></script> <script> sagecell.makeSagecell({inputLocation: '.groupone', linked: true, languages: ["maxima"]}) </script> </html> ====== 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: <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") </code> {{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}} <code> ## 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 </code> {{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}} <code> ########################## #### 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 </code> {{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}} en/ecovirt/roteiro/math/exponencialr.txt Last modified: 2017/08/29 19:08by 127.0.0.1