 In this video I want to show how one can compute a delta value given a function and some specified epsilon or more specifically what domain of allowance is appropriate if we're given a specific function and a specific margin of error. So in this question we have provided the graph of a function f you can see over here and we're asked to identify what number delta what's sort of like the the best choice of delta to the guarantee that the absolute value of x minus one when it's less than delta will imply that x cubed minus five x plus six minus two its absolute value is less than point two. So this this package right here is pretty tightly bound let's try to unravel it a little bit and so when it comes to these type of statements with epsilon and delta I would recommend looking at the latter half first what does this mean so when we try to identify what's going on here some things to mention so we have this x cube minus five x plus six put in parentheses this is indicating to us the function that's in play this is our function f of x our function has some target value right here of two this right here is our l value and this number on the right less than point two this is going to be our epsilon essentially what we're looking for is something like the following in general these epsilon delta statements will have an expression of the form the absolute value of f of x minus l is less than epsilon and so just reading these things off we get our function f is this cubic function y equals x cube minus five x plus six l which is our target value is equal to two and our acceptable error is going to be point two so let's analyze this in the diagram our function f was given right here again it's this cubic function we don't really know what's going on in the domain right now we'll come back to that in a second but let's look at what's going on in the range so given our function l we have this target value l this is the number we're trying to hit and if we come along the function we're going to hit l just about right here okay our epsilon value is set to be point two so we're allowed to go point two above or below our target so point two above two would be two point two and two point two below two would be one point two so these numbers right here are going to be l plus epsilon and l minus epsilon we've computed those and so with l minus epsilon l plus epsilon we then create the margin of error which you can see in our diagram is right here it's this strip this this horizontal strip as long as our point is inside of this strip we're considered acceptable this is in the margin of error so what our task is is how our what what domain what interval of x coordinates will guarantee that we're inside of this so then once we've once we've scrutinized the range now let's focus on the domain here if our function is x cubed minus six x plus one and our target is l equals two what value should we aim with that is what number in the domain is going to hit l equals two so looking at the graph here if we come along y equals two we're going to hit the graph and then we fall down here and we're going to hit our a value now for this specific function we can see that the appropriate a value is going to equal a equals or is a equals one and one can actually see that if you evaluate the function at one f of one right here you end up with one cubed minus five plus six this ends up giving you seven minus five which is equal to two so x equals one is spot on going to give us y equals two so that's the perfect target right there so all of this information is given to us because when we look over here this absolute value of x minus one less than delta that should be interpreted as the absolute value of x minus a is less than delta for which this a value will be a specific number but delta is the thing in question that's what we have to figure out here so again summarizing in general when you see this box of information this will look like the absolute value of x minus a is less than delta that implies that guarantees the absolute value of f of x minus l is less than epsilon so if the distance between x and a is less than delta that'll guarantee the distance between y and l is less than epsilon so if we want to be epsilon close to l we need to guarantee that x is delta close to a that that's our goal here and so we have to figure out what is the specific a value so we have all that stuff decided here so to actually figure out what the delta value is we need to figure out what these numbers are right here so this blue strip you see on the graph this would be our domain of allowance we can go so far to the left of a so far to the right of a how far can we go well if we want to figure out say this value right here we have to figure out well who's the corresponding value above so we come up to the function one of these numbers is going to coincide with 2.2 another one of these numbers will coincide with 1.8 now you'll notice in this situation that the point on the right actually corresponds to the lower bound in the margin of error that's because our function's decreasing likewise the left bound actually coincides with the larger value in the margin of error because again our function's decreasing if our function was increasing we would see it the other way around that the number on the left coincides with the smaller number the number on the right coincides with the bigger number all right so we need to solve a cinch we need to solve the equations playing around with this inequality right here we need to solve the equation what is f of x equal 1.8 and when does it equal 2.2 if we can figure that out we can figure out what those those x values are going to be so we're looking for these numbers we'll call them x1 and x2 so if we take the equation x cubed minus 5x plus 6 this equals 1.8 this this equation one could solve purely algebraically it can be a little bit of a chore though I'm not going to worry about the details of this what I would recommend is using some type of graphing calculator or graphing technology of some kind if you have a graphing calculator you could solve this by graphing the function y equals x cube minus 5x plus 6 and then graphing the line y equals 1.8 and then you could ask wherever these two things intersect each other you could do this with desmos.com this is actually a free graphing calculator desmos.com there d s m o s there if you go to the graphing calculator you could then graph this function graph this function then you could click a button to see exactly where they intersect another option that I think is actually one of the simplest is just go to the website www.wolffromalpha.com and then in the box type in solve the following equation and it will give you a solution and we're going to need an approximate solution x is approximately 1.124 so we're not the reason I'm pointing you to these graphing calculators it's because of the purpose of this question the the point is not how does one solve or approximate this equation this is just to help us to figure out what delta is so assuming we can solve these equations we would approximate this we approximate the solution to f of x equals 1.8 that would give us approximately x is 1.124 if we do it again but this time with f of x equals 2.2 if you solve that equation you'll get approximately x is 0.911 so what we see right here is the lower bound is going to be 0.911 the upper bound is going to be 1.124 we got these answers fusing the graphing calculator like I just mentioned here because again I don't really want to worry about how did we get these answers but we have to assume there's a little bit of error in these things right because after all these are approximations these are not exact answers so it could be that if you take x to be 1.124 you plug in the function is it going to be exactly equal to 1.8 or could it be a little bit above 1.8 or a little bit below 1.8 yikes and so because of that we want to round these things a little bit just to guarantee that it's safer because we can always shrink the the main of of allowance because the idea is if you if you have these goalposts that you have to be within if you put them a little bit closer and you still get between the goalpost that'll be guaranteed to be in the margin of error and so what we're going to do is we're going to take these numbers right here and we're going to round them but we're always going to round toward a always have to round toward a what that means in this context here is if you take the number 1.124 right if you round that to the to the nearest one hundredth that's going to give you that x2 is equal to 1.12 excuse me so we round to the nearest 100 no big deal that rounds towards a that is we took a small step closer to a on the other hand if you take x1 here if normally if you were to round this to like say two decimal places you get 0.91 but that actually takes me a step away from a so we're actually going around this to 0.92 again getting us closer to a because if we take a step away from a we actually might step outside of the domain of allowance which we wouldn't want that so then to calculate delta what we need to do is we need to then take the difference between the x1 and x2 values like how close are they to a so we're going to take the absolute value of x1 minus a and we're going to take the absolute value of x2 minus a for which x1 we see that's going to be 0.92 minus 1 for x2 we're going to give 1.12 minus 1 the second one is actually fairly straightforward that's going to give you a 0.12 right here the other one is also pretty easy I should say it's going to give you a 0.8 and so this is how far we are away from from a to the left we are 0.08 steps away from a on the right we are 0.12 when deciding the delta value we always choose the smaller of the options so our delta value is going to be the smaller step that is the minimum we're going to take 0.08 and so that's what we have to choose for delta right here if we come back up to our graph and we examine it for just a moment you'll notice that although this graph is not completely labeled right it is actually for it is computer with generated with the computer so again it's not perfectly to scale but it is it's pretty good here you'll notice the point I'm trying to emphasize here if you notice the left side of a versus the right side of a it's skewed right a is not the midpoint of the domain of allowance the smaller side is on the left the bigger side on the right and so what we've essentially done we saw here that the distance on the left hand side was 0.08 and the distance on the right hand side was 0.12 so what we can do is we can always shave off a little bit on the bigger side so if we were to shave off 0.04 we can then get a sector so it's the left hand side is delta thick and the right hand side is delta thick and that's the goal can we find a single symmetric delta so that the left hand side the right hand side if we are no more than delta units away from a will guarantee that we are epsilon no more than epsilon units away from l and so we do that by choosing the minimum that is choosing the smaller of these two sides of a now it should be mentioned that our choice of delta this 0.08 right it's not a unique choice right this is essentially the largest choice of delta that we can guarantee will get us inside the margin of error but you could always choose a smaller delta that would also guarantee that's why we're able to round the way we did it's where we'll be able to shave some things off you can always choose it to be smaller and smaller smaller if you shrink the domain of allowance that'll still keep you within the margin of error it's when you lengthen the domain that things get into problems for example choosing a smaller delta will place the output within an acceptable margin of error thus a smaller delta generally guarantees a more precise output but on the other hand a smaller delta may be more difficult to implement right if in this example we didn't actually have any real-life context to our function but if we're if we're shrinking for example delta to be like 10 to the negative 100th right that would work that that's much smaller than 0.08 but it might be impractical to expect people computers to have this level of precision and so we want to know who's the most generous choice of delta that'll guarantee that we fall within the margin of error