{"id":162,"date":"2019-08-22T20:26:21","date_gmt":"2019-08-22T20:26:21","guid":{"rendered":"http:\/\/104.42.120.246.xip.io\/calculus-tutorials\/?page_id=162"},"modified":"2019-12-02T20:53:35","modified_gmt":"2019-12-02T20:53:35","slug":"computing-integrals-by-completing-the-square","status":"publish","type":"page","link":"https:\/\/math.hmc.edu\/calculus\/hmc-mathematics-calculus-online-tutorials\/single-variable-calculus\/computing-integrals-by-completing-the-square\/","title":{"rendered":"Computing Integrals by Completing the Square"},"content":{"rendered":"\n<script type=\"text\/x-mathjax-config\">\n  MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], [\"\\(\",\"\\)\"]] } });\n<\/script>\n\n\n\n<script type=\"text\/javascript\" src=\"http:\/\/cdn.mathjax.org\/mathjax\/latest\/MathJax.js?config=TeX-AMS_HTML\">\n<\/script>\n\n\n\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\">\n\n\n\n<script src=\"https:\/\/www.math.hmc.edu\/jsMath\/easy\/load-dollars.js\"><\/script>\n\n\n\n<title>Computing Integrals by Completing the Square &#8211; HMC Calculus Tutorial<\/title>\n\n\n\n<p>\n<!------------------------>\n\nWe will review the method of completing the square in the context of\nevaluating integrals:\n\n<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Example<\/h6>\n\n\n\n<p>\n\nLet&#8217;s start by evaluating\n\\[\\int\\frac{dx}{2x^2-12x+26}.\\]\nThe denominator does not factor with rational coefficients, so partial\nfractions is not a viable option.  There is also no obvious\nsubstitution to make.  Instead, we will complete the square in the\ndenominator to get a recognizable form for the integral.\n\n<\/p>\n\n\n\n<p>\nNow\n\\begin{eqnarray*}\n\t2x^2-12x+26&amp;=&amp;2[x^2-6x+13]\\\\\n\t&amp;=&amp;2[(x^2-6x+9)+4]\\\\\n\t&amp;=&amp;2[(x-3)^2+4].\n\\end{eqnarray*}\nReturning to the integral,\n\\begin{eqnarray*}\n\t\\int\\frac{dx}{2x^2-12x+26}&amp;=&amp;\\int\\frac{dx}{2[(x-3)^2+4]}\\\\\n\t&amp;=&amp;\\frac{1}{2}\\int\\frac{dx}{(x-3)^2+2^2}\\\\\n\t&amp;=&amp;\\frac{1}{2}\\left[\\frac{1}{2}\\arctan\\left(\\frac{x-3}{2}\\right)\\right]+C\\\\\n\t&amp;=&amp;\\frac{1}{4}\\arctan\\left(\\frac{x-3}{2}\\right)+C.\n\\end{eqnarray*}\n\n<\/p>\n\n\n\n<p>\nCertain other types of integrals can be evaluated by this method as\nwell:\n\n<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Example<\/h6>\n\n\n\n<p>\n\nConsider\n\\[\\int \\frac{dx}{\\sqrt{21-4x-x^2}}.\\]\nNow\n\\begin{eqnarray*}\n\t21-4x-x^2&amp;=&amp;21-[x^2+4x]\\\\\n\t&amp;=&amp;21+4-[x^2+4x+4]\\\\\n\t&amp;=&amp;25-(x+2)^2.\n\\end{eqnarray*}\nReturning to the integral,\n\\begin{eqnarray*}\n\t\\int \\frac{dx}{\\sqrt{21-4x-x^2}}&amp;=&amp;\\int \\frac{dx}{\\sqrt{25-(x+2)^2}}\\\\\n\t&amp;=&amp; \\arcsin \\left(\\frac{x+2}{5}\\right)+C.\n\\end{eqnarray*}\n\n<\/p>\n\n\n\n<p>\nCompleting the square is a powerful method that is used to derive the\nquadratic formula:\n\n<\/p>\n\n\n\n<p>\nWe will find the roots of $ax^2+bx+c=0$:\n\\begin{eqnarray*}\n\tax^2+bx+c&amp;=&amp;0\\\\\n\tx^2+\\frac{b}{a}x+\\frac{c}{a}&amp;=&amp;0\\\\\n\tx^2+\\frac{b}{a}x\\qquad&amp;=&amp;-\\frac{c}{a}\\\\\n\tx^2+\\frac{b}{a}x+\\frac{b^2}{4a^2}&amp;=&amp;\\frac{b^2}{4a^2}-\\frac{c}{a}\\\\\n\t\\left(x+\\frac{b}{2a}\\right)^2&amp;=&amp;\\frac{b^2-4ac}{4a^2}\\\\\n\tx+\\frac{b}{2a}&amp;=&amp;\\pm \\frac{\\sqrt{b^2-4ac}}{2a}\\\\\n\tx&amp;=&amp;\\frac{-b\\pm \\sqrt{b^2-4ac}}{2a}\n\\end{eqnarray*}\nwhich is the familiar quadratic formula!\n\n<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<center>\n<h4>Key Concept<\/h4>\n<\/center>\n\n\n\n<p>\n\nBy completing the square, we may rewrite any quadratic polynomial\n\\[ax^2+bx+x\\] \nin the form \n\\[a\\left[(x+k_1)^2+k_2\\right]\\]\nwhere $k_1$ and $k_2$ may be positive or negative.  Integrals containing\nnegative or non-integer powers of $ax^2+bx+c$ can often be computed\nusing a trigonometric substitution or looked up in an integral table\nafter being rewritten in this form.\n\n\n\n<br><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\n\n[<a href=\"https:\/\/physics.hmc.edu\/ct\/quiz\/QZ2010\/\">I&#8217;m ready to take the quiz.<\/a>]\n[<a href=\"#top\">I need to review more.<\/a>]<br>\n\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Computing Integrals by Completing the Square &#8211; HMC Calculus Tutorial We will review the method of completing the square in the context of evaluating integrals: Example Let&#8217;s start by evaluating \\[\\int\\frac{dx}{2x^2-12x+26}.\\] The denominator does not factor with rational coefficients, so partial fractions is not a viable option. There is also no obvious substitution to make.&hellip;<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":57,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[],"class_list":["post-162","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/math.hmc.edu\/calculus\/wp-json\/wp\/v2\/pages\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/math.hmc.edu\/calculus\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/math.hmc.edu\/calculus\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/math.hmc.edu\/calculus\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/math.hmc.edu\/calculus\/wp-json\/wp\/v2\/comments?post=162"}],"version-history":[{"count":3,"href":"https:\/\/math.hmc.edu\/calculus\/wp-json\/wp\/v2\/pages\/162\/revisions"}],"predecessor-version":[{"id":1082,"href":"https:\/\/math.hmc.edu\/calculus\/wp-json\/wp\/v2\/pages\/162\/revisions\/1082"}],"up":[{"embeddable":true,"href":"https:\/\/math.hmc.edu\/calculus\/wp-json\/wp\/v2\/pages\/57"}],"wp:attachment":[{"href":"https:\/\/math.hmc.edu\/calculus\/wp-json\/wp\/v2\/media?parent=162"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/math.hmc.edu\/calculus\/wp-json\/wp\/v2\/tags?post=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}