SlideShare a Scribd company logo
A Note on Leapfrog
Integration
By Kai Xu
Last updated on 15 Dec 2016
The problem setting
Suppose we we want solve the following dynamic
system
= = F (x)
= = f(x) ≜ v
but we don't have an analytical solution to x(t).
Then we can approximate it using leapfrog
integration.
x¨
dt2
d x2
x˙
dt
dx
Leapfrog algorithm
The leapfrog integration algorithm iterates the
following three steps, given an initial state x(0):
1. x = x + v Δt
2. a = F (x)
3. v = v + a Δt
After n iterations with some time step Δt, the
sequence {x } is the approximatition of x(t) on
time period [0, nΔt].
i i−1 i− 2
1
i
i+ 2
1
i− 2
1 i
i
An example - problem setting
Suppose we are given
= = 2
v = = = 2x
and pretent to not know the analytical solution
x(t) = t ,
given initial state x(0) = 0.
x¨
dt2
d x2
x˙
dt
dx
2
An example - result
An example - Julia code
using Plots; pyplot()
F(x) = 2; f(x) = 2 * x; x(t) = t ^ 2
ts = 0:0.1:2; xs = map(t -> x(t), ts)
plot(ts, xs, lab="analytical", legendfont = font(13))
xᵢ = 0; dt = 0.1; v = f(xᵢ); ts = []; xs = []
for n in 1:20
xᵢ = xᵢ + v * dt
a = F(xᵢ)
v = v + a * dt
push!(ts, (n-1) * dt); push!(xs, xᵢ)
end
plot!(ts, xs, lab="leapfrog", legendfont = font(13))

More Related Content

What's hot

34032 green func
34032 green func34032 green func
34032 green func
ansarixxx
 
Eigen values and eigen vectors
Eigen values and eigen vectorsEigen values and eigen vectors
Eigen values and eigen vectors
Riddhi Patel
 
3. Linear Algebra for Machine Learning: Factorization and Linear Transformations
3. Linear Algebra for Machine Learning: Factorization and Linear Transformations3. Linear Algebra for Machine Learning: Factorization and Linear Transformations
3. Linear Algebra for Machine Learning: Factorization and Linear Transformations
Ceni Babaoglu, PhD
 
LinearAlgebra.ppt
LinearAlgebra.pptLinearAlgebra.ppt
LinearAlgebra.ppt
vijaykumar838577
 
Lu Decomposition
Lu DecompositionLu Decomposition
Lu Decomposition
MdAlAmin187
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
Premsankar Chakkingal
 
Chaotic system and its Application in Cryptography
Chaotic system and its Application in  CryptographyChaotic system and its Application in  Cryptography
Chaotic system and its Application in Cryptography
Muhammad Hamid
 
application of first order ordinary Differential equations
application of first order ordinary Differential equationsapplication of first order ordinary Differential equations
application of first order ordinary Differential equations
Emdadul Haque Milon
 
Langrange Interpolation Polynomials
Langrange Interpolation PolynomialsLangrange Interpolation Polynomials
Langrange Interpolation Polynomials
Sohaib H. Khan
 
Runge Kutta Method
Runge Kutta MethodRunge Kutta Method
Runge Kutta Method
ch macharaverriyya naidu
 
System Of Linear Equations
System Of Linear EquationsSystem Of Linear Equations
System Of Linear Equations
saahil kshatriya
 
Beta gamma functions
Beta gamma functionsBeta gamma functions
Beta gamma functions
Selvaraj John
 
Hamiltonian path
Hamiltonian pathHamiltonian path
Hamiltonian path
Arindam Ghosh
 
Differential calculus
Differential calculusDifferential calculus
Differential calculus
Shubham .
 
Linear algebra-Basis & Dimension
Linear algebra-Basis & DimensionLinear algebra-Basis & Dimension
Linear algebra-Basis & Dimension
Manikanta satyala
 
Application of-differential-equation-in-real-life
Application of-differential-equation-in-real-lifeApplication of-differential-equation-in-real-life
Application of-differential-equation-in-real-life
Razwanul Ghani
 
Fractional calculus and applications
Fractional calculus and applicationsFractional calculus and applications
Fractional calculus and applications
PlusOrMinusZero
 
Metric space
Metric spaceMetric space
Metric space
beenishbeenish
 
Stochastic Processes - part 1
Stochastic Processes - part 1Stochastic Processes - part 1
Stochastic Processes - part 1
HAmindavarLectures
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
Manikanta satyala
 

What's hot (20)

34032 green func
34032 green func34032 green func
34032 green func
 
Eigen values and eigen vectors
Eigen values and eigen vectorsEigen values and eigen vectors
Eigen values and eigen vectors
 
3. Linear Algebra for Machine Learning: Factorization and Linear Transformations
3. Linear Algebra for Machine Learning: Factorization and Linear Transformations3. Linear Algebra for Machine Learning: Factorization and Linear Transformations
3. Linear Algebra for Machine Learning: Factorization and Linear Transformations
 
LinearAlgebra.ppt
LinearAlgebra.pptLinearAlgebra.ppt
LinearAlgebra.ppt
 
Lu Decomposition
Lu DecompositionLu Decomposition
Lu Decomposition
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Chaotic system and its Application in Cryptography
Chaotic system and its Application in  CryptographyChaotic system and its Application in  Cryptography
Chaotic system and its Application in Cryptography
 
application of first order ordinary Differential equations
application of first order ordinary Differential equationsapplication of first order ordinary Differential equations
application of first order ordinary Differential equations
 
Langrange Interpolation Polynomials
Langrange Interpolation PolynomialsLangrange Interpolation Polynomials
Langrange Interpolation Polynomials
 
Runge Kutta Method
Runge Kutta MethodRunge Kutta Method
Runge Kutta Method
 
System Of Linear Equations
System Of Linear EquationsSystem Of Linear Equations
System Of Linear Equations
 
Beta gamma functions
Beta gamma functionsBeta gamma functions
Beta gamma functions
 
Hamiltonian path
Hamiltonian pathHamiltonian path
Hamiltonian path
 
Differential calculus
Differential calculusDifferential calculus
Differential calculus
 
Linear algebra-Basis & Dimension
Linear algebra-Basis & DimensionLinear algebra-Basis & Dimension
Linear algebra-Basis & Dimension
 
Application of-differential-equation-in-real-life
Application of-differential-equation-in-real-lifeApplication of-differential-equation-in-real-life
Application of-differential-equation-in-real-life
 
Fractional calculus and applications
Fractional calculus and applicationsFractional calculus and applications
Fractional calculus and applications
 
Metric space
Metric spaceMetric space
Metric space
 
Stochastic Processes - part 1
Stochastic Processes - part 1Stochastic Processes - part 1
Stochastic Processes - part 1
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
 

Viewers also liked

sscm 1703 - persamaan terbitan 1 - tutorial 2
sscm 1703 - persamaan terbitan 1 - tutorial 2sscm 1703 - persamaan terbitan 1 - tutorial 2
sscm 1703 - persamaan terbitan 1 - tutorial 2
hakimgear
 
sscm 1703 - persamaan terbitan 1 - tutorial 4
sscm 1703 - persamaan terbitan 1 - tutorial 4sscm 1703 - persamaan terbitan 1 - tutorial 4
sscm 1703 - persamaan terbitan 1 - tutorial 4
hakimgear
 
Chapter 3 mathematical modeling
Chapter 3 mathematical modelingChapter 3 mathematical modeling
Chapter 3 mathematical modeling
Bin Biny Bino
 
Mathematical modelling
Mathematical modellingMathematical modelling
Mathematical modelling
NandiniNandus
 
mathematical model
mathematical modelmathematical model
mathematical model
Kt Silva
 
HIPERFREQÜENTADORS VERSUS NORMOFREQÜENTADORS EN ATENCIÓ PRIMÀRIA DE SALUT: Fa...
HIPERFREQÜENTADORS VERSUS NORMOFREQÜENTADORS EN ATENCIÓ PRIMÀRIA DE SALUT: Fa...HIPERFREQÜENTADORS VERSUS NORMOFREQÜENTADORS EN ATENCIÓ PRIMÀRIA DE SALUT: Fa...
HIPERFREQÜENTADORS VERSUS NORMOFREQÜENTADORS EN ATENCIÓ PRIMÀRIA DE SALUT: Fa...lprats
 
Feebbo encuesta online mexico buen fin nov 2013
Feebbo encuesta online mexico buen fin nov 2013Feebbo encuesta online mexico buen fin nov 2013
Feebbo encuesta online mexico buen fin nov 2013
Feebbo México
 
Lectio Divina Dominical III de Cuaresma Ciclo A
Lectio Divina Dominical III de Cuaresma Ciclo ALectio Divina Dominical III de Cuaresma Ciclo A
Lectio Divina Dominical III de Cuaresma Ciclo A
Cristonautas
 
Formulario vigas
Formulario vigasFormulario vigas
Formulario vigas
engineiii
 
El agua2
El agua2El agua2
El agua2
krt45
 
CONSUM D’ALCOHOL EN ADOLESCENTS DEL BAGES SUD
CONSUM D’ALCOHOL EN ADOLESCENTS DEL BAGES SUDCONSUM D’ALCOHOL EN ADOLESCENTS DEL BAGES SUD
CONSUM D’ALCOHOL EN ADOLESCENTS DEL BAGES SUDlprats
 
!!!!!!!!!90
!!!!!!!!!90!!!!!!!!!90
!!!!!!!!!90
Tatyana Remayeva
 

Viewers also liked (13)

sscm 1703 - persamaan terbitan 1 - tutorial 2
sscm 1703 - persamaan terbitan 1 - tutorial 2sscm 1703 - persamaan terbitan 1 - tutorial 2
sscm 1703 - persamaan terbitan 1 - tutorial 2
 
sscm 1703 - persamaan terbitan 1 - tutorial 4
sscm 1703 - persamaan terbitan 1 - tutorial 4sscm 1703 - persamaan terbitan 1 - tutorial 4
sscm 1703 - persamaan terbitan 1 - tutorial 4
 
Chapter 3 mathematical modeling
Chapter 3 mathematical modelingChapter 3 mathematical modeling
Chapter 3 mathematical modeling
 
Mathematical modelling
Mathematical modellingMathematical modelling
Mathematical modelling
 
mathematical model
mathematical modelmathematical model
mathematical model
 
HIPERFREQÜENTADORS VERSUS NORMOFREQÜENTADORS EN ATENCIÓ PRIMÀRIA DE SALUT: Fa...
HIPERFREQÜENTADORS VERSUS NORMOFREQÜENTADORS EN ATENCIÓ PRIMÀRIA DE SALUT: Fa...HIPERFREQÜENTADORS VERSUS NORMOFREQÜENTADORS EN ATENCIÓ PRIMÀRIA DE SALUT: Fa...
HIPERFREQÜENTADORS VERSUS NORMOFREQÜENTADORS EN ATENCIÓ PRIMÀRIA DE SALUT: Fa...
 
Feebbo encuesta online mexico buen fin nov 2013
Feebbo encuesta online mexico buen fin nov 2013Feebbo encuesta online mexico buen fin nov 2013
Feebbo encuesta online mexico buen fin nov 2013
 
Lectio Divina Dominical III de Cuaresma Ciclo A
Lectio Divina Dominical III de Cuaresma Ciclo ALectio Divina Dominical III de Cuaresma Ciclo A
Lectio Divina Dominical III de Cuaresma Ciclo A
 
Formulario vigas
Formulario vigasFormulario vigas
Formulario vigas
 
El agua2
El agua2El agua2
El agua2
 
CONSUM D’ALCOHOL EN ADOLESCENTS DEL BAGES SUD
CONSUM D’ALCOHOL EN ADOLESCENTS DEL BAGES SUDCONSUM D’ALCOHOL EN ADOLESCENTS DEL BAGES SUD
CONSUM D’ALCOHOL EN ADOLESCENTS DEL BAGES SUD
 
C I N E R A R I A
C I N E R A R I AC I N E R A R I A
C I N E R A R I A
 
!!!!!!!!!90
!!!!!!!!!90!!!!!!!!!90
!!!!!!!!!90
 

Similar to A Note on Leapfrog Integration

5.n nmodels i
5.n nmodels i5.n nmodels i
Integral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerIntegral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewer
JoshuaAgcopra
 
Introduction to PyTorch
Introduction to PyTorchIntroduction to PyTorch
Introduction to PyTorch
Jun Young Park
 
ppt - Deep Learning From Scratch.pdf
ppt - Deep Learning From Scratch.pdfppt - Deep Learning From Scratch.pdf
ppt - Deep Learning From Scratch.pdf
surefooted
 
Introduction to Neural Networks and Deep Learning from Scratch
Introduction to Neural Networks and Deep Learning from ScratchIntroduction to Neural Networks and Deep Learning from Scratch
Introduction to Neural Networks and Deep Learning from Scratch
Ahmed BESBES
 
Consider the system.docx
Consider the system.docxConsider the system.docx
Consider the system.docx
honeyarguelles
 
Function Approx2009
Function Approx2009Function Approx2009
Function Approx2009
Imthias Ahamed
 
Math 5 problem set
Math 5 problem setMath 5 problem set
Math 5 problem set
bowsandarrows
 
Math 5 problem set
Math 5 problem setMath 5 problem set
Math 5 problem set
potassium2012
 
Calculus - Functions Review
Calculus - Functions ReviewCalculus - Functions Review
Calculus - Functions Review
hassaanciit
 
Ada boost
Ada boostAda boost
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03
Rediet Moges
 
Calculus 08 techniques_of_integration
Calculus 08 techniques_of_integrationCalculus 08 techniques_of_integration
Calculus 08 techniques_of_integration
tutulk
 
matlab lecture 4 solving mathematical problems.ppt
matlab lecture 4 solving mathematical problems.pptmatlab lecture 4 solving mathematical problems.ppt
matlab lecture 4 solving mathematical problems.ppt
aaaaboud1
 
alt klausur
alt klausuralt klausur
alt klausur
zhongchengdai
 
Integration by Parts, Part 3
Integration by Parts, Part 3Integration by Parts, Part 3
Integration by Parts, Part 3
Pablo Antuna
 
stochastic processes assignment help
stochastic processes assignment helpstochastic processes assignment help
stochastic processes assignment help
Statistics Homework Helper
 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
jacksnathalie
 
mathFin01
mathFin01mathFin01
mathFin01
wuchang69
 
The Perceptron (D1L2 Deep Learning for Speech and Language)
The Perceptron (D1L2 Deep Learning for Speech and Language)The Perceptron (D1L2 Deep Learning for Speech and Language)
The Perceptron (D1L2 Deep Learning for Speech and Language)
Universitat Politècnica de Catalunya
 

Similar to A Note on Leapfrog Integration (20)

5.n nmodels i
5.n nmodels i5.n nmodels i
5.n nmodels i
 
Integral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerIntegral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewer
 
Introduction to PyTorch
Introduction to PyTorchIntroduction to PyTorch
Introduction to PyTorch
 
ppt - Deep Learning From Scratch.pdf
ppt - Deep Learning From Scratch.pdfppt - Deep Learning From Scratch.pdf
ppt - Deep Learning From Scratch.pdf
 
Introduction to Neural Networks and Deep Learning from Scratch
Introduction to Neural Networks and Deep Learning from ScratchIntroduction to Neural Networks and Deep Learning from Scratch
Introduction to Neural Networks and Deep Learning from Scratch
 
Consider the system.docx
Consider the system.docxConsider the system.docx
Consider the system.docx
 
Function Approx2009
Function Approx2009Function Approx2009
Function Approx2009
 
Math 5 problem set
Math 5 problem setMath 5 problem set
Math 5 problem set
 
Math 5 problem set
Math 5 problem setMath 5 problem set
Math 5 problem set
 
Calculus - Functions Review
Calculus - Functions ReviewCalculus - Functions Review
Calculus - Functions Review
 
Ada boost
Ada boostAda boost
Ada boost
 
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03
 
Calculus 08 techniques_of_integration
Calculus 08 techniques_of_integrationCalculus 08 techniques_of_integration
Calculus 08 techniques_of_integration
 
matlab lecture 4 solving mathematical problems.ppt
matlab lecture 4 solving mathematical problems.pptmatlab lecture 4 solving mathematical problems.ppt
matlab lecture 4 solving mathematical problems.ppt
 
alt klausur
alt klausuralt klausur
alt klausur
 
Integration by Parts, Part 3
Integration by Parts, Part 3Integration by Parts, Part 3
Integration by Parts, Part 3
 
stochastic processes assignment help
stochastic processes assignment helpstochastic processes assignment help
stochastic processes assignment help
 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
 
mathFin01
mathFin01mathFin01
mathFin01
 
The Perceptron (D1L2 Deep Learning for Speech and Language)
The Perceptron (D1L2 Deep Learning for Speech and Language)The Perceptron (D1L2 Deep Learning for Speech and Language)
The Perceptron (D1L2 Deep Learning for Speech and Language)
 

Recently uploaded

Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...
Leonel Morgado
 
The debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically youngThe debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically young
Sérgio Sacani
 
HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1
Shashank Shekhar Pandey
 
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdfMending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Selcen Ozturkcan
 
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
PsychoTech Services
 
Direct Seeded Rice - Climate Smart Agriculture
Direct Seeded Rice - Climate Smart AgricultureDirect Seeded Rice - Climate Smart Agriculture
Direct Seeded Rice - Climate Smart Agriculture
International Food Policy Research Institute- South Asia Office
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
Aditi Bajpai
 
Gadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdfGadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdf
PirithiRaju
 
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of ProteinsGBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
Areesha Ahmad
 
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills MN
 
Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
Leonel Morgado
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
MaheshaNanjegowda
 
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
Advanced-Concepts-Team
 
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
frank0071
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
PRIYANKA PATEL
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
PirithiRaju
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
Sérgio Sacani
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
Carl Bergstrom
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
Frédéric Baudron
 
Eukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptxEukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptx
RitabrataSarkar3
 

Recently uploaded (20)

Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...
 
The debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically youngThe debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically young
 
HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1
 
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdfMending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
 
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
 
Direct Seeded Rice - Climate Smart Agriculture
Direct Seeded Rice - Climate Smart AgricultureDirect Seeded Rice - Climate Smart Agriculture
Direct Seeded Rice - Climate Smart Agriculture
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
 
Gadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdfGadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdf
 
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of ProteinsGBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
 
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
 
Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
 
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
 
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
 
Eukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptxEukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptx
 

A Note on Leapfrog Integration

  • 1. A Note on Leapfrog Integration By Kai Xu Last updated on 15 Dec 2016
  • 2. The problem setting Suppose we we want solve the following dynamic system = = F (x) = = f(x) ≜ v but we don't have an analytical solution to x(t). Then we can approximate it using leapfrog integration. x¨ dt2 d x2 x˙ dt dx
  • 3. Leapfrog algorithm The leapfrog integration algorithm iterates the following three steps, given an initial state x(0): 1. x = x + v Δt 2. a = F (x) 3. v = v + a Δt After n iterations with some time step Δt, the sequence {x } is the approximatition of x(t) on time period [0, nΔt]. i i−1 i− 2 1 i i+ 2 1 i− 2 1 i i
  • 4. An example - problem setting Suppose we are given = = 2 v = = = 2x and pretent to not know the analytical solution x(t) = t , given initial state x(0) = 0. x¨ dt2 d x2 x˙ dt dx 2
  • 5. An example - result
  • 6. An example - Julia code using Plots; pyplot() F(x) = 2; f(x) = 2 * x; x(t) = t ^ 2 ts = 0:0.1:2; xs = map(t -> x(t), ts) plot(ts, xs, lab="analytical", legendfont = font(13)) xᵢ = 0; dt = 0.1; v = f(xᵢ); ts = []; xs = [] for n in 1:20 xᵢ = xᵢ + v * dt a = F(xᵢ) v = v + a * dt push!(ts, (n-1) * dt); push!(xs, xᵢ) end plot!(ts, xs, lab="leapfrog", legendfont = font(13))