 Welcome back everyone. In this video we're going to evaluate the integral of e to negative x squared dx. We're going to do that using series and then use that to approximate the integral from zero to one of e to negative x squared and we're going to do an accurate to point zero zero one here. And so this is an important example to consider because e to negative x squared is an example of a function which has a non-elementary antiderivative. The phonon theorem calculus isn't going to be, we're not going to find a way of describing the antiderivative without you some notion of calculus, right? So we've had to approximate these things in the past but it turns out integral series provide us a better way of trying to do this because we have a Maclaurin series for e to the x. This looks like the sum where n ranges from zero to infinity of x to the n divided by factorial. This also tells us how we can do a Maclaurin series for e to the negative x squared because we just replace the x with a negative x squared. In which case we get the sum as n equals zero to infinity. We're going to get negative x squared to the n over in factorial which this becomes an alternating sum negative one to the n x to the two n over in factorial as n goes from zero to infinity. And so if we write down the first couple terms here we're going to get one. We're going to get minus minus x squared over one factorial. So that's just the one there. And so we're going to get plus x to the fourth over two factorial which is two. We're next going to get x it's alternating so we get negative x cubed x to the sixth over three factorial that's a six. I'm just going to write down what these factorials turn out to be. We get a two right there. Then we're going to get plus x to the eighth over four factorial which is 24. We're going to get minus x to the tenth over five factorial which is 120. And we're going to get plus x to the twelfth over 720 which is six factorial. And that's probably enough here. We can keep on going going going going going going if we wanted to. And so if we want to compute the integral from zero to one of e to the negative x squared dx what we can do is we can then substitute in for this the function e to negative squared. We can substitute it to the chlorine series because the two functions are equal to each other on their interval of convergence which is actually all real numbers for this exponential here. So let's integrate this thing. This gives us an x minus x cubed over three plus x to the fifth over we're going to get two times five minus x to the seventh over six times seven. Then we're going to get plus x to the eighth over 24 times eight. I'm sorry that should be a nine x to the ninth because you get eight plus one minus x to the eleventh divided by 120 times eleven. And then lastly you're going to get plus x to the thirteenth over thirteen times seven twenty. Go from there if you want to. Again this will keep on going on and on and on. Now admittedly when you take an anti-derivative there should be a plus a constant but as this is a definite integral we don't need that constant it'll just cancel out anyways and we can evaluate this from zero to one. When you plug in zero everything will vanish because everything is a multiple of multiple x that's the center of the power series. So you can see there's actually some advantage by changing your center of the chlorine series you might actually want it to be something centered at something else like the lower limit of your integral which in this case is zero. When you plug in one all powers of one will just be one itself. So this thing will become one minus one-third plus one over a tenth minus one over forty-two plus I want to do the ninth power there right we're going to end up with twenty four times nine that is two sixteen. We have one right there. Then we're going to get minus one over we're going to get one twenty times eleven this time which is one thousand three hundred twenty. Next we get one over what's that thirteen times seven twenty that's like nine thousand three hundred sixty and we can keep on going if we need to like so this is the exact answer this is not an estimate right now this is an exact answer. If we put this together this would look like the sum as n ranges from zero to infinity. This is an alternating sum so it gets a negative one to the end on top. In the denominator you get a factorial you're going to get in factorial times that by two what is that going to be two n plus one because you also get this odd number that two n plus one was the consequence of the anti-derivative power rule we had from before. And so we get something like this and so this yeah this is the answer this is the exact answer. Now we probably need to estimate this to get our to get this area under the curve here and so we're going to estimate this using some partial sum right but what what partial sum should we use s sub n well we're supposed our our error is supposed to be accurate the remainder are in this is supposed to be accurate to point zero zero one or one one thousandth right here and so we'll see in the next lecture lecture 48 a technique one could use to because what we're here is trying to estimate this thing using Taylor's inequality which is appropriate here but something that's a lot easier is that this is an alternating series right here it's alternating it's a convergent alternating series so it'll be bounded above just by the next term in the sequence. So when when does our term when do our terms get sufficiently small right the terms of the sequence are going to look like one over we get n plus one factorial times two n plus three and we want this to be less than one thousand give myself a little bit more space here and so taking reciprocals we want n plus one factorial times two n plus three to be greater than a thousand and so looking at the numbers we already done here that happens right here and so this was zero one two three four five so at this moment at the fifth stage we're going to get that n plus one needs to be greater than equal to five which says n needs to be greater than equal to four so what we can actually do is we can get away with just taking the first four terms right here i guess there's five of them because we started zero but if we just take this number right here one minus one third plus one tenth minus one forty second plus one over two sixteen that number right here which is approximately the same thing as point seven four seven five this answer right here which is this again the sum of those five numbers that is accurate to three decimal places which gives us the the desired level of accuracy and if you were to try this thing with Simpson's rule it would take it would take more than just five care five five calculations to get this level of accuracy and so we see a very nice improvement when one when it comes to approximation theory using power series there are good friends and they can be very useful to compute anti-derivatives when the anti-derive sorry it can be very useful to use a maclaurin series to compute a definite integral when the indefinite integral is otherwise difficult to compute