{"id":824,"date":"2025-10-09T15:41:48","date_gmt":"2025-10-09T15:41:48","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/calculus3\/?post_type=chapter&#038;p=824"},"modified":"2025-11-11T15:02:11","modified_gmt":"2025-11-11T15:02:11","slug":"nonhomogeneous-linear-equations-learn-it-1","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/calculus3\/chapter\/nonhomogeneous-linear-equations-learn-it-1\/","title":{"raw":"Nonhomogeneous Linear Equations: Learn It 1","rendered":"Nonhomogeneous Linear Equations: Learn It 1"},"content":{"raw":"<section class=\"textbox learningGoals\" aria-label=\"Learning Goals\">\r\n<ul>\r\n \t<li>Find general solutions of nonhomogeneous equations<\/li>\r\n \t<li>Apply the method of undetermined coefficients<\/li>\r\n \t<li>Apply the method of variation of parameters<\/li>\r\n<\/ul>\r\n<\/section>\r\n<h2 data-type=\"title\">General Solution to a Nonhomogeneous Linear Equation<\/h2>\r\n<p class=\"whitespace-normal break-words\">Nonhomogeneous differential equations require different terminology and methods than those we used for homogeneous equations. Let's start by defining some key terms.<\/p>\r\n<p id=\"fs-id1170572616368\">Consider the nonhomogeneous linear differential equation:<\/p>\r\n<p style=\"text-align: center;\">[latex]a_2(x)y^{\\prime\\prime}+a_1(x)y^\\prime+a_0(x)y=r(x)[\/latex].<\/p>\r\n<p id=\"fs-id1170572346900\">The associated homogeneous equation:<\/p>\r\n<p style=\"text-align: center;\">[latex]a_2(x)y^{\\prime\\prime}+a_1(x)y^\\prime+a_0(x)y=0[\/latex]<\/p>\r\n<p id=\"fs-id1170571543157\">is called the\u00a0<strong><span id=\"e2cb0fd1-6cb0-486c-93d7-2edd081caff6_term308\" data-type=\"term\">complementary equation<\/span>.<\/strong> Solving the complementary equation is an important step in solving a nonhomogeneous differential equation.<\/p>\r\nTo find the general solution to a nonhomogeneous equation, we need to find one specific solution to the nonhomogeneous equation itself. This brings us to an important definition - the particular solution.\r\n\r\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\r\n<h3>particular solution<\/h3>\r\nA solution [latex]y_p(x)[\/latex] of a differential equation that contains no arbitrary constants is called a <strong>particular solution<\/strong> to the equation.\r\n\r\n<\/section>\r\n<p class=\"whitespace-normal break-words\">Once we have both the general solution to the complementary equation and a particular solution to the nonhomogeneous equation, we can combine them to form the general solution.<\/p>\r\n\r\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\r\n<h3>general solution to a nonhomogeneous equation<\/h3>\r\n<p id=\"fs-id1170572168730\">Let [latex]y_p(x)[\/latex] be any particular solution to the nonhomogeneous linear differential equation:<\/p>\r\n<p style=\"text-align: center;\">[latex]a_2(x)y^{\\prime\\prime}+a_1(x)y^\\prime+a_0(x)y=r(x)[\/latex].<\/p>\r\n<p id=\"fs-id1170571711288\">Also, let [latex]c_1y_1(x)+c_2y_2(x)[\/latex] denote the general solution to the complementary equation. Then, the general solution to the nonhomogeneous equation is given by:<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{y(x)=c_1y_1(x)+c_2y_2(x)+y_p(x)}[\/latex].<\/p>\r\n\r\n<\/section><section class=\"textbox connectIt\">\r\n<p style=\"text-align: center;\"><strong>Proof<\/strong><\/p>\r\n\r\n\r\n<hr \/>\r\n<p id=\"fs-id1170572544509\">To prove [latex]y(x)[\/latex] is the general solution, we must first show that it solves the differential equation and, second, that any solution to the differential equation can be written in that form. Substituting [latex]y(x)[\/latex] into the differential equation, we have<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\na_2(x)y^{\\prime\\prime}+a_1(x)y^\\prime+a_0(x)y&amp;=a_2(x)(c_1y_1+c_2y_2+y_p)^{\\prime\\prime}+a_1(x)(c_1y_1+c_2y_2+y_p)^\\prime+a_0(x)(c_1y_1+c_2y_2+y_p) \\\\\r\n&amp;=[a_2(x)(c_1y_1+c_2y_2)^{\\prime\\prime}+a_1(x)(c_1y_1+c_2y_2)^\\prime+a_0(x)(c_1y_1+c_2y_2)]+a_2(x)y_p^{\\prime\\prime}+a_1(x)y_p^\\prime+a_0(x)y_p \\\\\r\n&amp;=0+r(x) \\\\\r\n&amp;=r(x)\r\n\\end{aligned}[\/latex].<\/p>\r\nSo [latex]y(x)[\/latex] is a solution.\r\n<p id=\"fs-id1170572415209\">Now, let [latex]z(x)[\/latex] be any solution to [latex]a_2(x)y^{\\prime\\prime}+a_1(x)y^\\prime+a_0(x)y=r(x)[\/latex]. Then<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\na_2(x)(z-y_p)^{\\prime\\prime}+a_1(x)(z-y_p)^\\prime+a_0(x)(z-y_p)&amp;=(a_2(x)z^{\\prime\\prime}+a_1(x)z^\\prime+a_0(x)z)-(a_2(x)y_p^{\\prime\\prime}+a_1(x)y_p^\\prime+a_0(x)y_p) \\\\\r\n&amp;=r(x)-r(x) \\\\\r\n&amp;=0\r\n\\end{aligned}[\/latex],<\/p>\r\nso [latex]z(x)=y_p(x)[\/latex] is a solution to the complementary equation. But, [latex]c_1y_1(x)+c_2y_2(x)[\/latex] is the general solution to the complementary equation, so there are constants [latex]c_1[\/latex] and [latex]c_2[\/latex] such that\r\n<p style=\"text-align: center;\">[latex]\\large{z(x)=y_p(x)=c_1y_1(x)+c_2y_2(x)}[\/latex].<\/p>\r\n<p id=\"fs-id1170572481683\">Hence, we see that [latex]z(x)=c_1y_1(x)+c_2y_2(x)y_p(x)[\/latex].<\/p>\r\n[latex]_\\blacksquare[\/latex]\r\n\r\n<\/section><section class=\"textbox example\" aria-label=\"Example\">Given that [latex]y_p(x)=x[\/latex] is a particular solution to the differential equation [latex]y^{\\prime\\prime}+y=x[\/latex], write the general solution and check by verifying that the solution satisfies the equation.[reveal-answer q=\"284270134\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"284270134\"]\r\n<p id=\"fs-id1170572547637\">The complementary equation is [latex]y^{\\prime\\prime}+y=0[\/latex], which has the general solution [latex]c_1\\cos x+c_2\\sin x[\/latex]. So, the general solution to the nonhomogeneous equation is<\/p>\r\n<p style=\"text-align: center;\">[latex]y(x)=c_1\\cos x+c_2\\sin x+x[\/latex].<\/p>\r\n<p id=\"fs-id1170572212481\">To verify that this is a solution, substitute it into the differential equation. We have<\/p>\r\n<p style=\"text-align: center;\">[latex]y^\\prime(x)=-c_1\\sin x+c_2\\cos x+1\\text{ and }y^{\\prime\\prime}=-c_1\\cos x-c_2\\sin x[\/latex].<\/p>\r\n<p id=\"fs-id1170572637641\">Then<\/p>\r\n<p style=\"text-align: center;\">[latex]y^{\\prime\\prime}(x)+y(x)=-c_1\\cos x-c_2\\sin x+c_1\\cos x+c_2\\sin x+x[\/latex].<\/p>\r\n<p id=\"fs-id1170572416526\">So, [latex]y(x)[\/latex] is a solution to [latex]y^{\\prime\\prime}+y=x[\/latex].<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/section>In the last section, we learned how to solve homogeneous equations with constant coefficients. Therefore, for nonhomogeneous equations of the form [latex]ay^{\\prime\\prime}+by^\\prime+cy=r(x)[\/latex], we already know how to solve the complementary equation, and the problem boils down to finding a particular solution for the nonhomogeneous equation. We now examine two techniques for this: the method of undetermined coefficients and the method of variation of parameters.","rendered":"<section class=\"textbox learningGoals\" aria-label=\"Learning Goals\">\n<ul>\n<li>Find general solutions of nonhomogeneous equations<\/li>\n<li>Apply the method of undetermined coefficients<\/li>\n<li>Apply the method of variation of parameters<\/li>\n<\/ul>\n<\/section>\n<h2 data-type=\"title\">General Solution to a Nonhomogeneous Linear Equation<\/h2>\n<p class=\"whitespace-normal break-words\">Nonhomogeneous differential equations require different terminology and methods than those we used for homogeneous equations. Let&#8217;s start by defining some key terms.<\/p>\n<p id=\"fs-id1170572616368\">Consider the nonhomogeneous linear differential equation:<\/p>\n<p style=\"text-align: center;\">[latex]a_2(x)y^{\\prime\\prime}+a_1(x)y^\\prime+a_0(x)y=r(x)[\/latex].<\/p>\n<p id=\"fs-id1170572346900\">The associated homogeneous equation:<\/p>\n<p style=\"text-align: center;\">[latex]a_2(x)y^{\\prime\\prime}+a_1(x)y^\\prime+a_0(x)y=0[\/latex]<\/p>\n<p id=\"fs-id1170571543157\">is called the\u00a0<strong><span id=\"e2cb0fd1-6cb0-486c-93d7-2edd081caff6_term308\" data-type=\"term\">complementary equation<\/span>.<\/strong> Solving the complementary equation is an important step in solving a nonhomogeneous differential equation.<\/p>\n<p>To find the general solution to a nonhomogeneous equation, we need to find one specific solution to the nonhomogeneous equation itself. This brings us to an important definition &#8211; the particular solution.<\/p>\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\n<h3>particular solution<\/h3>\n<p>A solution [latex]y_p(x)[\/latex] of a differential equation that contains no arbitrary constants is called a <strong>particular solution<\/strong> to the equation.<\/p>\n<\/section>\n<p class=\"whitespace-normal break-words\">Once we have both the general solution to the complementary equation and a particular solution to the nonhomogeneous equation, we can combine them to form the general solution.<\/p>\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\n<h3>general solution to a nonhomogeneous equation<\/h3>\n<p id=\"fs-id1170572168730\">Let [latex]y_p(x)[\/latex] be any particular solution to the nonhomogeneous linear differential equation:<\/p>\n<p style=\"text-align: center;\">[latex]a_2(x)y^{\\prime\\prime}+a_1(x)y^\\prime+a_0(x)y=r(x)[\/latex].<\/p>\n<p id=\"fs-id1170571711288\">Also, let [latex]c_1y_1(x)+c_2y_2(x)[\/latex] denote the general solution to the complementary equation. Then, the general solution to the nonhomogeneous equation is given by:<\/p>\n<p style=\"text-align: center;\">[latex]\\large{y(x)=c_1y_1(x)+c_2y_2(x)+y_p(x)}[\/latex].<\/p>\n<\/section>\n<section class=\"textbox connectIt\">\n<p style=\"text-align: center;\"><strong>Proof<\/strong><\/p>\n<hr \/>\n<p id=\"fs-id1170572544509\">To prove [latex]y(x)[\/latex] is the general solution, we must first show that it solves the differential equation and, second, that any solution to the differential equation can be written in that form. Substituting [latex]y(x)[\/latex] into the differential equation, we have<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  a_2(x)y^{\\prime\\prime}+a_1(x)y^\\prime+a_0(x)y&=a_2(x)(c_1y_1+c_2y_2+y_p)^{\\prime\\prime}+a_1(x)(c_1y_1+c_2y_2+y_p)^\\prime+a_0(x)(c_1y_1+c_2y_2+y_p) \\\\  &=[a_2(x)(c_1y_1+c_2y_2)^{\\prime\\prime}+a_1(x)(c_1y_1+c_2y_2)^\\prime+a_0(x)(c_1y_1+c_2y_2)]+a_2(x)y_p^{\\prime\\prime}+a_1(x)y_p^\\prime+a_0(x)y_p \\\\  &=0+r(x) \\\\  &=r(x)  \\end{aligned}[\/latex].<\/p>\n<p>So [latex]y(x)[\/latex] is a solution.<\/p>\n<p id=\"fs-id1170572415209\">Now, let [latex]z(x)[\/latex] be any solution to [latex]a_2(x)y^{\\prime\\prime}+a_1(x)y^\\prime+a_0(x)y=r(x)[\/latex]. Then<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  a_2(x)(z-y_p)^{\\prime\\prime}+a_1(x)(z-y_p)^\\prime+a_0(x)(z-y_p)&=(a_2(x)z^{\\prime\\prime}+a_1(x)z^\\prime+a_0(x)z)-(a_2(x)y_p^{\\prime\\prime}+a_1(x)y_p^\\prime+a_0(x)y_p) \\\\  &=r(x)-r(x) \\\\  &=0  \\end{aligned}[\/latex],<\/p>\n<p>so [latex]z(x)=y_p(x)[\/latex] is a solution to the complementary equation. But, [latex]c_1y_1(x)+c_2y_2(x)[\/latex] is the general solution to the complementary equation, so there are constants [latex]c_1[\/latex] and [latex]c_2[\/latex] such that<\/p>\n<p style=\"text-align: center;\">[latex]\\large{z(x)=y_p(x)=c_1y_1(x)+c_2y_2(x)}[\/latex].<\/p>\n<p id=\"fs-id1170572481683\">Hence, we see that [latex]z(x)=c_1y_1(x)+c_2y_2(x)y_p(x)[\/latex].<\/p>\n<p>[latex]_\\blacksquare[\/latex]<\/p>\n<\/section>\n<section class=\"textbox example\" aria-label=\"Example\">Given that [latex]y_p(x)=x[\/latex] is a particular solution to the differential equation [latex]y^{\\prime\\prime}+y=x[\/latex], write the general solution and check by verifying that the solution satisfies the equation.<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q284270134\">Show Solution<\/button><\/p>\n<div id=\"q284270134\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1170572547637\">The complementary equation is [latex]y^{\\prime\\prime}+y=0[\/latex], which has the general solution [latex]c_1\\cos x+c_2\\sin x[\/latex]. So, the general solution to the nonhomogeneous equation is<\/p>\n<p style=\"text-align: center;\">[latex]y(x)=c_1\\cos x+c_2\\sin x+x[\/latex].<\/p>\n<p id=\"fs-id1170572212481\">To verify that this is a solution, substitute it into the differential equation. We have<\/p>\n<p style=\"text-align: center;\">[latex]y^\\prime(x)=-c_1\\sin x+c_2\\cos x+1\\text{ and }y^{\\prime\\prime}=-c_1\\cos x-c_2\\sin x[\/latex].<\/p>\n<p id=\"fs-id1170572637641\">Then<\/p>\n<p style=\"text-align: center;\">[latex]y^{\\prime\\prime}(x)+y(x)=-c_1\\cos x-c_2\\sin x+c_1\\cos x+c_2\\sin x+x[\/latex].<\/p>\n<p id=\"fs-id1170572416526\">So, [latex]y(x)[\/latex] is a solution to [latex]y^{\\prime\\prime}+y=x[\/latex].<\/p>\n<\/div>\n<\/div>\n<\/section>\n<p>In the last section, we learned how to solve homogeneous equations with constant coefficients. Therefore, for nonhomogeneous equations of the form [latex]ay^{\\prime\\prime}+by^\\prime+cy=r(x)[\/latex], we already know how to solve the complementary equation, and the problem boils down to finding a particular solution for the nonhomogeneous equation. We now examine two techniques for this: the method of undetermined coefficients and the method of variation of parameters.<\/p>\n","protected":false},"author":15,"menu_order":12,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-824","chapter","type-chapter","status-publish","hentry"],"part":440,"module-header":"learn_it","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\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/users\/15"}],"version-history":[{"count":6,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/824\/revisions"}],"predecessor-version":[{"id":2138,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/824\/revisions\/2138"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/parts\/440"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/824\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/media?parent=824"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapter-type?post=824"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/contributor?post=824"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/license?post=824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}