{"id":835,"date":"2025-06-20T17:16:35","date_gmt":"2025-06-20T17:16:35","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/calculus2\/?post_type=chapter&#038;p=835"},"modified":"2025-09-10T17:29:06","modified_gmt":"2025-09-10T17:29:06","slug":"first-order-linear-equations-and-applications-learn-it-3","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/calculus2\/chapter\/first-order-linear-equations-and-applications-learn-it-3\/","title":{"raw":"First-Order Linear Equations and Applications: Learn It 3","rendered":"First-Order Linear Equations and Applications: Learn It 3"},"content":{"raw":"<h2 data-type=\"title\">Integrating Factors<\/h2>\r\n<p id=\"fs-id1170572337196\">We now develop a solution technique for any first-order linear differential equation. We start with the standard form of a first-order linear differential equation:<\/p>\r\n\r\n<div id=\"fs-id1170572130093\" style=\"text-align: center;\" data-type=\"equation\">[latex]y^{\\prime} +p\\left(x\\right)y=q\\left(x\\right)[\/latex].<\/div>\r\n<p class=\"whitespace-normal break-words\">The first term on the left-hand side is the derivative of the unknown function, and the second term is the product of a known function with the unknown function. This is somewhat reminiscent of the product rule from differentiation.<\/p>\r\n<p class=\"whitespace-normal break-words\">If we multiply [latex]y' +p(x)y=q(x)[\/latex] by a yet-to-be-determined function [latex]\\mu(x)[\/latex], then the equation becomes:<\/p>\r\n\r\n<div id=\"fs-id1170572449739\" style=\"text-align: center;\" data-type=\"equation\">[latex]\\mu \\left(x\\right){y}^{\\prime }+\\mu \\left(x\\right)p\\left(x\\right)y=\\mu \\left(x\\right)q\\left(x\\right)[\/latex].<\/div>\r\n<p id=\"fs-id1170572168782\">The left-hand side of [latex]y^{\\prime} +p\\left(x\\right)y=q\\left(x\\right)[\/latex] can be matched perfectly to the product rule.<\/p>\r\n\r\n<section class=\"textbox recall\" aria-label=\"Recall\">\r\n<p class=\"whitespace-normal break-words\">Recall the product rule:<\/p>\r\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]\\frac{d}{dx}[f(x)g(x)]=f'(x)g(x)+f(x)g'(x)[\/latex]<\/p>\r\n\r\n<\/section>\r\n<p id=\"fs-id1170572482443\">Matching term by term gives us [latex]y=f(x)[\/latex], [latex]g(x)=\\mu(x)[\/latex], and [latex]g'(x)=\\mu(x)p(x)[\/latex]. Taking the derivative of [latex]g(x)=\\mu(x)[\/latex] and setting it equal to the right-hand side of [latex]g'(x)=\\mu(x)p(x)[\/latex] leads to:<\/p>\r\n\r\n<div id=\"fs-id1170571832251\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]{\\mu }^{\\prime }\\left(x\\right)=\\mu \\left(x\\right)p\\left(x\\right)[\/latex].<\/div>\r\n<p id=\"fs-id1170572397269\">This is a first-order, separable differential equation for [latex]\\mu(x)[\/latex]. We know [latex]p(x)[\/latex] because it appears in the differential equation we are solving. Separating variables and integrating yields:<\/p>\r\n\r\n<div id=\"fs-id1170571564354\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill \\frac{{\\mu }^{\\prime }\\left(x\\right)}{\\mu \\left(x\\right)}&amp; =\\hfill &amp; p\\left(x\\right)\\hfill \\\\ \\hfill {\\displaystyle\\int \\frac{{\\mu }^{\\prime }\\left(x\\right)}{\\mu \\left(x\\right)}dx}&amp; =\\hfill &amp; {\\displaystyle\\int p\\left(x\\right)dx}\\hfill \\\\ \\hfill \\text{ln}|\\mu \\left(x\\right)|&amp; =\\hfill &amp; {\\displaystyle\\int p\\left(x\\right)dx+C}\\hfill \\\\ \\hfill {e}^{\\text{ln}|\\mu \\left(x\\right)|}&amp; =\\hfill &amp; {e}^{\\displaystyle\\int p\\left(x\\right)dx+C}\\hfill \\\\ \\hfill |\\mu \\left(x\\right)|&amp; =\\hfill &amp; {C}_{1}{e}^{\\displaystyle\\int p\\left(x\\right)dx}\\hfill \\\\ \\hfill \\mu \\left(x\\right)&amp; =\\hfill &amp; {C}_{2}{e}^{\\displaystyle\\int p\\left(x\\right)dx}\\hfill \\end{array}[\/latex]<\/div>\r\n<p class=\"whitespace-normal break-words\">Here [latex]C_2[\/latex] can be an arbitrary (positive or negative) constant. Since we only need one integrating factor to solve our equation, we can set [latex]C_2 = 1[\/latex]. This leads to a general method for solving a first-order linear differential equation.<\/p>\r\n<p class=\"whitespace-normal break-words\">We first multiply both sides of [latex]y' +p(x)y=q(x)[\/latex] by the integrating factor [latex]\\mu(x)[\/latex]. This gives:<\/p>\r\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]\\mu(x)y' +\\mu(x)p(x)y=\\mu(x)q(x)[\/latex]<\/p>\r\n<p class=\"whitespace-normal break-words\">The left-hand side can be rewritten as [latex]\\frac{d}{dx}(\\mu(x)y)[\/latex]:<\/p>\r\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]\\frac{d}{dx}(\\mu(x)y)=\\mu(x)q(x)[\/latex]<\/p>\r\n<p class=\"whitespace-normal break-words\">Next integrate both sides with respect to [latex]x[\/latex]:<\/p>\r\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]\\begin{array}{ccc}\\hfill \\int \\frac{d}{dx}(\\mu(x)y)dx&amp; =\\hfill &amp; \\int \\mu(x)q(x)dx\\hfill \\ \\hfill \\mu(x)y&amp; =\\hfill &amp; \\int \\mu(x)q(x)dx\\hfill \\end{array}[\/latex]<\/p>\r\n<p class=\"whitespace-normal break-words\">Divide both sides by [latex]\\mu(x)[\/latex]:<\/p>\r\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]y=\\frac{1}{\\mu(x)}\\left[\\int \\mu(x)q(x)dx+C\\right][\/latex]<\/p>\r\n<p class=\"whitespace-normal break-words\">Since [latex]\\mu(x)[\/latex] was previously calculated, we are now finished.<\/p>\r\n\r\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\r\n<h3>integrating factor<\/h3>\r\nAn integrating factor is a function [latex]\\mu(x)[\/latex] that, when multiplied by a first-order linear differential equation, makes the left side equal to the derivative of a product. For the standard form [latex]y' + p(x)y = q(x)[\/latex], the integrating factor is:\r\n<p class=\"whitespace-pre-wrap break-words\" style=\"text-align: center;\">[latex]\\mu(x) = e^{\\int p(x)dx}[\/latex]<\/p>\r\n\r\n<\/section><section class=\"textbox proTip\" aria-label=\"Pro Tip\">When finding the integrating factor, we can set the constant of integration to zero since we only need one specific integrating factor. However, when solving for [latex]y[\/latex], we must include the constant [latex]C[\/latex] to get the general family of solutions.<\/section><section class=\"textbox questionHelp\" aria-label=\"Question Help\">\r\n<p data-type=\"title\"><strong>Problem-Solving Strategy: Solving a First-order Linear Differential Equation<\/strong><\/p>\r\n\r\n<ol id=\"fs-id1170571748988\" type=\"1\">\r\n \t<li>Put the equation into standard form and identify [latex]p\\left(x\\right)[\/latex] and [latex]q\\left(x\\right)[\/latex].<\/li>\r\n \t<li>Calculate the integrating factor [latex]\\mu \\left(x\\right)={e}^{\\displaystyle\\int p\\left(x\\right)dx}[\/latex].<\/li>\r\n \t<li>Multiply both sides of the differential equation by [latex]\\mu \\left(x\\right)[\/latex].<\/li>\r\n \t<li>Integrate both sides of the equation obtained in step [latex]3[\/latex], and divide both sides by [latex]\\mu \\left(x\\right)[\/latex].<\/li>\r\n \t<li>If there is an initial condition, determine the value of [latex]C[\/latex].<\/li>\r\n<\/ol>\r\n<\/section><section class=\"textbox example\" aria-label=\"Example\">\r\n<div id=\"fs-id1170572321367\" data-type=\"problem\">\r\n<p id=\"fs-id1170572572214\">Find a general solution for the differential equation [latex]xy^{\\prime} +3y=4{x}^{2}-3x[\/latex]. Assume [latex]x&gt;0[\/latex].<\/p>\r\n\r\n<\/div>\r\n[reveal-answer q=\"44558896\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"44558896\"]\r\n<div id=\"fs-id1170572622201\" data-type=\"solution\">\r\n<ol id=\"fs-id1170572309310\" type=\"1\">\r\n \t<li>To put this differential equation into standard form, divide both sides by [latex]x\\text{:}[\/latex] <span data-type=\"newline\">\r\n<\/span>\r\n<div id=\"fs-id1170572370908\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]y^{\\prime} +\\frac{3}{x}y=4x - 3[\/latex].<\/div>\r\n<span data-type=\"newline\">\r\n<\/span>\r\nTherefore [latex]p\\left(x\\right)=\\frac{3}{x}[\/latex] and [latex]q\\left(x\\right)=4x - 3[\/latex].<\/li>\r\n \t<li>The integrating factor is [latex]\\mu \\left(x\\right)={e}^{\\displaystyle\\int \\left(\\frac{3}{x}\\right)dx}={e}^{3\\text{ln}x}={x}^{3}[\/latex].<\/li>\r\n \t<li>Multiplying both sides of the differential equation by [latex]\\mu \\left(x\\right)[\/latex] gives us<span data-type=\"newline\">\r\n<\/span>\r\n<div id=\"fs-id1170572116162\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill {x}^{3}{y}^{\\prime }+{x}^{3}\\left(\\frac{3}{x}\\right)y&amp; =\\hfill &amp; {x}^{3}\\left(4x - 3\\right)\\hfill \\\\ \\hfill {x}^{3}{y}^{\\prime }+3{x}^{2}y&amp; =\\hfill &amp; 4{x}^{4}-3{x}^{3}\\hfill \\\\ \\hfill \\frac{d}{dx}\\left({x}^{3}y\\right)&amp; =\\hfill &amp; 4{x}^{4}-3{x}^{3}.\\hfill \\end{array}[\/latex]<\/div>\r\n&nbsp;<\/li>\r\n \t<li>Integrate both sides of the equation.<span data-type=\"newline\">\r\n<\/span>\r\n<div id=\"fs-id1170572369225\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill {\\displaystyle\\int \\frac{d}{dx}\\left({x}^{3}y\\right)dx}&amp; =\\hfill &amp; {\\displaystyle\\int 4{x}^{4}-3{x}^{3}dx}\\hfill \\\\ \\hfill {x}^{3}y&amp; =\\hfill &amp; \\frac{4{x}^{5}}{5}-\\frac{3{x}^{4}}{4}+C\\hfill \\\\ \\hfill y&amp; =\\hfill &amp; \\frac{4{x}^{2}}{5}-\\frac{3x}{4}+C{x}^{-3}.\\hfill \\end{array}[\/latex]<\/div>\r\n&nbsp;<\/li>\r\n \t<li>There is no initial value, so the problem is complete.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<div id=\"fs-id1170572585959\" data-type=\"commentary\">\r\n<div data-type=\"title\"><strong>Analysis<\/strong><\/div>\r\n<p id=\"fs-id1170572169556\">You may have noticed the condition that was imposed on the differential equation; namely, [latex]x&gt;0[\/latex]. For any nonzero value of [latex]C[\/latex], the general solution is not defined at [latex]x=0[\/latex]. Furthermore, when [latex]x&lt;0[\/latex], the integrating factor changes. The integrating factor is given by [latex]\\mu \\left(x\\right){y}^{\\prime }+\\mu \\left(x\\right)p\\left(x\\right)y=\\mu \\left(x\\right)q\\left(x\\right)[\/latex]\u00a0as [latex]f\\left(x\\right)={e}^{\\displaystyle\\int p\\left(x\\right)dx}[\/latex]. For this [latex]p\\left(x\\right)[\/latex] we get<\/p>\r\n\r\n<div id=\"fs-id1170572505442\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]{e}^{\\displaystyle\\int p\\left(x\\right)dx=}{e}^{\\displaystyle\\int \\left(\\frac{3}{x}\\right)dx}={e}^{3\\text{ln}|x|}={|x|}^{3}[\/latex],<\/div>\r\n&nbsp;\r\n<p id=\"fs-id1170571600638\">since [latex]x&lt;0[\/latex]. The behavior of the general solution changes at [latex]x=0[\/latex] largely due to the fact that [latex]p\\left(x\\right)[\/latex] is not defined there.<\/p>\r\n\r\n<\/div>\r\n[\/hidden-answer]\r\n\r\n<\/section><section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the example above.<center><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/doLN3RtE264?controls=0&amp;start=0&amp;end=300&amp;autoplay=0\" width=\"750\" height=\"450\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/center>For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.You can view the <a href=\"https:\/\/oerfiles.s3.us-west-2.amazonaws.com\/Calculus+II\/Transcripts\/4.5.2_0to300_transcript.html\" target=\"_blank\" rel=\"noopener\">transcript for this segmented clip of \"4.5.2\" here (opens in new window)<\/a>.<\/section>Now we use the same strategy to find the solution to an initial-value problem.\r\n\r\n<section class=\"textbox example\" aria-label=\"Example\">\r\n<div id=\"fs-id1170572643199\" data-type=\"problem\">\r\n<p id=\"fs-id1170572643204\">Solve the initial-value problem<\/p>\r\n\r\n<div id=\"fs-id1170571609231\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]{y}^{\\prime }+3y=2x - 1,y\\left(0\\right)=3[\/latex].<\/div>\r\n&nbsp;\r\n\r\n<\/div>\r\n[reveal-answer q=\"44558893\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"44558893\"]\r\n<div id=\"fs-id1170571653907\" data-type=\"solution\">\r\n<ol id=\"fs-id1170571653909\" type=\"1\">\r\n \t<li>This differential equation is already in standard form with [latex]p\\left(x\\right)=3[\/latex] and [latex]q\\left(x\\right)=2x - 1[\/latex].<\/li>\r\n \t<li>The integrating factor is [latex]\\mu \\left(x\\right)={e}^{\\displaystyle\\int 3dx}={e}^{3x}[\/latex].<\/li>\r\n \t<li>Multiplying both sides of the differential equation by [latex]\\mu \\left(x\\right)[\/latex] gives<span data-type=\"newline\">\r\n<\/span>\r\n<div id=\"fs-id1170572481493\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill {e}^{3x}{y}^{\\prime }+3{e}^{3x}y&amp; =\\hfill &amp; \\left(2x - 1\\right){e}^{3x}\\hfill \\\\ \\hfill \\frac{d}{dx}\\left[y{e}^{3x}\\right]&amp; =\\hfill &amp; \\left(2x - 1\\right){e}^{3x}.\\hfill \\end{array}[\/latex]<\/div>\r\n<span data-type=\"newline\">\r\n<\/span>\r\nIntegrate both sides of the equation:<span data-type=\"newline\">\r\n<\/span>\r\n<div id=\"fs-id1170571593388\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill {\\displaystyle\\int \\frac{d}{dx}\\left[y{e}^{3x}\\right]dx}&amp; =\\hfill &amp; {\\displaystyle\\int \\left(2x - 1\\right){e}^{3x}dx}\\hfill \\\\ \\hfill y{e}^{3x}&amp; =\\hfill &amp; \\frac{{e}^{3x}}{3}\\left(2x - 1\\right)-{\\displaystyle\\int \\frac{2}{3}{e}^{3x}dx}\\hfill \\\\ \\hfill y{e}^{3x}&amp; =\\hfill &amp; \\frac{{e}^{3x}\\left(2x - 1\\right)}{3}-\\frac{2{e}^{3x}}{9}+C\\hfill \\\\ \\hfill y&amp; =\\hfill &amp; \\frac{2x - 1}{3}-\\frac{2}{9}+C{e}^{-3x}\\hfill \\\\ \\hfill y&amp; =\\hfill &amp; \\frac{2x}{3}-\\frac{5}{9}+C{e}^{-3x}.\\hfill \\end{array}[\/latex]<\/div>\r\n&nbsp;<\/li>\r\n \t<li>Now substitute [latex]x=0[\/latex] and [latex]y=3[\/latex] into the general solution and solve for [latex]C\\text{:}[\/latex] <span data-type=\"newline\">\r\n<\/span>\r\n<div id=\"fs-id1170571595426\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill y&amp; =\\hfill &amp; \\frac{2}{3}x-\\frac{5}{9}+C{e}^{-3x}\\hfill \\\\ \\hfill 3&amp; =\\hfill &amp; \\frac{2}{3}\\left(0\\right)-\\frac{5}{9}+C{e}^{-3\\left(0\\right)}\\hfill \\\\ \\hfill 3&amp; =\\hfill &amp; -\\frac{5}{9}+C\\hfill \\\\ \\hfill C&amp; =\\hfill &amp; \\frac{32}{9}.\\hfill \\end{array}[\/latex]<\/div>\r\n<span data-type=\"newline\">\r\n<\/span>\r\nTherefore the solution to the initial-value problem is<span data-type=\"newline\">\r\n<\/span>\r\n<div id=\"fs-id1170572592117\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]y=\\frac{2}{3}x-\\frac{5}{9}+\\frac{32}{9}{e}^{-3x}[\/latex].<\/div>\r\n&nbsp;<\/li>\r\n<\/ol>\r\n<\/div>\r\n[\/hidden-answer]\r\n\r\n<\/section><section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the example above.<center><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/doLN3RtE264?controls=0&amp;start=301&amp;end=630&amp;autoplay=0\" width=\"750\" height=\"450\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/center>For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.You can view the <a href=\"https:\/\/oerfiles.s3.us-west-2.amazonaws.com\/Calculus+II\/Transcripts\/4.5.2_301to630_transcript.html\" target=\"_blank\" rel=\"noopener\">transcript for this segmented clip of \"4.5.2\" here (opens in new window)<\/a>.<\/section><section class=\"textbox tryIt\" aria-label=\"Try It\">[ohm_question hide_question_numbers=1]311313[\/ohm_question]<\/section>","rendered":"<h2 data-type=\"title\">Integrating Factors<\/h2>\n<p id=\"fs-id1170572337196\">We now develop a solution technique for any first-order linear differential equation. We start with the standard form of a first-order linear differential equation:<\/p>\n<div id=\"fs-id1170572130093\" style=\"text-align: center;\" data-type=\"equation\">[latex]y^{\\prime} +p\\left(x\\right)y=q\\left(x\\right)[\/latex].<\/div>\n<p class=\"whitespace-normal break-words\">The first term on the left-hand side is the derivative of the unknown function, and the second term is the product of a known function with the unknown function. This is somewhat reminiscent of the product rule from differentiation.<\/p>\n<p class=\"whitespace-normal break-words\">If we multiply [latex]y' +p(x)y=q(x)[\/latex] by a yet-to-be-determined function [latex]\\mu(x)[\/latex], then the equation becomes:<\/p>\n<div id=\"fs-id1170572449739\" style=\"text-align: center;\" data-type=\"equation\">[latex]\\mu \\left(x\\right){y}^{\\prime }+\\mu \\left(x\\right)p\\left(x\\right)y=\\mu \\left(x\\right)q\\left(x\\right)[\/latex].<\/div>\n<p id=\"fs-id1170572168782\">The left-hand side of [latex]y^{\\prime} +p\\left(x\\right)y=q\\left(x\\right)[\/latex] can be matched perfectly to the product rule.<\/p>\n<section class=\"textbox recall\" aria-label=\"Recall\">\n<p class=\"whitespace-normal break-words\">Recall the product rule:<\/p>\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]\\frac{d}{dx}[f(x)g(x)]=f'(x)g(x)+f(x)g'(x)[\/latex]<\/p>\n<\/section>\n<p id=\"fs-id1170572482443\">Matching term by term gives us [latex]y=f(x)[\/latex], [latex]g(x)=\\mu(x)[\/latex], and [latex]g'(x)=\\mu(x)p(x)[\/latex]. Taking the derivative of [latex]g(x)=\\mu(x)[\/latex] and setting it equal to the right-hand side of [latex]g'(x)=\\mu(x)p(x)[\/latex] leads to:<\/p>\n<div id=\"fs-id1170571832251\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]{\\mu }^{\\prime }\\left(x\\right)=\\mu \\left(x\\right)p\\left(x\\right)[\/latex].<\/div>\n<p id=\"fs-id1170572397269\">This is a first-order, separable differential equation for [latex]\\mu(x)[\/latex]. We know [latex]p(x)[\/latex] because it appears in the differential equation we are solving. Separating variables and integrating yields:<\/p>\n<div id=\"fs-id1170571564354\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill \\frac{{\\mu }^{\\prime }\\left(x\\right)}{\\mu \\left(x\\right)}& =\\hfill & p\\left(x\\right)\\hfill \\\\ \\hfill {\\displaystyle\\int \\frac{{\\mu }^{\\prime }\\left(x\\right)}{\\mu \\left(x\\right)}dx}& =\\hfill & {\\displaystyle\\int p\\left(x\\right)dx}\\hfill \\\\ \\hfill \\text{ln}|\\mu \\left(x\\right)|& =\\hfill & {\\displaystyle\\int p\\left(x\\right)dx+C}\\hfill \\\\ \\hfill {e}^{\\text{ln}|\\mu \\left(x\\right)|}& =\\hfill & {e}^{\\displaystyle\\int p\\left(x\\right)dx+C}\\hfill \\\\ \\hfill |\\mu \\left(x\\right)|& =\\hfill & {C}_{1}{e}^{\\displaystyle\\int p\\left(x\\right)dx}\\hfill \\\\ \\hfill \\mu \\left(x\\right)& =\\hfill & {C}_{2}{e}^{\\displaystyle\\int p\\left(x\\right)dx}\\hfill \\end{array}[\/latex]<\/div>\n<p class=\"whitespace-normal break-words\">Here [latex]C_2[\/latex] can be an arbitrary (positive or negative) constant. Since we only need one integrating factor to solve our equation, we can set [latex]C_2 = 1[\/latex]. This leads to a general method for solving a first-order linear differential equation.<\/p>\n<p class=\"whitespace-normal break-words\">We first multiply both sides of [latex]y' +p(x)y=q(x)[\/latex] by the integrating factor [latex]\\mu(x)[\/latex]. This gives:<\/p>\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]\\mu(x)y' +\\mu(x)p(x)y=\\mu(x)q(x)[\/latex]<\/p>\n<p class=\"whitespace-normal break-words\">The left-hand side can be rewritten as [latex]\\frac{d}{dx}(\\mu(x)y)[\/latex]:<\/p>\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]\\frac{d}{dx}(\\mu(x)y)=\\mu(x)q(x)[\/latex]<\/p>\n<p class=\"whitespace-normal break-words\">Next integrate both sides with respect to [latex]x[\/latex]:<\/p>\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]\\begin{array}{ccc}\\hfill \\int \\frac{d}{dx}(\\mu(x)y)dx& =\\hfill & \\int \\mu(x)q(x)dx\\hfill \\ \\hfill \\mu(x)y& =\\hfill & \\int \\mu(x)q(x)dx\\hfill \\end{array}[\/latex]<\/p>\n<p class=\"whitespace-normal break-words\">Divide both sides by [latex]\\mu(x)[\/latex]:<\/p>\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]y=\\frac{1}{\\mu(x)}\\left[\\int \\mu(x)q(x)dx+C\\right][\/latex]<\/p>\n<p class=\"whitespace-normal break-words\">Since [latex]\\mu(x)[\/latex] was previously calculated, we are now finished.<\/p>\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\n<h3>integrating factor<\/h3>\n<p>An integrating factor is a function [latex]\\mu(x)[\/latex] that, when multiplied by a first-order linear differential equation, makes the left side equal to the derivative of a product. For the standard form [latex]y' + p(x)y = q(x)[\/latex], the integrating factor is:<\/p>\n<p class=\"whitespace-pre-wrap break-words\" style=\"text-align: center;\">[latex]\\mu(x) = e^{\\int p(x)dx}[\/latex]<\/p>\n<\/section>\n<section class=\"textbox proTip\" aria-label=\"Pro Tip\">When finding the integrating factor, we can set the constant of integration to zero since we only need one specific integrating factor. However, when solving for [latex]y[\/latex], we must include the constant [latex]C[\/latex] to get the general family of solutions.<\/section>\n<section class=\"textbox questionHelp\" aria-label=\"Question Help\">\n<p data-type=\"title\"><strong>Problem-Solving Strategy: Solving a First-order Linear Differential Equation<\/strong><\/p>\n<ol id=\"fs-id1170571748988\" type=\"1\">\n<li>Put the equation into standard form and identify [latex]p\\left(x\\right)[\/latex] and [latex]q\\left(x\\right)[\/latex].<\/li>\n<li>Calculate the integrating factor [latex]\\mu \\left(x\\right)={e}^{\\displaystyle\\int p\\left(x\\right)dx}[\/latex].<\/li>\n<li>Multiply both sides of the differential equation by [latex]\\mu \\left(x\\right)[\/latex].<\/li>\n<li>Integrate both sides of the equation obtained in step [latex]3[\/latex], and divide both sides by [latex]\\mu \\left(x\\right)[\/latex].<\/li>\n<li>If there is an initial condition, determine the value of [latex]C[\/latex].<\/li>\n<\/ol>\n<\/section>\n<section class=\"textbox example\" aria-label=\"Example\">\n<div id=\"fs-id1170572321367\" data-type=\"problem\">\n<p id=\"fs-id1170572572214\">Find a general solution for the differential equation [latex]xy^{\\prime} +3y=4{x}^{2}-3x[\/latex]. Assume [latex]x>0[\/latex].<\/p>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q44558896\">Show Solution<\/button><\/p>\n<div id=\"q44558896\" class=\"hidden-answer\" style=\"display: none\">\n<div id=\"fs-id1170572622201\" data-type=\"solution\">\n<ol id=\"fs-id1170572309310\" type=\"1\">\n<li>To put this differential equation into standard form, divide both sides by [latex]x\\text{:}[\/latex] <span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<div id=\"fs-id1170572370908\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]y^{\\prime} +\\frac{3}{x}y=4x - 3[\/latex].<\/div>\n<p><span data-type=\"newline\"><br \/>\n<\/span><br \/>\nTherefore [latex]p\\left(x\\right)=\\frac{3}{x}[\/latex] and [latex]q\\left(x\\right)=4x - 3[\/latex].<\/li>\n<li>The integrating factor is [latex]\\mu \\left(x\\right)={e}^{\\displaystyle\\int \\left(\\frac{3}{x}\\right)dx}={e}^{3\\text{ln}x}={x}^{3}[\/latex].<\/li>\n<li>Multiplying both sides of the differential equation by [latex]\\mu \\left(x\\right)[\/latex] gives us<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<div id=\"fs-id1170572116162\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill {x}^{3}{y}^{\\prime }+{x}^{3}\\left(\\frac{3}{x}\\right)y& =\\hfill & {x}^{3}\\left(4x - 3\\right)\\hfill \\\\ \\hfill {x}^{3}{y}^{\\prime }+3{x}^{2}y& =\\hfill & 4{x}^{4}-3{x}^{3}\\hfill \\\\ \\hfill \\frac{d}{dx}\\left({x}^{3}y\\right)& =\\hfill & 4{x}^{4}-3{x}^{3}.\\hfill \\end{array}[\/latex]<\/div>\n<p>&nbsp;<\/li>\n<li>Integrate both sides of the equation.<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<div id=\"fs-id1170572369225\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill {\\displaystyle\\int \\frac{d}{dx}\\left({x}^{3}y\\right)dx}& =\\hfill & {\\displaystyle\\int 4{x}^{4}-3{x}^{3}dx}\\hfill \\\\ \\hfill {x}^{3}y& =\\hfill & \\frac{4{x}^{5}}{5}-\\frac{3{x}^{4}}{4}+C\\hfill \\\\ \\hfill y& =\\hfill & \\frac{4{x}^{2}}{5}-\\frac{3x}{4}+C{x}^{-3}.\\hfill \\end{array}[\/latex]<\/div>\n<p>&nbsp;<\/li>\n<li>There is no initial value, so the problem is complete.<\/li>\n<\/ol>\n<\/div>\n<div id=\"fs-id1170572585959\" data-type=\"commentary\">\n<div data-type=\"title\"><strong>Analysis<\/strong><\/div>\n<p id=\"fs-id1170572169556\">You may have noticed the condition that was imposed on the differential equation; namely, [latex]x>0[\/latex]. For any nonzero value of [latex]C[\/latex], the general solution is not defined at [latex]x=0[\/latex]. Furthermore, when [latex]x<0[\/latex], the integrating factor changes. The integrating factor is given by [latex]\\mu \\left(x\\right){y}^{\\prime }+\\mu \\left(x\\right)p\\left(x\\right)y=\\mu \\left(x\\right)q\\left(x\\right)[\/latex]\u00a0as [latex]f\\left(x\\right)={e}^{\\displaystyle\\int p\\left(x\\right)dx}[\/latex]. For this [latex]p\\left(x\\right)[\/latex] we get<\/p>\n<div id=\"fs-id1170572505442\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]{e}^{\\displaystyle\\int p\\left(x\\right)dx=}{e}^{\\displaystyle\\int \\left(\\frac{3}{x}\\right)dx}={e}^{3\\text{ln}|x|}={|x|}^{3}[\/latex],<\/div>\n<p>&nbsp;<\/p>\n<p id=\"fs-id1170571600638\">since [latex]x<0[\/latex]. The behavior of the general solution changes at [latex]x=0[\/latex] largely due to the fact that [latex]p\\left(x\\right)[\/latex] is not defined there.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the example above.<\/p>\n<div style=\"text-align: center;\"><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/doLN3RtE264?controls=0&amp;start=0&amp;end=300&amp;autoplay=0\" width=\"750\" height=\"450\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/div>\n<p>For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.You can view the <a href=\"https:\/\/oerfiles.s3.us-west-2.amazonaws.com\/Calculus+II\/Transcripts\/4.5.2_0to300_transcript.html\" target=\"_blank\" rel=\"noopener\">transcript for this segmented clip of &#8220;4.5.2&#8221; here (opens in new window)<\/a>.<\/section>\n<p>Now we use the same strategy to find the solution to an initial-value problem.<\/p>\n<section class=\"textbox example\" aria-label=\"Example\">\n<div id=\"fs-id1170572643199\" data-type=\"problem\">\n<p id=\"fs-id1170572643204\">Solve the initial-value problem<\/p>\n<div id=\"fs-id1170571609231\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]{y}^{\\prime }+3y=2x - 1,y\\left(0\\right)=3[\/latex].<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q44558893\">Show Solution<\/button><\/p>\n<div id=\"q44558893\" class=\"hidden-answer\" style=\"display: none\">\n<div id=\"fs-id1170571653907\" data-type=\"solution\">\n<ol id=\"fs-id1170571653909\" type=\"1\">\n<li>This differential equation is already in standard form with [latex]p\\left(x\\right)=3[\/latex] and [latex]q\\left(x\\right)=2x - 1[\/latex].<\/li>\n<li>The integrating factor is [latex]\\mu \\left(x\\right)={e}^{\\displaystyle\\int 3dx}={e}^{3x}[\/latex].<\/li>\n<li>Multiplying both sides of the differential equation by [latex]\\mu \\left(x\\right)[\/latex] gives<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<div id=\"fs-id1170572481493\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill {e}^{3x}{y}^{\\prime }+3{e}^{3x}y& =\\hfill & \\left(2x - 1\\right){e}^{3x}\\hfill \\\\ \\hfill \\frac{d}{dx}\\left[y{e}^{3x}\\right]& =\\hfill & \\left(2x - 1\\right){e}^{3x}.\\hfill \\end{array}[\/latex]<\/div>\n<p><span data-type=\"newline\"><br \/>\n<\/span><br \/>\nIntegrate both sides of the equation:<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<div id=\"fs-id1170571593388\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill {\\displaystyle\\int \\frac{d}{dx}\\left[y{e}^{3x}\\right]dx}& =\\hfill & {\\displaystyle\\int \\left(2x - 1\\right){e}^{3x}dx}\\hfill \\\\ \\hfill y{e}^{3x}& =\\hfill & \\frac{{e}^{3x}}{3}\\left(2x - 1\\right)-{\\displaystyle\\int \\frac{2}{3}{e}^{3x}dx}\\hfill \\\\ \\hfill y{e}^{3x}& =\\hfill & \\frac{{e}^{3x}\\left(2x - 1\\right)}{3}-\\frac{2{e}^{3x}}{9}+C\\hfill \\\\ \\hfill y& =\\hfill & \\frac{2x - 1}{3}-\\frac{2}{9}+C{e}^{-3x}\\hfill \\\\ \\hfill y& =\\hfill & \\frac{2x}{3}-\\frac{5}{9}+C{e}^{-3x}.\\hfill \\end{array}[\/latex]<\/div>\n<p>&nbsp;<\/li>\n<li>Now substitute [latex]x=0[\/latex] and [latex]y=3[\/latex] into the general solution and solve for [latex]C\\text{:}[\/latex] <span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<div id=\"fs-id1170571595426\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]\\begin{array}{ccc}\\hfill y& =\\hfill & \\frac{2}{3}x-\\frac{5}{9}+C{e}^{-3x}\\hfill \\\\ \\hfill 3& =\\hfill & \\frac{2}{3}\\left(0\\right)-\\frac{5}{9}+C{e}^{-3\\left(0\\right)}\\hfill \\\\ \\hfill 3& =\\hfill & -\\frac{5}{9}+C\\hfill \\\\ \\hfill C& =\\hfill & \\frac{32}{9}.\\hfill \\end{array}[\/latex]<\/div>\n<p><span data-type=\"newline\"><br \/>\n<\/span><br \/>\nTherefore the solution to the initial-value problem is<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<div id=\"fs-id1170572592117\" class=\"unnumbered\" style=\"text-align: center;\" data-type=\"equation\" data-label=\"\">[latex]y=\\frac{2}{3}x-\\frac{5}{9}+\\frac{32}{9}{e}^{-3x}[\/latex].<\/div>\n<p>&nbsp;<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the example above.<\/p>\n<div style=\"text-align: center;\"><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/doLN3RtE264?controls=0&amp;start=301&amp;end=630&amp;autoplay=0\" width=\"750\" height=\"450\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/div>\n<p>For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.You can view the <a href=\"https:\/\/oerfiles.s3.us-west-2.amazonaws.com\/Calculus+II\/Transcripts\/4.5.2_301to630_transcript.html\" target=\"_blank\" rel=\"noopener\">transcript for this segmented clip of &#8220;4.5.2&#8221; here (opens in new window)<\/a>.<\/section>\n<section class=\"textbox tryIt\" aria-label=\"Try It\"><iframe loading=\"lazy\" id=\"ohm311313\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=311313&theme=lumen&iframe_resize_id=ohm311313&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n","protected":false},"author":15,"menu_order":24,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":669,"module-header":"- Select Header -","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapters\/835"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/wp\/v2\/users\/15"}],"version-history":[{"count":7,"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapters\/835\/revisions"}],"predecessor-version":[{"id":2296,"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapters\/835\/revisions\/2296"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/parts\/669"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapters\/835\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/wp\/v2\/media?parent=835"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/pressbooks\/v2\/chapter-type?post=835"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/wp\/v2\/contributor?post=835"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus2\/wp-json\/wp\/v2\/license?post=835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}