{"id":1598,"date":"2021-07-22T16:41:46","date_gmt":"2021-07-22T16:41:46","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/calculus2\/?post_type=chapter&#038;p=1598"},"modified":"2022-03-19T04:17:36","modified_gmt":"2022-03-19T04:17:36","slug":"absolute-and-relative-error","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/calculus2\/chapter\/absolute-and-relative-error\/","title":{"raw":"Absolute and Relative Error","rendered":"Absolute and Relative Error"},"content":{"raw":"<div class=\"textbox learning-objectives\" data-type=\"abstract\">\r\n<h3>Learning Outcomes<\/h3>\r\n<ul>\r\n \t<li>Determine the absolute and relative error in using a numerical integration technique<\/li>\r\n \t<li>Estimate the absolute and relative error using an error-bound formula<\/li>\r\n \t<li>Recognize when the midpoint and trapezoidal rules over- or underestimate the true value of an integral<\/li>\r\n<\/ul>\r\n<\/div>\r\n<p id=\"fs-id1165040757743\">An important aspect of using these numerical approximation rules consists of calculating the error in using them for estimating the value of a definite integral. We first need to define <span data-type=\"term\">absolute error<\/span> and <span data-type=\"term\">relative error<\/span>.<\/p>\r\n\r\n<div id=\"fs-id1165040741548\" data-type=\"note\">\r\n<div data-type=\"title\">\r\n<div class=\"textbox shaded\">\r\n<h3 style=\"text-align: center;\" data-type=\"title\">Definition<\/h3>\r\n\r\n<hr \/>\r\n<p id=\"fs-id1165042047534\">If [latex]B[\/latex] is our estimate of some quantity having an actual value of [latex]A[\/latex], then the absolute error is given by [latex]|A-B|[\/latex]. The relative error is the error as a percentage of the absolute value and is given by [latex]|\\frac{A-B}{A}|=|\\frac{A-B}{A}|\\cdot 100\\text{%}[\/latex].<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div id=\"fs-id1165040640346\" data-type=\"example\">\r\n<div id=\"fs-id1165040640348\" data-type=\"exercise\">\r\n<div id=\"fs-id1165040640350\" data-type=\"problem\">\r\n<div data-type=\"title\">\r\n<div class=\"textbox exercises\">\r\n<h3>Example:\u00a0Calculating Error in the Midpoint Rule<\/h3>\r\n<div id=\"fs-id1165040640350\" data-type=\"problem\">\r\n\r\nCalculate the absolute and relative error in the estimate of [latex]{\\displaystyle\\int }_{0}^{1}{x}^{2}dx[\/latex] using the midpoint rule, found in the example: Using the Midpoint Rule with [latex]{M}_{4}[\/latex].\r\n<p id=\"fs-id1165041770837\">.<\/p>\r\n\r\n<\/div>\r\n[reveal-answer q=\"44558892\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"44558892\"]\r\n<div id=\"fs-id1165041788187\" data-type=\"solution\">\r\n<p id=\"fs-id1165041788189\">The calculated value is [latex]{\\displaystyle\\int }_{0}^{1}{x}^{2}dx=\\frac{1}{3}[\/latex] and our estimate from the example is [latex]{M}_{4}=\\frac{21}{64}[\/latex]. Thus, the absolute error is given by [latex]|\\left(\\frac{1}{3}\\right)-\\left(\\frac{21}{64}\\right)|=\\frac{1}{192}\\approx 0.0052[\/latex]. The relative error is<\/p>\r\n\r\n<div id=\"fs-id1165042048763\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\frac{\\frac{1}{192}}{\\frac{1}{3}}=\\frac{1}{64}\\approx 0.015625\\approx 1.6\\text{%}[\/latex].<\/div>\r\n&nbsp;\r\n\r\n<\/div>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div id=\"fs-id1165040736472\" data-type=\"example\">\r\n<div id=\"fs-id1165040736474\" data-type=\"exercise\">\r\n<div id=\"fs-id1165040771110\" data-type=\"problem\">\r\n<div data-type=\"title\">\r\n<div class=\"textbox exercises\">\r\n<h3>Example:\u00a0Calculating Error in the Trapezoidal Rule<\/h3>\r\n<div id=\"fs-id1165040771110\" data-type=\"problem\">\r\n<p id=\"fs-id1165040771115\">Calculate the absolute and relative error in the estimate of [latex]{\\displaystyle\\int }_{0}^{1}{x}^{2}dx[\/latex] using the trapezoidal rule, found in the example: Using the trapezoidal rule.<\/p>\r\n\r\n<\/div>\r\n[reveal-answer q=\"44558891\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"44558891\"]\r\n<div id=\"fs-id1165042091200\" data-type=\"solution\">\r\n<p id=\"fs-id1165042091202\">The calculated value is [latex]{\\displaystyle\\int }_{0}^{1}{x}^{2}dx=\\frac{1}{3}[\/latex] and our estimate from the example is [latex]{T}_{4}=\\frac{11}{32}[\/latex]. Thus, the absolute error is given by [latex]|\\frac{1}{3}-\\frac{11}{32}|=\\frac{1}{96}\\approx 0.0104[\/latex]. The relative error is given by<\/p>\r\n\r\n<div id=\"fs-id1165040745022\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\frac{\\frac{1}{96}}{\\frac{1}{3}}=0.03125\\approx 3.1\\text{%}[\/latex].<\/div>\r\n&nbsp;\r\n\r\n<\/div>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n[caption]Watch the following video to see the worked solutions to Example:\u00a0\u00a0Calculating Error in the Midpoint Rule and Example:\u00a0Calculating Error in the Trapezoidal Rule[\/caption]\r\n\r\n<center><iframe src=\"\/\/plugin.3playmedia.com\/show?mf=6722688&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=onI9vFqmDQU&amp;video_target=tpm-plugin-zltaqp36-onI9vFqmDQU\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\"><\/iframe><\/center>You can view the <a href=\"https:\/\/oerfiles.s3.us-west-2.amazonaws.com\/Calculus+II\/Transcripts\/3.6.2_transcript.html\" target=\"_blank\" rel=\"noopener\">transcript for \"3.6.2\" here (opens in new window)<\/a>.\r\n<div id=\"fs-id1165040641404\" class=\"checkpoint\" data-type=\"note\">\r\n<div id=\"fs-id1165042133506\" data-type=\"exercise\">\r\n<div id=\"fs-id1165042133508\" data-type=\"problem\">\r\n<div class=\"textbox key-takeaways\">\r\n<h3>try it<\/h3>\r\n<div id=\"fs-id1165042133508\" data-type=\"problem\">\r\n<p id=\"fs-id1165042133510\">In an earlier checkpoint, we estimated [latex]{\\displaystyle\\int }_{1}^{2}\\frac{1}{x}dx[\/latex] to be [latex]\\frac{24}{35}[\/latex] using [latex]{T}_{2}[\/latex]. The actual value of this integral is [latex]\\text{ln}2[\/latex]. Using [latex]\\frac{24}{35}\\approx 0.6857[\/latex] and [latex]\\text{ln}2\\approx 0.6931[\/latex], calculate the absolute error and the relative error.<\/p>\r\n\r\n<\/div>\r\n[reveal-answer q=\"44558889\"]Hint[\/reveal-answer]\r\n[hidden-answer a=\"44558889\"]\r\n<div id=\"fs-id1165041766748\" data-type=\"commentary\" data-element-type=\"hint\">\r\n<p id=\"fs-id1165041826394\">Use the previous examples as a guide.<\/p>\r\n\r\n<\/div>\r\n[\/hidden-answer]\r\n\r\n[reveal-answer q=\"44558890\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"44558890\"]\r\n<div id=\"fs-id1165041840001\" data-type=\"solution\">\r\n<p id=\"fs-id1165041840003\">0.0074, 1.1%<\/p>\r\n\r\n<\/div>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<p id=\"fs-id1165041812124\">In the two previous examples, we were able to compare our estimate of an integral with the actual value of the integral; however, we do not typically have this luxury. In general, if we are approximating an integral, we are doing so because we cannot compute the exact value of the integral itself easily. Therefore, it is often helpful to be able to determine an upper bound for the error in an approximation of an integral. The following theorem provides error bounds for the midpoint and trapezoidal rules. The theorem is stated without proof.<\/p>\r\n\r\n<div id=\"fs-id1165041812126\" class=\"theorem\" data-type=\"note\">\r\n<div data-type=\"title\">\r\n<div class=\"textbox shaded\">\r\n<h3 style=\"text-align: center;\" data-type=\"title\">Error Bounds for the Midpoint and Trapezoidal Rules<\/h3>\r\n\r\n<hr \/>\r\n<p id=\"fs-id1165041952031\">Let [latex]f\\left(x\\right)[\/latex] be a continuous function over [latex]\\left[a,b\\right][\/latex], having a second derivative [latex]f\\text{''}\\left(x\\right)[\/latex] over this interval. If [latex]M[\/latex] is the maximum value of [latex]|f\\text{''}\\left(x\\right)|[\/latex] over [latex]\\left[a,b\\right][\/latex], then the upper bounds for the error in using [latex]{M}_{n}[\/latex] and [latex]{T}_{n}[\/latex] to estimate [latex]{\\displaystyle\\int }_{a}^{b}f\\left(x\\right)dx[\/latex] are<\/p>\r\n\r\n<div id=\"fs-id1165041827796\" style=\"text-align: center;\" data-type=\"equation\">[latex]\\text{Error in }{M}_{n}\\le \\frac{M{\\left(b-a\\right)}^{3}}{24{n}^{2}}[\/latex]<\/div>\r\n&nbsp;\r\n<p id=\"fs-id1165042278502\">and<\/p>\r\n\r\n<div id=\"fs-id1165041814747\" style=\"text-align: center;\" data-type=\"equation\">[latex]\\text{Error in }{T}_{n}\\le \\frac{M{\\left(b-a\\right)}^{3}}{12{n}^{2}}[\/latex].<\/div>\r\n&nbsp;\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<p id=\"fs-id1165040641464\">We can use these bounds to determine the value of [latex]n[\/latex] necessary to guarantee that the error in an estimate is less than a specified value. Before exploring an example, let's review some basic rules for solving inequalities.<\/p>\r\n\r\n<div id=\"fs-id1165042277050\" data-type=\"example\">\r\n<div id=\"fs-id1165042277052\" data-type=\"exercise\">\r\n<div id=\"fs-id1165041952725\" data-type=\"problem\">\r\n<div data-type=\"title\">\r\n<div class=\"textbox examples\">\r\n<h3>Recall: Rules for Solving Inequalities<\/h3>\r\nThe process of solving an inequality is similar to solving an equation by isolating the variable. There are several rules to keep in mind when solving these inequalities.\r\n<ol>\r\n \t<li>Adding or subtracting the same number to both sides of an inequality yields an equivalent statement.<\/li>\r\n \t<li>Multiplying or dividing the same positive number to both sides of an inequality yields an equivalent statement.<\/li>\r\n \t<li>Multiplying or dividing a <strong>negative <\/strong>number to both sides of an inequality reverses the direction of the inequality.<\/li>\r\n \t<li>If [latex] x^n \\le a \\: \\text{and}\\:x\\ge0[\/latex]\u00a0 then [latex] x \\le \\sqrt[n] {a} [\/latex]<\/li>\r\n<\/ol>\r\n<\/div>\r\n<div class=\"textbox exercises\">\r\n<h3>Example:\u00a0Determining the Number of Intervals to Use<\/h3>\r\n<div id=\"fs-id1165041952725\" data-type=\"problem\">\r\n<p id=\"fs-id1165042137782\">What value of [latex]n[\/latex] should be used to guarantee that an estimate of [latex]{\\displaystyle\\int }_{0}^{1}{e}^{{x}^{2}}dx[\/latex] is accurate to within 0.01 if we use the midpoint rule?<\/p>\r\n\r\n<\/div>\r\n[reveal-answer q=\"44558879\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"44558879\"]\r\n<div id=\"fs-id1165041791703\" data-type=\"solution\">\r\n<p id=\"fs-id1165041791705\">We begin by determining the value of [latex]M[\/latex], the maximum value of [latex]|f\\text{''}\\left(x\\right)|[\/latex] over [latex]\\left[0,1\\right][\/latex] for [latex]f\\left(x\\right)={e}^{{x}^{2}}[\/latex]. Since [latex]{f}^{\\prime }\\left(x\\right)=2x{e}^{{x}^{2}}[\/latex], we have<\/p>\r\n\r\n<div id=\"fs-id1165040656611\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]f^{\\prime\\prime} \\left(x\\right)=2e^{x^2}+4{x}^{2}{e}^{x^2}[\/latex].<\/div>\r\n&nbsp;\r\n<p id=\"fs-id1165042196940\">Thus,<\/p>\r\n\r\n<div id=\"fs-id1165042196943\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]|f\\text{''}\\left(x\\right)|=2{e}^{{x}^{2}}\\left(1+2{x}^{2}\\right)\\le 2\\cdot e\\cdot 3=6e[\/latex].<\/div>\r\n&nbsp;\r\n<p id=\"fs-id1165041804288\">From the error-bound in the above theorem, we have<\/p>\r\n\r\n<div id=\"fs-id1165040716363\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\text{Error in }{M}_{n}\\le \\frac{M{\\left(b-a\\right)}^{3}}{24{n}^{2}}\\le \\frac{6e{\\left(1 - 0\\right)}^{3}}{24{n}^{2}}=\\frac{6e}{24{n}^{2}}[\/latex].<\/div>\r\n&nbsp;\r\n<p id=\"fs-id1165040772778\">Now we solve the following inequality for [latex]n\\text{:}[\/latex]<\/p>\r\n\r\n<div id=\"fs-id1165042265412\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\frac{6e}{24{n}^{2}}\\le 0.01[\/latex].<\/div>\r\n&nbsp;\r\n<p id=\"fs-id1165042005486\">Thus, [latex]n\\ge \\sqrt{\\frac{600e}{24}}\\approx 8.24[\/latex]. Since [latex]n[\/latex] must be an integer satisfying this inequality, a choice of [latex]n=9[\/latex] would guarantee that [latex]|{\\displaystyle\\int }_{0}^{1}{e}^{{x}^{2}}dx-{M}_{n}|&lt;0.01[\/latex].<\/p>\r\n&nbsp;\r\n\r\n<\/div>\r\n<div id=\"fs-id1165040794903\" data-type=\"commentary\">\r\n<div data-type=\"title\"><strong>Analysis<\/strong><\/div>\r\n<p id=\"fs-id1165042039031\">We might have been tempted to round [latex]8.24[\/latex] down and choose [latex]n=8[\/latex], but this would be incorrect because we must have an integer greater than or equal to [latex]8.24[\/latex]. We need to keep in mind that the error estimates provide an upper bound only for the error. The actual estimate may, in fact, be a much better approximation than is indicated by the error bound.<\/p>\r\n\r\n<\/div>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n[caption]Watch the following video to see the worked solution to Example:\u00a0Determining the Number of Intervals to Use[\/caption]\r\n\r\n<center><iframe src=\"\/\/plugin.3playmedia.com\/show?mf=6722689&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=p2ksWUqIjmU&amp;video_target=tpm-plugin-8ppncdgd-p2ksWUqIjmU\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\"><\/iframe><\/center>You can view the <a href=\"https:\/\/oerfiles.s3.us-west-2.amazonaws.com\/Calculus+II\/Transcripts\/3.6.3_transcript.html\" target=\"_blank\" rel=\"noopener\">transcript for \"3.6.3\" here (opens in new window)<\/a>.\r\n<div id=\"fs-id1165041832106\" class=\"checkpoint\" data-type=\"note\">\r\n<div id=\"fs-id1165041832109\" data-type=\"exercise\">\r\n<div id=\"fs-id1165041831948\" data-type=\"problem\">\r\n<div class=\"textbox key-takeaways\">\r\n<h3>try it<\/h3>\r\n<div id=\"fs-id1165041831948\" data-type=\"problem\">\r\n<p id=\"fs-id1165041831950\">Use the previous theorem to find an upper bound for the error in using [latex]{M}_{4}[\/latex] to estimate [latex]{\\displaystyle\\int }_{0}^{1}{x}^{2}dx[\/latex].<\/p>\r\n\r\n<\/div>\r\n[reveal-answer q=\"44558859\"]Hint[\/reveal-answer]\r\n[hidden-answer a=\"44558859\"]\r\n<div id=\"fs-id1165041836992\" data-type=\"commentary\" data-element-type=\"hint\">\r\n<p id=\"fs-id1165041836999\">[latex]f\\text{''}\\left(x\\right)=2[\/latex], so [latex]M=2[\/latex].<\/p>\r\n\r\n<\/div>\r\n[\/hidden-answer]\r\n\r\n[reveal-answer q=\"44558869\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"44558869\"]\r\n<div id=\"fs-id1165040640441\" data-type=\"solution\">\r\n<p id=\"fs-id1165040640443\">[latex]\\frac{1}{192}[\/latex]<\/p>\r\n\r\n<\/div>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<section id=\"fs-id1165042275650\" data-depth=\"1\"><\/section>","rendered":"<div class=\"textbox learning-objectives\" data-type=\"abstract\">\n<h3>Learning Outcomes<\/h3>\n<ul>\n<li>Determine the absolute and relative error in using a numerical integration technique<\/li>\n<li>Estimate the absolute and relative error using an error-bound formula<\/li>\n<li>Recognize when the midpoint and trapezoidal rules over- or underestimate the true value of an integral<\/li>\n<\/ul>\n<\/div>\n<p id=\"fs-id1165040757743\">An important aspect of using these numerical approximation rules consists of calculating the error in using them for estimating the value of a definite integral. We first need to define <span data-type=\"term\">absolute error<\/span> and <span data-type=\"term\">relative error<\/span>.<\/p>\n<div id=\"fs-id1165040741548\" data-type=\"note\">\n<div data-type=\"title\">\n<div class=\"textbox shaded\">\n<h3 style=\"text-align: center;\" data-type=\"title\">Definition<\/h3>\n<hr \/>\n<p id=\"fs-id1165042047534\">If [latex]B[\/latex] is our estimate of some quantity having an actual value of [latex]A[\/latex], then the absolute error is given by [latex]|A-B|[\/latex]. The relative error is the error as a percentage of the absolute value and is given by [latex]|\\frac{A-B}{A}|=|\\frac{A-B}{A}|\\cdot 100\\text{%}[\/latex].<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"fs-id1165040640346\" data-type=\"example\">\n<div id=\"fs-id1165040640348\" data-type=\"exercise\">\n<div id=\"fs-id1165040640350\" data-type=\"problem\">\n<div data-type=\"title\">\n<div class=\"textbox exercises\">\n<h3>Example:\u00a0Calculating Error in the Midpoint Rule<\/h3>\n<div id=\"fs-id1165040640350\" data-type=\"problem\">\n<p>Calculate the absolute and relative error in the estimate of [latex]{\\displaystyle\\int }_{0}^{1}{x}^{2}dx[\/latex] using the midpoint rule, found in the example: Using the Midpoint Rule with [latex]{M}_{4}[\/latex].<\/p>\n<p id=\"fs-id1165041770837\">.<\/p>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q44558892\">Show Solution<\/span><\/p>\n<div id=\"q44558892\" class=\"hidden-answer\" style=\"display: none\">\n<div id=\"fs-id1165041788187\" data-type=\"solution\">\n<p id=\"fs-id1165041788189\">The calculated value is [latex]{\\displaystyle\\int }_{0}^{1}{x}^{2}dx=\\frac{1}{3}[\/latex] and our estimate from the example is [latex]{M}_{4}=\\frac{21}{64}[\/latex]. Thus, the absolute error is given by [latex]|\\left(\\frac{1}{3}\\right)-\\left(\\frac{21}{64}\\right)|=\\frac{1}{192}\\approx 0.0052[\/latex]. The relative error is<\/p>\n<div id=\"fs-id1165042048763\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\frac{\\frac{1}{192}}{\\frac{1}{3}}=\\frac{1}{64}\\approx 0.015625\\approx 1.6\\text{%}[\/latex].<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"fs-id1165040736472\" data-type=\"example\">\n<div id=\"fs-id1165040736474\" data-type=\"exercise\">\n<div id=\"fs-id1165040771110\" data-type=\"problem\">\n<div data-type=\"title\">\n<div class=\"textbox exercises\">\n<h3>Example:\u00a0Calculating Error in the Trapezoidal Rule<\/h3>\n<div id=\"fs-id1165040771110\" data-type=\"problem\">\n<p id=\"fs-id1165040771115\">Calculate the absolute and relative error in the estimate of [latex]{\\displaystyle\\int }_{0}^{1}{x}^{2}dx[\/latex] using the trapezoidal rule, found in the example: Using the trapezoidal rule.<\/p>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q44558891\">Show Solution<\/span><\/p>\n<div id=\"q44558891\" class=\"hidden-answer\" style=\"display: none\">\n<div id=\"fs-id1165042091200\" data-type=\"solution\">\n<p id=\"fs-id1165042091202\">The calculated value is [latex]{\\displaystyle\\int }_{0}^{1}{x}^{2}dx=\\frac{1}{3}[\/latex] and our estimate from the example is [latex]{T}_{4}=\\frac{11}{32}[\/latex]. Thus, the absolute error is given by [latex]|\\frac{1}{3}-\\frac{11}{32}|=\\frac{1}{96}\\approx 0.0104[\/latex]. The relative error is given by<\/p>\n<div id=\"fs-id1165040745022\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\frac{\\frac{1}{96}}{\\frac{1}{3}}=0.03125\\approx 3.1\\text{%}[\/latex].<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Watch the following video to see the worked solutions to Example:\u00a0\u00a0Calculating Error in the Midpoint Rule and Example:\u00a0Calculating Error in the Trapezoidal Rule<\/p>\n<div style=\"text-align: center;\"><iframe loading=\"lazy\" src=\"\/\/plugin.3playmedia.com\/show?mf=6722688&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=onI9vFqmDQU&amp;video_target=tpm-plugin-zltaqp36-onI9vFqmDQU\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\"><\/iframe><\/div>\n<p>You can view the <a href=\"https:\/\/oerfiles.s3.us-west-2.amazonaws.com\/Calculus+II\/Transcripts\/3.6.2_transcript.html\" target=\"_blank\" rel=\"noopener\">transcript for &#8220;3.6.2&#8221; here (opens in new window)<\/a>.<\/p>\n<div id=\"fs-id1165040641404\" class=\"checkpoint\" data-type=\"note\">\n<div id=\"fs-id1165042133506\" data-type=\"exercise\">\n<div id=\"fs-id1165042133508\" data-type=\"problem\">\n<div class=\"textbox key-takeaways\">\n<h3>try it<\/h3>\n<div id=\"fs-id1165042133508\" data-type=\"problem\">\n<p id=\"fs-id1165042133510\">In an earlier checkpoint, we estimated [latex]{\\displaystyle\\int }_{1}^{2}\\frac{1}{x}dx[\/latex] to be [latex]\\frac{24}{35}[\/latex] using [latex]{T}_{2}[\/latex]. The actual value of this integral is [latex]\\text{ln}2[\/latex]. Using [latex]\\frac{24}{35}\\approx 0.6857[\/latex] and [latex]\\text{ln}2\\approx 0.6931[\/latex], calculate the absolute error and the relative error.<\/p>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q44558889\">Hint<\/span><\/p>\n<div id=\"q44558889\" class=\"hidden-answer\" style=\"display: none\">\n<div id=\"fs-id1165041766748\" data-type=\"commentary\" data-element-type=\"hint\">\n<p id=\"fs-id1165041826394\">Use the previous examples as a guide.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q44558890\">Show Solution<\/span><\/p>\n<div id=\"q44558890\" class=\"hidden-answer\" style=\"display: none\">\n<div id=\"fs-id1165041840001\" data-type=\"solution\">\n<p id=\"fs-id1165041840003\">0.0074, 1.1%<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p id=\"fs-id1165041812124\">In the two previous examples, we were able to compare our estimate of an integral with the actual value of the integral; however, we do not typically have this luxury. In general, if we are approximating an integral, we are doing so because we cannot compute the exact value of the integral itself easily. Therefore, it is often helpful to be able to determine an upper bound for the error in an approximation of an integral. The following theorem provides error bounds for the midpoint and trapezoidal rules. The theorem is stated without proof.<\/p>\n<div id=\"fs-id1165041812126\" class=\"theorem\" data-type=\"note\">\n<div data-type=\"title\">\n<div class=\"textbox shaded\">\n<h3 style=\"text-align: center;\" data-type=\"title\">Error Bounds for the Midpoint and Trapezoidal Rules<\/h3>\n<hr \/>\n<p id=\"fs-id1165041952031\">Let [latex]f\\left(x\\right)[\/latex] be a continuous function over [latex]\\left[a,b\\right][\/latex], having a second derivative [latex]f\\text{''}\\left(x\\right)[\/latex] over this interval. If [latex]M[\/latex] is the maximum value of [latex]|f\\text{''}\\left(x\\right)|[\/latex] over [latex]\\left[a,b\\right][\/latex], then the upper bounds for the error in using [latex]{M}_{n}[\/latex] and [latex]{T}_{n}[\/latex] to estimate [latex]{\\displaystyle\\int }_{a}^{b}f\\left(x\\right)dx[\/latex] are<\/p>\n<div id=\"fs-id1165041827796\" style=\"text-align: center;\" data-type=\"equation\">[latex]\\text{Error in }{M}_{n}\\le \\frac{M{\\left(b-a\\right)}^{3}}{24{n}^{2}}[\/latex]<\/div>\n<p>&nbsp;<\/p>\n<p id=\"fs-id1165042278502\">and<\/p>\n<div id=\"fs-id1165041814747\" style=\"text-align: center;\" data-type=\"equation\">[latex]\\text{Error in }{T}_{n}\\le \\frac{M{\\left(b-a\\right)}^{3}}{12{n}^{2}}[\/latex].<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p id=\"fs-id1165040641464\">We can use these bounds to determine the value of [latex]n[\/latex] necessary to guarantee that the error in an estimate is less than a specified value. Before exploring an example, let&#8217;s review some basic rules for solving inequalities.<\/p>\n<div id=\"fs-id1165042277050\" data-type=\"example\">\n<div id=\"fs-id1165042277052\" data-type=\"exercise\">\n<div id=\"fs-id1165041952725\" data-type=\"problem\">\n<div data-type=\"title\">\n<div class=\"textbox examples\">\n<h3>Recall: Rules for Solving Inequalities<\/h3>\n<p>The process of solving an inequality is similar to solving an equation by isolating the variable. There are several rules to keep in mind when solving these inequalities.<\/p>\n<ol>\n<li>Adding or subtracting the same number to both sides of an inequality yields an equivalent statement.<\/li>\n<li>Multiplying or dividing the same positive number to both sides of an inequality yields an equivalent statement.<\/li>\n<li>Multiplying or dividing a <strong>negative <\/strong>number to both sides of an inequality reverses the direction of the inequality.<\/li>\n<li>If [latex]x^n \\le a \\: \\text{and}\\:x\\ge0[\/latex]\u00a0 then [latex]x \\le \\sqrt[n] {a}[\/latex]<\/li>\n<\/ol>\n<\/div>\n<div class=\"textbox exercises\">\n<h3>Example:\u00a0Determining the Number of Intervals to Use<\/h3>\n<div id=\"fs-id1165041952725\" data-type=\"problem\">\n<p id=\"fs-id1165042137782\">What value of [latex]n[\/latex] should be used to guarantee that an estimate of [latex]{\\displaystyle\\int }_{0}^{1}{e}^{{x}^{2}}dx[\/latex] is accurate to within 0.01 if we use the midpoint rule?<\/p>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q44558879\">Show Solution<\/span><\/p>\n<div id=\"q44558879\" class=\"hidden-answer\" style=\"display: none\">\n<div id=\"fs-id1165041791703\" data-type=\"solution\">\n<p id=\"fs-id1165041791705\">We begin by determining the value of [latex]M[\/latex], the maximum value of [latex]|f\\text{''}\\left(x\\right)|[\/latex] over [latex]\\left[0,1\\right][\/latex] for [latex]f\\left(x\\right)={e}^{{x}^{2}}[\/latex]. Since [latex]{f}^{\\prime }\\left(x\\right)=2x{e}^{{x}^{2}}[\/latex], we have<\/p>\n<div id=\"fs-id1165040656611\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]f^{\\prime\\prime} \\left(x\\right)=2e^{x^2}+4{x}^{2}{e}^{x^2}[\/latex].<\/div>\n<p>&nbsp;<\/p>\n<p id=\"fs-id1165042196940\">Thus,<\/p>\n<div id=\"fs-id1165042196943\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]|f\\text{''}\\left(x\\right)|=2{e}^{{x}^{2}}\\left(1+2{x}^{2}\\right)\\le 2\\cdot e\\cdot 3=6e[\/latex].<\/div>\n<p>&nbsp;<\/p>\n<p id=\"fs-id1165041804288\">From the error-bound in the above theorem, we have<\/p>\n<div id=\"fs-id1165040716363\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\text{Error in }{M}_{n}\\le \\frac{M{\\left(b-a\\right)}^{3}}{24{n}^{2}}\\le \\frac{6e{\\left(1 - 0\\right)}^{3}}{24{n}^{2}}=\\frac{6e}{24{n}^{2}}[\/latex].<\/div>\n<p>&nbsp;<\/p>\n<p id=\"fs-id1165040772778\">Now we solve the following inequality for [latex]n\\text{:}[\/latex]<\/p>\n<div id=\"fs-id1165042265412\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\frac{6e}{24{n}^{2}}\\le 0.01[\/latex].<\/div>\n<p>&nbsp;<\/p>\n<p id=\"fs-id1165042005486\">Thus, [latex]n\\ge \\sqrt{\\frac{600e}{24}}\\approx 8.24[\/latex]. Since [latex]n[\/latex] must be an integer satisfying this inequality, a choice of [latex]n=9[\/latex] would guarantee that [latex]|{\\displaystyle\\int }_{0}^{1}{e}^{{x}^{2}}dx-{M}_{n}|<0.01[\/latex].<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div id=\"fs-id1165040794903\" data-type=\"commentary\">\n<div data-type=\"title\"><strong>Analysis<\/strong><\/div>\n<p id=\"fs-id1165042039031\">We might have been tempted to round [latex]8.24[\/latex] down and choose [latex]n=8[\/latex], but this would be incorrect because we must have an integer greater than or equal to [latex]8.24[\/latex]. We need to keep in mind that the error estimates provide an upper bound only for the error. The actual estimate may, in fact, be a much better approximation than is indicated by the error bound.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Watch the following video to see the worked solution to Example:\u00a0Determining the Number of Intervals to Use<\/p>\n<div style=\"text-align: center;\"><iframe loading=\"lazy\" src=\"\/\/plugin.3playmedia.com\/show?mf=6722689&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=p2ksWUqIjmU&amp;video_target=tpm-plugin-8ppncdgd-p2ksWUqIjmU\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\"><\/iframe><\/div>\n<p>You can view the <a href=\"https:\/\/oerfiles.s3.us-west-2.amazonaws.com\/Calculus+II\/Transcripts\/3.6.3_transcript.html\" target=\"_blank\" rel=\"noopener\">transcript for &#8220;3.6.3&#8221; here (opens in new window)<\/a>.<\/p>\n<div id=\"fs-id1165041832106\" class=\"checkpoint\" data-type=\"note\">\n<div id=\"fs-id1165041832109\" data-type=\"exercise\">\n<div id=\"fs-id1165041831948\" data-type=\"problem\">\n<div class=\"textbox key-takeaways\">\n<h3>try it<\/h3>\n<div id=\"fs-id1165041831948\" data-type=\"problem\">\n<p id=\"fs-id1165041831950\">Use the previous theorem to find an upper bound for the error in using [latex]{M}_{4}[\/latex] to estimate [latex]{\\displaystyle\\int }_{0}^{1}{x}^{2}dx[\/latex].<\/p>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q44558859\">Hint<\/span><\/p>\n<div id=\"q44558859\" class=\"hidden-answer\" style=\"display: none\">\n<div id=\"fs-id1165041836992\" data-type=\"commentary\" data-element-type=\"hint\">\n<p id=\"fs-id1165041836999\">[latex]f\\text{''}\\left(x\\right)=2[\/latex], so [latex]M=2[\/latex].<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q44558869\">Show Solution<\/span><\/p>\n<div id=\"q44558869\" class=\"hidden-answer\" style=\"display: none\">\n<div id=\"fs-id1165040640441\" data-type=\"solution\">\n<p id=\"fs-id1165040640443\">[latex]\\frac{1}{192}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<section id=\"fs-id1165042275650\" data-depth=\"1\"><\/section>\n\n\t\t\t <section class=\"citations-section\" role=\"contentinfo\">\n\t\t\t <h3>Candela Citations<\/h3>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <div id=\"citation-list-1598\">\n\t\t\t\t\t\t\t <div class=\"licensing\"><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Original<\/div><ul class=\"citation-list\"><li>3.6.2. <strong>Authored by<\/strong>: Ryan Melton. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em><\/li><li>3.6.3. <strong>Authored by<\/strong>: Ryan Melton. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em><\/li><\/ul><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Shared previously<\/div><ul class=\"citation-list\"><li>Calculus Volume 2. <strong>Authored by<\/strong>: Gilbert Strang, Edwin (Jed) Herman. <strong>Provided by<\/strong>: OpenStax. <strong>Located at<\/strong>: <a target=\"_blank\" href=\"https:\/\/openstax.org\/books\/calculus-volume-2\/pages\/1-introduction\">https:\/\/openstax.org\/books\/calculus-volume-2\/pages\/1-introduction<\/a>. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by-nc-sa\/4.0\/\">CC BY-NC-SA: Attribution-NonCommercial-ShareAlike<\/a><\/em>. <strong>License Terms<\/strong>: Access for free at https:\/\/openstax.org\/books\/calculus-volume-2\/pages\/1-introduction<\/li><\/ul><\/div>\n\t\t\t\t\t\t <\/div>\n\t\t\t\t\t <\/div>\n\t\t\t <\/section>","protected":false},"author":17533,"menu_order":21,"template":"","meta":{"_candela_citation":"[{\"type\":\"cc\",\"description\":\"Calculus Volume 2\",\"author\":\"Gilbert Strang, Edwin (Jed) Herman\",\"organization\":\"OpenStax\",\"url\":\"https:\/\/openstax.org\/books\/calculus-volume-2\/pages\/1-introduction\",\"project\":\"\",\"license\":\"cc-by-nc-sa\",\"license_terms\":\"Access for free at https:\/\/openstax.org\/books\/calculus-volume-2\/pages\/1-introduction\"},{\"type\":\"original\",\"description\":\"3.6.2\",\"author\":\"Ryan Melton\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"},{\"type\":\"original\",\"description\":\"3.6.3\",\"author\":\"Ryan Melton\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"}]","CANDELA_OUTCOMES_GUID":"","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1598","chapter","type-chapter","status-publish","hentry"],"part":158,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapters\/1598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/wp\/v2\/users\/17533"}],"version-history":[{"count":10,"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapters\/1598\/revisions"}],"predecessor-version":[{"id":2035,"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapters\/1598\/revisions\/2035"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/parts\/158"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapters\/1598\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/wp\/v2\/media?parent=1598"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapter-type?post=1598"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/wp\/v2\/contributor?post=1598"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus2\/wp-json\/wp\/v2\/license?post=1598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}