CHAPTER 08.02: EULER METHOD OF SOLVING ODEs: Theory

 

In this segment, we're going to see that how we can find an integral, let's suppose if you have an integral like this, f of x dx, and how can you solve this particular integral by using Euler's method? Although we know that Euler's method is used mainly to be able to solve ordinary differential equations, but any of the methods which you're going to learn for solving initial value, ordinary differential equations can also be used to find out the values of the integrals. So let's go ahead and see that what is the basis of doing that. For the . . . there are two things which we have to understand about being able to solve an integral by using ordinary differential equation methods, and these are some fundamental theorems. So the first one is the first fundamental theorem of calculus. The first fundamental theorem of calculus basically tells you that if you have a continuous function going from a to b, then, and if F is the antiderivative of the function, then the value of the integral is given by this, so this uppercase F which you are seeing here is the antiderivative. So if the uppercase F is the antiderivative of the function, f, then when you integrate from a to b, you're simply going to get the value of the antiderivative at b, minus the antiderivative at a. The other thing which you have to realize in order to be able to see that how Euler's method, or other methods can be used to solve for integrals is the second fundamental theorem of calculus.  And these fundamental theorems of calculus which you are seeing, they are all from your differential and integral calculus class.  So in that case, what is says is that, hey, if you have a function, f of x, in interval . . . in an interval, D, let's suppose, then if a is a point, a is a point in D, so if you have a function, f of x, it's continuous in the interval, D, a is a point in that particular interval, D, then the . . . then if you have defined F of x, with uppercase F as a function of x is defined as the integral going from a to x, f of x dx, let's suppose, or maybe I should use some dummy variable here, because I am using x as the upper limit here, so f of t dt, let's suppose.  So if somebody is telling you that the integral of the function, f, lowercase f is from a to x, is defined by this particular function here, then we already know that, then the second fundamental theorem of calculus tells you the f prime of x is nothing but the function itself, the integrand itself.  So that's what the second fundamental theorem of calculus is telling you, this is what the first fundamental theorem of calculus is telling you, that if you know the antiderivative of the lowercase f, from a to b, is given as the uppercase F calculated at b minus the uppercase F function calculated at a, then the second fundamental theorem of calculus is basically telling you that if you have a function, f of x, which is continuous in the interval D, and a is some point in that interval, then if your integral of this function, lowercase f, is defined by this expression here, then if you take the derivative of this particular function with respect to x, it is nothing but the integrand itself.  So these are the two things which we're going to use to be able to set up that how we can find out what the integral is. So what we want to do is we want to be able to find out this integral, a to b, f of x dx. So how do we go about using our first fundamental theorem of calculus and second fundamental theorem of calculus to be able to calculate this integral here? If I go ahead and write that dy by dx is equal to f of x, let's suppose, because I know that, hey, this is a differential equation, if I am able to find y as a function of x, then I have solved this differential equation.  Now, what I can do is I can say dy by dx, I can put dx here, I can put dx here, integrate from a to b here, integrate this from a to b here, and what I get here is y of b minus y of a is equal to the integral going from a to b, f of x dx. So I have directly used my first fundamental theorem of calculus and second fundamental theorem of calculus knowledge to be able to come up with this.  So what this is telling me is that I'm able to calculate the value of the integral of a function, f, by simply calculating the value of y at b and a, based on this ordinary differential equation, dy by dx equal to f of x.  Now, what I can do is I can choose y of a equal to 0, let's suppose, then what happens is that y of b directly gives me the value of the integral.  And now, the reason why I did that is because now I can solve a differential equation, because every differential equation needs initial conditions, in this case, I need only one initial condition, because this is a first-order ordinary differential equation.  So I get dy by dx is equal to f of x, I'm going to assume y of a equal to 0, so that's the initial condition which I am going to choose. Keep in mind, again, that the initial condition is given at x equal to a, not x equal to 0, but x equal to a.  So if I solve this differential equation, and I'm able to find y of b, I have been able to find y of b, this value of y at x equal to b will be my . . . will be my exact value of the integral going from a to b, f of x dx. So that's the approach which I will take in order to be able to find the value of the integral of a function going from a to b, but I will set it up as a differential equation, dy by dx equal to f of x, I'll have this as my initial condition, and then whatever value of y I get at x equal to b will be my value of the integral, and since I'm going to use Euler's method, or other ordinary differential equation numerical methods, whatever value of y of b I'm going to get is going to be an approximation of the integral.  So this is just another numerical method of finding out the value for an integral.  And that's the end of this segment.