 In this video, we provide the solution to question number five for practice exam number two for math 1220, in which case we have to determine how large do we need to choose the number in so that the approximation using the trapezoidal rule on the integral from zero to one of cosine x squared dx is accurate to be within one ten thousandth. Now remember, when it comes to these things like the error with respect to the trapezoidal rule, it has the upper bound for which case we have that k times b minus a cubed over 12 times n squared. We want this number to be small. We want this number to be less than one ten thousandth. We'll deal with that in a second. So the b and the a these, of course, are the bounds of the integral right there one minus zero to the third. So that's actually going to just disappear right one to the third power is just one. We get this 12 times n squared that number on the bombs. We have to look for that K. This is one of the hardest parts of the problem. Now, fortunately, a very good hint has provided to us our function cosine of x squared. It we know here that the second derivative is equal to negative two sine of x squared minus four x squared cosine of x squared. And notice that sine and cosine always range between one and negative one. So it turns out that we need to find an upper bound for that number and using properties of sine and cosine. This can never be worse than a negative one. Same thing here. So this number can actually can be no worse than six. That's not necessarily the best bound you can do, but it's a pretty good bound. So we're going to use K equals six in our calculation. And that's what the hint tells us. That's really nice. So we can simplify this a little bit better. Six goes into 12 two times. The one cube on the top will just become a one. So this will simplify to be one over two in squared. And we need this to be less than or equal to one ten thousandths of one over ten to the fourth. Like so. So which case then if we reciprocate, we need that two in squared is greater than equal to ten to the fourth. Like so divide both sides by two. You get n squared is greater than equal to five thousand. And then take the square root. We need that in to be greater than the square root of five thousand. Which sets like approximately 70 point something, right? But the point is we need an integer so we get the round up to the next integer. So the smallest integer that we can guarantee will give us an accuracy within four decimal places will be 71. Again, rounding up to the next integer. Because if you're less, if you're if you're round down to 70, you're potentially, you know, you're close. You're potentially too small. So we have to round it up to 71 for this one.