Git Product home page Git Product logo

savarsinha123 / numerical-methods Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.53 MB

This repo contains implementations of several numerical methods in MATLAB.

MATLAB 100.00%
backward-euler differential-equations discrete-fourier-transform forward-euler matlab mullers-method newton-raphson numerical-integration numerical-methods numerical-optimization polynomial-solvers runge-kutta gaussian-quadrature monte-carlo

numerical-methods's Introduction

numerical-methods

This repository contains a collection of implementations of various numerical methods such as Newton-Raphson, backward Euler, and discrete Fourier transform.

Roots

Newton-Raphson

This root-finding method iteratively moves towards the root of a function starting from an initial guess by using the derivative of the function. If the initial guess is real and the function itself maps reals to reals, then the roots found will only be restricted to the real domain. See here for more info: https://en.wikipedia.org/wiki/Newton%27s_method

Muller's Method

This root-finding algorithm locates the roots of a function by interpolating a quadratic through three points of the given function and recursively approximating the root of the function using the roots of this quadratic. Since a quadratic function is used, this method can also find complex roots. See here for more info: https://en.wikipedia.org/wiki/Muller%27s_method

Differential Equations

Forward Euler

Forward Euler uses linear approximations of the solution to the differential equation at each point to predict the next point at the next step. This is a method of order 1. See here for more info: https://en.wikipedia.org/wiki/Euler_method

Backward Euler

Backward Euler uses the evaluation of y' at the next step to compute the next value of y. This is a method of order 1. See here for more info: https://en.wikipedia.org/wiki/Backward_Euler_method

Runge-Kutta (RK4)

Runge-Kutta, in partiular the RK4 method, utilizes four different slopes to predict the next value of y at the next step. This is a fourth order method. See here for more info: https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods

Fourier Transform

Discrete Fourier Transform (DFT)

DFT represents a discretized version of the Fourier integral and is often encoded in a unitary matrix. See here for more info: https://en.wikipedia.org/wiki/Discrete_Fourier_transform https://en.wikipedia.org/wiki/DFT_matrix

Fast Fourier Transform (FFT)

FFT refers to any methods of calculating DFT that have complexity $O(n log(n))$ rather than $O(n^2)$, as is typically standard for simpler DFT methods. The discrete_fourier_transform.m file contains an implementation of the Cooley-Tukey Algorithm. See here for more info: https://en.wikipedia.org/wiki/Fast_Fourier_transform https://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm

Integration

Gauss-Legendre Quadrature

Gauss-Legendre Quadrature approximates an integral over the interval $[-1, 1]$ by approximating the integral as a weighted sum of function evaluations of the nth Legendre polynomial roots, where larger $n$ results in more accurate approximations. See here for more info: https://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_quadrature

Monte-Carlo Integration

Monte-Carlo integration refers to techniques which involve randomly sampling from the integration domain, computing the MLE for the expected value of the function, and then multiplying this mean by the volume of the subset. See here for more info: https://en.wikipedia.org/wiki/Monte_Carlo_integration

numerical-methods's People

Contributors

savarsinha123 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.