Taylor Series and Finite Differences

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so taylor series are a way of approximating a function around the central point x here you see the definition f of x plus dx is equal of f of x plus uh some polynomials and dx containing the first second third derivative and another term containing the factorials now i would like to start with an example approximating the cosine function between defined between -10 and 10 and here you see an example of the function itself first and then we basically have showed the approximation so the the taylor series for that function with increasing order terms and we see that the approximation gets better and better the more terms we add so that's a very powerful method that's actually used almost everywhere in in natural sciences but does that help us to understand the accuracy of the finite difference approximation yes it does let's start with the original definition and we have f of x plus dx on the left hand side so we subtract f of x and we divide by dx and then we're left on the right hand side with f prime which is the first derivative plus some additional terms now what happens if we neglect these additional terms and you see the terms actually start with an order one so that basically means and we describe that with o of dx that's a descriptive of the order terms and if we neglect those terms we actually again we've seen this before we have to replace the equal sign by an approximate sign but now we have a quantitative answer to the question how accurate we are we're actually accurate to first order ndx and that's very important later to quantify in general the solution of a numerical approximations to partial differential equations at least for the finite difference method so we learned the way of approximating first derivatives but sometimes actually quite often we also have higher derivatives second third derivatives in the equations describing our physical phenomena so what about that situation let's start with the second derivative so again let's go to a simple case we have a function which is shown here and we now know how to estimate the first derivative at points x x plus dx or x minus dx so if we know uh if we already have calculated a an approximation of the first derivative at those points can we not simply take the derivative of those first derivatives the calculated at two different points and divide again by the grid increment or the grid distance between those two points dx or 2 dx to obtain a a second derivative and that's what we're going to do next so let's take our three points that we see here and let's first use the the two right points to calculate a first derivative between f of x plus dx minus f of x divided by dx and we calculate another derivative to the to the left f of x minus f of x minus dx divided by dx actually those two derivatives are defined at the points x plus dx over 2 and x minus dx over 2 but let's not worry about this for the moment but knowing this we can now write down the difference between these first derivatives and divide by dx because that's the distance between these these two points where we calculated the first derivative so with a little bit of algebra uh we end up with a definition of an approximation for the second derivative so the second derivative at point x is equal to and we have in the um above we have f of x plus dx minus 2 f of x plus f of x minus dx divided by dx square again there must be an approximate sign because certainly this is not an exact second derivative but actually in the next step we're going to learn a way a very different way a very elegant formal way of deriving these operators as we call them finite difference stencils is another way of describing them using again the taylor series
Info
Channel: LMU Seismology
Views: 21,654
Rating: undefined out of 5
Keywords:
Id: RdzjaPOzq2s
Channel Id: undefined
Length: 5min 18sec (318 seconds)
Published: Sat Oct 24 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.