Numerical Methods Flashcards
Euler method use
Approximates the solution to a differential equation by finding a point on the y = f(x) solution curve and following the gradient
Euler method formula for point (xr, yr) and Δx h
y ≈ y + h(dy/dx)
r+1 r r
Midpoint method use
Finds a better approximation to a differential equation than Euler’s method by finding the gradient at the midpoint of the points
Midpoint method formula for (x ,y ) and Δx h
r-1 r-1
y ≈ y + 2h(dy/dx)
r+1 r-1 r
Can use Euler’s method for a second point to find (dy/dx)
r
Second order DE derivation
Write (d^2y/dx^2) as ((dy/dx) - (dy/dx) )/h
r+1 r
Replace with formulae for each dy/dx similarly and simplify
Second order DE formula for point (x ,y ) and Δx h
r-1 r-1
y ≈ 2y - y + h^2(d^2y/dx^2)
r+1 r r-1 r
Can use Euler’s method for a second point and then the midpoint formula
Could also use first and second derivatives to make simultaneous equations
Simpson’s rule formula for 2n strips of width h (n quadratics)
a
∫ f(x) dx ≈ h/3 ( y + 4 (y + y + … + y ) + 2(y + y + …
0 1 3 2n-1 2 4
+ y ) + y
2n-2 2n
b