Skip to main content

LUP Student Papers

LUND UNIVERSITY LIBRARIES

A Python Implementation of Explicit 2-step Methods

Persson, Kevin LU (2015) In Bachelor's Theses in Mathematical Sciences NUMK01 20151
Mathematics (Faculty of Engineering)
Abstract
This paper shows the Python implementation of a new way of constructing a variable multistep ODE solver which is not based on extending fixed step-size methods but rather on defining interpolation and collocation conditions for each new point. The implementation allows for any explicit 2-step method of order 2.
Popular Abstract
Companies often want to solve different kinds of problems that require numerical solutions. Some of those problems can be modeled with ordinary differential equations. Often, to solve these problems, the calculations are long and very hard, so they need special methods and the use of computers. That is why there exist numerical methods so that the computer can solve the equation for you. One special kind of differential equation is called the initial value problem. This paper will be about converting a code for solving initial value problems from a language called Matlab into another program language called Python.


Since Matlab is a paid source and Python is an open source, which means that everybody can use it, converting this code... (More)
Companies often want to solve different kinds of problems that require numerical solutions. Some of those problems can be modeled with ordinary differential equations. Often, to solve these problems, the calculations are long and very hard, so they need special methods and the use of computers. That is why there exist numerical methods so that the computer can solve the equation for you. One special kind of differential equation is called the initial value problem. This paper will be about converting a code for solving initial value problems from a language called Matlab into another program language called Python.


Since Matlab is a paid source and Python is an open source, which means that everybody can use it, converting this code into Python will result in a larger exposure of the method. The code constructs piecewise polynomials of degree 2 in order to solve the initial value problem. This is a novel technique that has not been used before.


By just changing one parameter in the code all variable step-size explicit methods of order 2 for solving initial value problems can be obtained. This paper also shows which methods are stable and runs different tests to check if the code is working properly. In the end we have implemented a new numerical way of solving the initial value problem. (Less)
Please use this url to cite or link to this publication:
author
Persson, Kevin LU
supervisor
organization
course
NUMK01 20151
year
type
M2 - Bachelor Degree
subject
publication/series
Bachelor's Theses in Mathematical Sciences
report number
LUNFNA-4004-2015
ISSN
1654-6229
other publication id
2015:K6
language
English
id
7356736
date added to LUP
2016-08-25 15:39:32
date last changed
2016-08-25 15:39:32
@misc{7356736,
  abstract     = {{This paper shows the Python implementation of a new way of constructing a variable multistep ODE solver which is not based on extending fixed step-size methods but rather on defining interpolation and collocation conditions for each new point. The implementation allows for any explicit 2-step method of order 2.}},
  author       = {{Persson, Kevin}},
  issn         = {{1654-6229}},
  language     = {{eng}},
  note         = {{Student Paper}},
  series       = {{Bachelor's Theses in Mathematical Sciences}},
  title        = {{A Python Implementation of Explicit 2-step Methods}},
  year         = {{2015}},
}