{"id":1563,"date":"2025-10-17T17:14:38","date_gmt":"2025-10-17T17:14:38","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/calculus3\/?post_type=chapter&#038;p=1563"},"modified":"2025-11-11T15:20:59","modified_gmt":"2025-11-11T15:20:59","slug":"nonhomogeneous-linear-equations-learn-it-3","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/calculus3\/chapter\/nonhomogeneous-linear-equations-learn-it-3\/","title":{"raw":"Nonhomogeneous Linear Equations: Learn It 3","rendered":"Nonhomogeneous Linear Equations: Learn It 3"},"content":{"raw":"<h2 data-type=\"title\">Variation of Parameters<\/h2>\r\n<p class=\"whitespace-normal break-words\">Sometimes, [latex]r(x)[\/latex] is not a combination of polynomials, exponentials, or sines and cosines. When this is the case, the method of undetermined coefficients does not work, and we have to use another approach to find a particular solution to the differential equation. We use an approach called the <strong>method of variation of parameters<\/strong>.<\/p>\r\n<p class=\"whitespace-normal break-words\">To simplify our calculations, we are going to divide the differential equation through by [latex]a[\/latex], so we have a leading coefficient of [latex]1[\/latex]. Then the differential equation has the form:<\/p>\r\n\r\n<div id=\"fs-id1170572604296\" class=\"unnumbered\" data-type=\"equation\" data-label=\"\"><center>[latex]y^{\\prime\\prime}+py^\\prime+qy=r(x)[\/latex],<\/center>\r\n<div><\/div>\r\nwhere [latex]p[\/latex] and [latex]q[\/latex] are constants.\r\n<p class=\"whitespace-normal break-words\">If the general solution to the complementary equation is given by [latex]c_1y_1(x)+c_2y_2(x)[\/latex], we are going to look for a particular solution of the form [latex]y_p(x)=u(x)y_1(x)+v(x)y_2(x)[\/latex]. In this case, we use the two linearly independent solutions to the complementary equation to form our particular solution. However, we are assuming the coefficients are functions of [latex]x[\/latex], rather than constants. We want to find functions [latex]u(x)[\/latex] and [latex]v(x)[\/latex] such that [latex]y_p(x)[\/latex] satisfies the differential equation.<\/p>\r\n<p class=\"whitespace-normal break-words\">We have:<\/p>\r\n\r\n<\/div>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\ny_p&amp;=uy_1+vy_2 \\\\\r\ny_p^\\prime&amp;=u^\\prime+uy_1^\\prime+v^\\prime y_2+vy_2^\\prime \\\\\r\ny_p^{\\prime\\prime}&amp;=(u^\\prime y_1+v^\\prime y_2)^\\prime+u^\\prime y_1^\\prime+uy_1^{\\prime\\prime}+v^\\prime y_2^\\prime+vy_2^{\\prime\\prime}\r\n\\end{aligned}[\/latex].<\/p>\r\n<p id=\"fs-id1170571579727\">Substituting into the differential equation, we obtain:<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\ny_p^{\\prime\\prime}+py_p^\\prime+qy_p&amp;=[(u^\\prime y_1+v^\\prime y_2)+u^\\prime y_1^\\prime+uy_1^{\\prime\\prime}+v^\\prime y_2^\\prime+vy_2^{\\prime\\prime}]+p[u^\\prime y_1+uy_1^\\prime+v^\\prime y_2+vy_2^\\prime]+q[uy_1+vy_2] \\\\\r\n&amp;=u[y_1^{\\prime\\prime}+py_1^\\prime+qy_1]+v[y_2^{\\prime\\prime}+py_2^\\prime+qy_2]+(u^\\prime y_1+v^\\prime y_2)^\\prime+p(u^\\prime y_1+v^\\prime y_2)+(u^\\prime y_1^\\prime+v^\\prime y_2^\\prime)\r\n\\end{aligned}[\/latex].<\/p>\r\n<p id=\"fs-id1170572185030\">Note that [latex]y_1[\/latex] and [latex]y_2[\/latex] are solutions to the complementary equation, so the first two terms are zero. Thus, we have:<\/p>\r\n<p style=\"text-align: center;\">[latex](u^\\prime y_1+v^\\prime y_2)^\\prime+p(u^\\prime y_1+v^\\prime y_2)+(u^\\prime y_1^\\prime+v^\\prime y_2^\\prime)=r(x)[\/latex].<\/p>\r\nIf we simplify this equation by imposing the additional condition [latex]u^\\prime y_1+v^\\prime y_2=0[\/latex], the first two terms are zero, and this reduces to [latex]u^\\prime y_1^\\prime+v^\\prime y_2^\\prime=r(x)[\/latex]. So, with this additional condition, we have a system of two equations in two unknowns:\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\nu^\\prime y_1+v^\\prime y_2&amp;=0 \\\\\r\nu^\\prime y_1^\\prime+v^\\prime y_2^\\prime&amp;=r(x)\r\n\\end{aligned}[\/latex].<\/p>\r\n<p class=\"whitespace-normal break-words\">Solving this system gives us [latex]u^\\prime[\/latex] and [latex]v^\\prime[\/latex], which we can integrate to find [latex]u[\/latex] and [latex]v[\/latex]. Then, [latex]y_p(x)=u(x)y_1(x)+v(x)y_2(x)[\/latex] is a particular solution to the differential equation.<\/p>\r\n<p class=\"whitespace-normal break-words\">Solving this system of equations is sometimes challenging, so let's review Cramer's rule, which allows us to solve the system of equations using determinants.<\/p>\r\n\r\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\r\n<h3>Cramer's rule<\/h3>\r\n<p id=\"fs-id1170572548189\">The system of equations:<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\na_1z_1+b_1z_2=r_1 \\\\\r\na_2z_1+b_2z_2&amp;=r_2\r\n\\end{aligned}[\/latex]<\/p>\r\n<p id=\"fs-id1170572387640\">has a unique solution if and only if the determinant of the coefficients is not zero. In this case, the solution is given by:<\/p>\r\n<p style=\"text-align: center;\">[latex]z_1=\\frac{\\begin{vmatrix}r_1&amp;b_1 \\\\ r_2&amp;b_2\\end{vmatrix}}{\\begin{vmatrix}a_1&amp;b_1 \\\\ a_2&amp;b_2\\end{vmatrix}}[\/latex] and\u00a0[latex]z_2=\\frac{\\begin{vmatrix}a_1&amp;r_1 \\\\ a_2&amp;r_2\\end{vmatrix}}{\\begin{vmatrix}a_1&amp;b_1 \\\\ a_2&amp;b_2\\end{vmatrix}}[\/latex].<\/p>\r\n\r\n<\/section><section class=\"textbox example\" aria-label=\"Example\">\r\n<p id=\"fs-id1170572504528\">Use Cramer\u2019s rule to solve the following system of equations.<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\nx^2z_1+2xz_2&amp;=0 \\\\\r\nz_1-3x^2z_2&amp;=2x\r\n\\end{aligned}[\/latex].<\/p>\r\n[reveal-answer q=\"923921637\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"923921637\"]\r\n<p id=\"fs-id1170572116382\">We have<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\na_1(x)&amp;=x^2 \\\\\r\na_2(x)&amp;=1 \\\\\r\nb_1(x)&amp;=2x \\\\\r\nb_2(x)&amp;=-3x^2 \\\\\r\nr_1(x)&amp;=0 \\\\\r\nr_2(x)&amp;=2x\r\n\\end{aligned}[\/latex].<\/p>\r\n<p id=\"fs-id1170571748971\">Then,<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{vmatrix}a_1&amp;b_1 \\\\ a_2&amp;b_2\\end{vmatrix}=\\begin{vmatrix}x^2&amp;2x \\\\ 1&amp;-3x^2\\end{vmatrix}=-3x^4-2x[\/latex]<\/p>\r\n<p id=\"fs-id1170572088607\">and<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{vmatrix}r_1&amp;b_1 \\\\ r_2&amp;b_2\\end{vmatrix}=\\begin{vmatrix}0&amp;2x \\\\ 2x&amp;-3x^2\\end{vmatrix}=0-4x^2=-4x^2[\/latex].<\/p>\r\n<p id=\"fs-id1170571688223\">Thus,<\/p>\r\n<p style=\"text-align: center;\">[latex]z_1=\\frac{\\begin{vmatrix}r_1&amp;b_1 \\\\ r_2&amp;b_2\\end{vmatrix}}{\\begin{vmatrix}a_1&amp;b_1 \\\\ a_2&amp;b_2\\end{vmatrix}}=\\frac{-4x^2}{-3x^4-2x}=\\frac{4x}{3x^3+2}[\/latex].<\/p>\r\n<p id=\"fs-id1170571611310\">In addition,<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{vmatrix}a_1&amp;r_1 \\\\ a_2&amp;r_2\\end{vmatrix}=\\begin{vmatrix}x^2&amp;0 \\\\1&amp;2x\\end{vmatrix}=2x^3-0=2x^3[\/latex].<\/p>\r\n<p id=\"fs-id1170572330219\">Thus,<\/p>\r\n<p style=\"text-align: center;\">[latex]z_2=\\frac{\\begin{vmatrix}a_1&amp;r_1 \\\\ a_2&amp;r_2\\end{vmatrix}}{\\begin{vmatrix}a_1&amp;b_1 \\\\ a_2&amp;b_2\\end{vmatrix}}=\\frac{2x^3}{-3x^4-2x}=\\frac{-2x^2}{3x^3+2}[\/latex].<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/section><section class=\"textbox questionHelp\" aria-label=\"Question Help\"><strong>How to: Use the Method of Variation of Parameters<\/strong>\r\n<ol id=\"fs-id1170571789088\" type=\"1\">\r\n \t<li class=\"whitespace-normal break-words\"><strong>Solve the complementary equation<\/strong>: Write down the general solution [latex]c_1y_1(x)+c_2y_2(x)[\/latex].<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Find [latex]u^\\prime(x)[\/latex] and [latex]v^\\prime(x)[\/latex]<\/strong>: Use Cramer's rule or another suitable technique to find functions [latex]u^\\prime(x)[\/latex] and [latex]v^\\prime(x)[\/latex] satisfying [latex]\\begin{aligned} u^\\prime y_1+v^\\prime y_2&amp;=0 \\\\ u^\\prime y_1^\\prime+v^\\prime y_2^\\prime&amp;=r(x) \\end{aligned}[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Integrate to find [latex]u[\/latex] and [latex]v[\/latex]<\/strong>: Integrate [latex]u^\\prime[\/latex] and [latex]v^\\prime[\/latex] to find [latex]u(x)[\/latex] and [latex]v(x)[\/latex]. Then, [latex]y_p(x)=u(x)y_1(x)+v(x)y_2(x)[\/latex] is a particular solution to the equation.<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Form the particular solution<\/strong>: Calculate [latex]y_p(x)=u(x)y_1(x)+v(x)y_2(x)[\/latex].<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Write the general solution<\/strong>: Add the general solution to the complementary equation and the particular solution found in step 4.<\/li>\r\n<\/ol>\r\n<\/section><section class=\"textbox example\" aria-label=\"Example\">\r\n<p id=\"fs-id1170571823253\">Find the general solution to the following differential equations.<\/p>\r\n\r\n<ol id=\"fs-id1170571823257\" type=\"a\">\r\n \t<li>[latex]y^{\\prime\\prime}-2y^\\prime+y=\\frac{e^t}{t^2}[\/latex]<\/li>\r\n \t<li>[latex]y^{\\prime\\prime}+y=3\\sin^2x[\/latex]<\/li>\r\n<\/ol>\r\n[reveal-answer q=\"982348083\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"982348083\"]\r\n<ol id=\"fs-id1170572589220\" type=\"a\">\r\n \t<li>The complementary equation is [latex]y^{\\prime\\prime}-2y^\\prime+y=0[\/latex] with associated general solution [latex]c_1e^t+c_2te^t[\/latex]. Therefore, [latex]y_1(t)=e^t[\/latex] and [latex]y_2(t)=te^t[\/latex]. Calculating the derivatives, we get [latex]y_1^\\prime(t)=e^t[\/latex] and [latex]y_2^\\prime(t)=e^t+te^t[\/latex] (step 1). Then, we want to find functions [latex]u'(t)[\/latex] and [latex]v'(t)[\/latex] so that<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\nu^\\prime e^t+v^\\prime te^t&amp;=0 \\\\\r\nu^\\prime e^t+v^\\prime(e^t+te^t)&amp;=\\frac{e^t}{t^2}\r\n\\end{aligned}\r\n[\/latex]<\/p>\r\n<span data-type=\"newline\">\r\n<\/span>Applying Cramer\u2019s rule, we have<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]u^\\prime=\\frac{\\begin{vmatrix}0&amp;te^t \\\\ \\frac{e^t}{t^2}&amp;e^t+te^t\\end{vmatrix}}{\\begin{vmatrix}e^t&amp;te^t \\\\e^t&amp;e^t+te^t\\end{vmatrix}}=\\frac{0-te^t\\left(\\frac{e^t}{t^2}\\right)}{e^t(e^t+te^t)-e^tte^t}=\\frac{-\\frac{e^{2t}}{t}}{e^{2t}}=-\\frac1t[\/latex]<\/p>\r\nand<span data-type=\"newline\">\r\n<\/span>\r\n<div id=\"fs-id1170572296671\" class=\"unnumbered\" data-type=\"equation\" data-label=\"\">\r\n<p style=\"text-align: center;\">[latex]v^\\prime=\\frac{\\begin{vmatrix}e^t&amp;0\\\\e^t&amp;\\frac{e^t}{t^2}\\end{vmatrix}}{\\begin{vmatrix}e^t&amp;te^t\\\\e^t&amp;e^t+te^t\\end{vmatrix}}=\\frac{e^t\\left(\\frac{e^t}{t^2}\\right)}{e^{2t}}=\\frac{1}{t^2}[\/latex] (step 2).<\/p>\r\n\r\n<\/div>\r\nIntegrating, we get<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\nu&amp;=-\\displaystyle\\int\\frac1t \\ dt=-\\ln|t| \\\\\r\nv&amp;=\\displaystyle\\int\\frac{1}{t^2}dt=-\\frac{1}{t}\\text{(step 3)}.\r\n\\end{aligned}[\/latex]<\/p>\r\n<span data-type=\"newline\">\r\n<\/span>Then we have<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\ny_p&amp;=-e^t\\ln|t|-\\frac{1}{t}te^t \\\\\r\n&amp;=-e^t\\ln|t|-e^t \\text{(step 4)}.\r\n\\end{aligned}[\/latex]<\/p>\r\n<span data-type=\"newline\">\r\n<\/span>The [latex]e^{t}[\/latex] term is a solution to the complementary equation, so we don\u2019t need to carry that term into our general solution explicitly. The general solution is<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]y(t)=c_1e^t+c_2te^t-e^t\\ln|t|[\/latex] (step 5).<\/p>\r\n<\/li>\r\n \t<li>The complementary equation is [latex]y^{\\prime\\prime}+y+0[\/latex] with associated general solution [latex]c_1\\cos x+c_2\\sin x[\/latex]. So, [latex]y_1(x)=\\cos x[\/latex] and [latex]y_2(x)=\\sin x[\/latex] (step 1). Then, we want to find functions [latex]u'(x)[\/latex] and [latex]v'(x)[\/latex] such that<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned} u^\\prime\\cos x+v^\\prime\\sin x&amp;=0 \\\\ -y^\\prime\\sin x+v^\\prime\\cos x&amp;=3\\sin^2x \\end{aligned}[\/latex].<\/p>\r\n<span data-type=\"newline\">\r\n<\/span>Applying Cramer\u2019s rule, we have<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]u^\\prime=\\frac{\\begin{vmatrix}0&amp;\\sin x \\\\3\\sin^2x&amp;\\cos x\\end{vmatrix}}{\\begin{vmatrix}\\cos x&amp;\\sin x \\\\ -\\sin x&amp;\\cos x\\end{vmatrix}}=\\frac{0-3\\sin^3x}{\\cos^2x+\\sin^2x}=-3\\sin^3x[\/latex]<\/p>\r\nand<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]v^\\prime=\\frac{\\begin{vmatrix}\\cos x&amp;0\\\\ -\\sin x&amp;3\\sin^2x\\end{vmatrix}}{\\begin{vmatrix}\\cos x&amp;\\sin x \\\\-\\sin x&amp;\\cos x\\end{vmatrix}}=\\frac{3\\sin^2x\\cos x}{1}=3\\sin^2x\\cos x[\/latex] (step 2).<\/p>\r\nIntegrating first to find [latex]u[\/latex], we get<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]u=\\displaystyle\\int-3\\sin^3xdx=-3\\left[-\\frac13\\sin^2x\\cos x+\\frac23\\displaystyle\\int\\sin xdx\\right]=\\sin^2x\\cos x+2\\cos x[\/latex] (step 3).<\/p>\r\n<span data-type=\"newline\">\r\n<\/span>Now, we integrate to find [latex]v[\/latex]. Using substitution (with [latex]w=\\sin x[\/latex]), we get<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]v=\\displaystyle\\int3\\sin^2x\\cos xdx=\\displaystyle\\int3w^2dw=w^3=\\sin^3x[\/latex].<\/p>\r\n<span data-type=\"newline\">\r\n<\/span>Then,<span data-type=\"newline\">\r\n<\/span>\r\n<p style=\"text-align: center;\">[latex]\r\n\\begin{aligned}\r\ny_p&amp;=(\\sin^2x\\cos x+2\\cos x)\\cos x+(\\sin^3x)\\sin x \\\\\r\n&amp;=\\sin^2x\\cos^2x+2\\cos^2x+\\sin^4x \\\\\r\n&amp;=2\\cos^2x+\\sin^2x(\\cos^2x+\\sin^2x) \\ \\ \\ \\ (step 4). \\\\\r\n&amp;=2\\cos^2x+\\sin^2 \\\\\r\n&amp;=\\cos^2x+1\r\n\\end{aligned}\r\n[\/latex]<\/p>\r\nThe general solution is\r\n<p style=\"text-align: center;\">[latex]y(x)=c_1\\cos x+c_2\\sin x+1+\\cos^2x[\/latex] (step 5).<\/p>\r\n[\/hidden-answer]<\/li>\r\n<\/ol>\r\n<\/section>","rendered":"<h2 data-type=\"title\">Variation of Parameters<\/h2>\n<p class=\"whitespace-normal break-words\">Sometimes, [latex]r(x)[\/latex] is not a combination of polynomials, exponentials, or sines and cosines. When this is the case, the method of undetermined coefficients does not work, and we have to use another approach to find a particular solution to the differential equation. We use an approach called the <strong>method of variation of parameters<\/strong>.<\/p>\n<p class=\"whitespace-normal break-words\">To simplify our calculations, we are going to divide the differential equation through by [latex]a[\/latex], so we have a leading coefficient of [latex]1[\/latex]. Then the differential equation has the form:<\/p>\n<div id=\"fs-id1170572604296\" class=\"unnumbered\" data-type=\"equation\" data-label=\"\">\n<div style=\"text-align: center;\">[latex]y^{\\prime\\prime}+py^\\prime+qy=r(x)[\/latex],<\/div>\n<div><\/div>\n<p>where [latex]p[\/latex] and [latex]q[\/latex] are constants.<\/p>\n<p class=\"whitespace-normal break-words\">If the general solution to the complementary equation is given by [latex]c_1y_1(x)+c_2y_2(x)[\/latex], we are going to look for a particular solution of the form [latex]y_p(x)=u(x)y_1(x)+v(x)y_2(x)[\/latex]. In this case, we use the two linearly independent solutions to the complementary equation to form our particular solution. However, we are assuming the coefficients are functions of [latex]x[\/latex], rather than constants. We want to find functions [latex]u(x)[\/latex] and [latex]v(x)[\/latex] such that [latex]y_p(x)[\/latex] satisfies the differential equation.<\/p>\n<p class=\"whitespace-normal break-words\">We have:<\/p>\n<\/div>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  y_p&=uy_1+vy_2 \\\\  y_p^\\prime&=u^\\prime+uy_1^\\prime+v^\\prime y_2+vy_2^\\prime \\\\  y_p^{\\prime\\prime}&=(u^\\prime y_1+v^\\prime y_2)^\\prime+u^\\prime y_1^\\prime+uy_1^{\\prime\\prime}+v^\\prime y_2^\\prime+vy_2^{\\prime\\prime}  \\end{aligned}[\/latex].<\/p>\n<p id=\"fs-id1170571579727\">Substituting into the differential equation, we obtain:<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  y_p^{\\prime\\prime}+py_p^\\prime+qy_p&=[(u^\\prime y_1+v^\\prime y_2)+u^\\prime y_1^\\prime+uy_1^{\\prime\\prime}+v^\\prime y_2^\\prime+vy_2^{\\prime\\prime}]+p[u^\\prime y_1+uy_1^\\prime+v^\\prime y_2+vy_2^\\prime]+q[uy_1+vy_2] \\\\  &=u[y_1^{\\prime\\prime}+py_1^\\prime+qy_1]+v[y_2^{\\prime\\prime}+py_2^\\prime+qy_2]+(u^\\prime y_1+v^\\prime y_2)^\\prime+p(u^\\prime y_1+v^\\prime y_2)+(u^\\prime y_1^\\prime+v^\\prime y_2^\\prime)  \\end{aligned}[\/latex].<\/p>\n<p id=\"fs-id1170572185030\">Note that [latex]y_1[\/latex] and [latex]y_2[\/latex] are solutions to the complementary equation, so the first two terms are zero. Thus, we have:<\/p>\n<p style=\"text-align: center;\">[latex](u^\\prime y_1+v^\\prime y_2)^\\prime+p(u^\\prime y_1+v^\\prime y_2)+(u^\\prime y_1^\\prime+v^\\prime y_2^\\prime)=r(x)[\/latex].<\/p>\n<p>If we simplify this equation by imposing the additional condition [latex]u^\\prime y_1+v^\\prime y_2=0[\/latex], the first two terms are zero, and this reduces to [latex]u^\\prime y_1^\\prime+v^\\prime y_2^\\prime=r(x)[\/latex]. So, with this additional condition, we have a system of two equations in two unknowns:<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  u^\\prime y_1+v^\\prime y_2&=0 \\\\  u^\\prime y_1^\\prime+v^\\prime y_2^\\prime&=r(x)  \\end{aligned}[\/latex].<\/p>\n<p class=\"whitespace-normal break-words\">Solving this system gives us [latex]u^\\prime[\/latex] and [latex]v^\\prime[\/latex], which we can integrate to find [latex]u[\/latex] and [latex]v[\/latex]. Then, [latex]y_p(x)=u(x)y_1(x)+v(x)y_2(x)[\/latex] is a particular solution to the differential equation.<\/p>\n<p class=\"whitespace-normal break-words\">Solving this system of equations is sometimes challenging, so let&#8217;s review Cramer&#8217;s rule, which allows us to solve the system of equations using determinants.<\/p>\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\n<h3>Cramer&#8217;s rule<\/h3>\n<p id=\"fs-id1170572548189\">The system of equations:<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  a_1z_1+b_1z_2=r_1 \\\\  a_2z_1+b_2z_2&=r_2  \\end{aligned}[\/latex]<\/p>\n<p id=\"fs-id1170572387640\">has a unique solution if and only if the determinant of the coefficients is not zero. In this case, the solution is given by:<\/p>\n<p style=\"text-align: center;\">[latex]z_1=\\frac{\\begin{vmatrix}r_1&b_1 \\\\ r_2&b_2\\end{vmatrix}}{\\begin{vmatrix}a_1&b_1 \\\\ a_2&b_2\\end{vmatrix}}[\/latex] and\u00a0[latex]z_2=\\frac{\\begin{vmatrix}a_1&r_1 \\\\ a_2&r_2\\end{vmatrix}}{\\begin{vmatrix}a_1&b_1 \\\\ a_2&b_2\\end{vmatrix}}[\/latex].<\/p>\n<\/section>\n<section class=\"textbox example\" aria-label=\"Example\">\n<p id=\"fs-id1170572504528\">Use Cramer\u2019s rule to solve the following system of equations.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  x^2z_1+2xz_2&=0 \\\\  z_1-3x^2z_2&=2x  \\end{aligned}[\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q923921637\">Show Solution<\/button><\/p>\n<div id=\"q923921637\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1170572116382\">We have<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  a_1(x)&=x^2 \\\\  a_2(x)&=1 \\\\  b_1(x)&=2x \\\\  b_2(x)&=-3x^2 \\\\  r_1(x)&=0 \\\\  r_2(x)&=2x  \\end{aligned}[\/latex].<\/p>\n<p id=\"fs-id1170571748971\">Then,<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{vmatrix}a_1&b_1 \\\\ a_2&b_2\\end{vmatrix}=\\begin{vmatrix}x^2&2x \\\\ 1&-3x^2\\end{vmatrix}=-3x^4-2x[\/latex]<\/p>\n<p id=\"fs-id1170572088607\">and<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{vmatrix}r_1&b_1 \\\\ r_2&b_2\\end{vmatrix}=\\begin{vmatrix}0&2x \\\\ 2x&-3x^2\\end{vmatrix}=0-4x^2=-4x^2[\/latex].<\/p>\n<p id=\"fs-id1170571688223\">Thus,<\/p>\n<p style=\"text-align: center;\">[latex]z_1=\\frac{\\begin{vmatrix}r_1&b_1 \\\\ r_2&b_2\\end{vmatrix}}{\\begin{vmatrix}a_1&b_1 \\\\ a_2&b_2\\end{vmatrix}}=\\frac{-4x^2}{-3x^4-2x}=\\frac{4x}{3x^3+2}[\/latex].<\/p>\n<p id=\"fs-id1170571611310\">In addition,<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{vmatrix}a_1&r_1 \\\\ a_2&r_2\\end{vmatrix}=\\begin{vmatrix}x^2&0 \\\\1&2x\\end{vmatrix}=2x^3-0=2x^3[\/latex].<\/p>\n<p id=\"fs-id1170572330219\">Thus,<\/p>\n<p style=\"text-align: center;\">[latex]z_2=\\frac{\\begin{vmatrix}a_1&r_1 \\\\ a_2&r_2\\end{vmatrix}}{\\begin{vmatrix}a_1&b_1 \\\\ a_2&b_2\\end{vmatrix}}=\\frac{2x^3}{-3x^4-2x}=\\frac{-2x^2}{3x^3+2}[\/latex].<\/p>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox questionHelp\" aria-label=\"Question Help\"><strong>How to: Use the Method of Variation of Parameters<\/strong><\/p>\n<ol id=\"fs-id1170571789088\" type=\"1\">\n<li class=\"whitespace-normal break-words\"><strong>Solve the complementary equation<\/strong>: Write down the general solution [latex]c_1y_1(x)+c_2y_2(x)[\/latex].<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Find [latex]u^\\prime(x)[\/latex] and [latex]v^\\prime(x)[\/latex]<\/strong>: Use Cramer&#8217;s rule or another suitable technique to find functions [latex]u^\\prime(x)[\/latex] and [latex]v^\\prime(x)[\/latex] satisfying [latex]\\begin{aligned} u^\\prime y_1+v^\\prime y_2&=0 \\\\ u^\\prime y_1^\\prime+v^\\prime y_2^\\prime&=r(x) \\end{aligned}[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Integrate to find [latex]u[\/latex] and [latex]v[\/latex]<\/strong>: Integrate [latex]u^\\prime[\/latex] and [latex]v^\\prime[\/latex] to find [latex]u(x)[\/latex] and [latex]v(x)[\/latex]. Then, [latex]y_p(x)=u(x)y_1(x)+v(x)y_2(x)[\/latex] is a particular solution to the equation.<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Form the particular solution<\/strong>: Calculate [latex]y_p(x)=u(x)y_1(x)+v(x)y_2(x)[\/latex].<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Write the general solution<\/strong>: Add the general solution to the complementary equation and the particular solution found in step 4.<\/li>\n<\/ol>\n<\/section>\n<section class=\"textbox example\" aria-label=\"Example\">\n<p id=\"fs-id1170571823253\">Find the general solution to the following differential equations.<\/p>\n<ol id=\"fs-id1170571823257\" type=\"a\">\n<li>[latex]y^{\\prime\\prime}-2y^\\prime+y=\\frac{e^t}{t^2}[\/latex]<\/li>\n<li>[latex]y^{\\prime\\prime}+y=3\\sin^2x[\/latex]<\/li>\n<\/ol>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q982348083\">Show Solution<\/button><\/p>\n<div id=\"q982348083\" class=\"hidden-answer\" style=\"display: none\">\n<ol id=\"fs-id1170572589220\" type=\"a\">\n<li>The complementary equation is [latex]y^{\\prime\\prime}-2y^\\prime+y=0[\/latex] with associated general solution [latex]c_1e^t+c_2te^t[\/latex]. Therefore, [latex]y_1(t)=e^t[\/latex] and [latex]y_2(t)=te^t[\/latex]. Calculating the derivatives, we get [latex]y_1^\\prime(t)=e^t[\/latex] and [latex]y_2^\\prime(t)=e^t+te^t[\/latex] (step 1). Then, we want to find functions [latex]u'(t)[\/latex] and [latex]v'(t)[\/latex] so that<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  u^\\prime e^t+v^\\prime te^t&=0 \\\\  u^\\prime e^t+v^\\prime(e^t+te^t)&=\\frac{e^t}{t^2}  \\end{aligned}[\/latex]<\/p>\n<p><span data-type=\"newline\"><br \/>\n<\/span>Applying Cramer\u2019s rule, we have<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]u^\\prime=\\frac{\\begin{vmatrix}0&te^t \\\\ \\frac{e^t}{t^2}&e^t+te^t\\end{vmatrix}}{\\begin{vmatrix}e^t&te^t \\\\e^t&e^t+te^t\\end{vmatrix}}=\\frac{0-te^t\\left(\\frac{e^t}{t^2}\\right)}{e^t(e^t+te^t)-e^tte^t}=\\frac{-\\frac{e^{2t}}{t}}{e^{2t}}=-\\frac1t[\/latex]<\/p>\n<p>and<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<div id=\"fs-id1170572296671\" class=\"unnumbered\" data-type=\"equation\" data-label=\"\">\n<p style=\"text-align: center;\">[latex]v^\\prime=\\frac{\\begin{vmatrix}e^t&0\\\\e^t&\\frac{e^t}{t^2}\\end{vmatrix}}{\\begin{vmatrix}e^t&te^t\\\\e^t&e^t+te^t\\end{vmatrix}}=\\frac{e^t\\left(\\frac{e^t}{t^2}\\right)}{e^{2t}}=\\frac{1}{t^2}[\/latex] (step 2).<\/p>\n<\/div>\n<p>Integrating, we get<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  u&=-\\displaystyle\\int\\frac1t \\ dt=-\\ln|t| \\\\  v&=\\displaystyle\\int\\frac{1}{t^2}dt=-\\frac{1}{t}\\text{(step 3)}.  \\end{aligned}[\/latex]<\/p>\n<p><span data-type=\"newline\"><br \/>\n<\/span>Then we have<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  y_p&=-e^t\\ln|t|-\\frac{1}{t}te^t \\\\  &=-e^t\\ln|t|-e^t \\text{(step 4)}.  \\end{aligned}[\/latex]<\/p>\n<p><span data-type=\"newline\"><br \/>\n<\/span>The [latex]e^{t}[\/latex] term is a solution to the complementary equation, so we don\u2019t need to carry that term into our general solution explicitly. The general solution is<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]y(t)=c_1e^t+c_2te^t-e^t\\ln|t|[\/latex] (step 5).<\/p>\n<\/li>\n<li>The complementary equation is [latex]y^{\\prime\\prime}+y+0[\/latex] with associated general solution [latex]c_1\\cos x+c_2\\sin x[\/latex]. So, [latex]y_1(x)=\\cos x[\/latex] and [latex]y_2(x)=\\sin x[\/latex] (step 1). Then, we want to find functions [latex]u'(x)[\/latex] and [latex]v'(x)[\/latex] such that<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned} u^\\prime\\cos x+v^\\prime\\sin x&=0 \\\\ -y^\\prime\\sin x+v^\\prime\\cos x&=3\\sin^2x \\end{aligned}[\/latex].<\/p>\n<p><span data-type=\"newline\"><br \/>\n<\/span>Applying Cramer\u2019s rule, we have<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]u^\\prime=\\frac{\\begin{vmatrix}0&\\sin x \\\\3\\sin^2x&\\cos x\\end{vmatrix}}{\\begin{vmatrix}\\cos x&\\sin x \\\\ -\\sin x&\\cos x\\end{vmatrix}}=\\frac{0-3\\sin^3x}{\\cos^2x+\\sin^2x}=-3\\sin^3x[\/latex]<\/p>\n<p>and<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]v^\\prime=\\frac{\\begin{vmatrix}\\cos x&0\\\\ -\\sin x&3\\sin^2x\\end{vmatrix}}{\\begin{vmatrix}\\cos x&\\sin x \\\\-\\sin x&\\cos x\\end{vmatrix}}=\\frac{3\\sin^2x\\cos x}{1}=3\\sin^2x\\cos x[\/latex] (step 2).<\/p>\n<p>Integrating first to find [latex]u[\/latex], we get<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]u=\\displaystyle\\int-3\\sin^3xdx=-3\\left[-\\frac13\\sin^2x\\cos x+\\frac23\\displaystyle\\int\\sin xdx\\right]=\\sin^2x\\cos x+2\\cos x[\/latex] (step 3).<\/p>\n<p><span data-type=\"newline\"><br \/>\n<\/span>Now, we integrate to find [latex]v[\/latex]. Using substitution (with [latex]w=\\sin x[\/latex]), we get<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]v=\\displaystyle\\int3\\sin^2x\\cos xdx=\\displaystyle\\int3w^2dw=w^3=\\sin^3x[\/latex].<\/p>\n<p><span data-type=\"newline\"><br \/>\n<\/span>Then,<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  y_p&=(\\sin^2x\\cos x+2\\cos x)\\cos x+(\\sin^3x)\\sin x \\\\  &=\\sin^2x\\cos^2x+2\\cos^2x+\\sin^4x \\\\  &=2\\cos^2x+\\sin^2x(\\cos^2x+\\sin^2x) \\ \\ \\ \\ (step 4). \\\\  &=2\\cos^2x+\\sin^2 \\\\  &=\\cos^2x+1  \\end{aligned}[\/latex]<\/p>\n<p>The general solution is<\/p>\n<p style=\"text-align: center;\">[latex]y(x)=c_1\\cos x+c_2\\sin x+1+\\cos^2x[\/latex] (step 5).<\/p>\n<\/div>\n<\/div>\n<\/li>\n<\/ol>\n<\/section>\n","protected":false},"author":15,"menu_order":14,"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-1563","chapter","type-chapter","status-publish","hentry"],"part":440,"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\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/1563","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":9,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/1563\/revisions"}],"predecessor-version":[{"id":2151,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/1563\/revisions\/2151"}],"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\/1563\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/media?parent=1563"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapter-type?post=1563"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/contributor?post=1563"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/license?post=1563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}