Differential equations – Ordinary differential equations – Variation of parameters
In the course Calculus the method of determined coefficients is already discussed. Here we will consider the method of variation of parameters to find a particular solution (or the general solution) of a nonhomogeneous linear differential equation if we know the general solution of the corresponding homogeneous differential equation.
Consider the nonhomogeneous second-order linear differential equation in standard form:
\[y''(t)+p(t)y'(t)+q(t)y(t)=g(t)\]with \(p\), \(q\) and \(g\) are continuous functions. Suppose that \(y_h(t)=c_1y_1(t)+c_2y_2(t)\) is the general solution of the corresponding homogeneous differential equation
\[y''(t)+p(t)y'(t)+q(t)y(t)=0.\]Now suppose that \(y(t)=u_1(t)y_1(t)+u_2(t)y_2(t)\), then we have:
\[y'(t)=\underbrace{u_1'(t)y_1(t)+u_2'(t)y_2(t)}_{\text{set this equal to zero}}+u_1(t)y_1'(t)+u_2(t)y_2'(t)\]and
\[y''(t)=u_1'(t)y_1'(t)+u_2'(t)y_2'(t)+u_1(t)y_1''(t)+u_2(t)y_2''(t).\]Substitution into the nonhomogeneous differential equation then gives (the terms with \(u_1(t)\) and \(u_2(t)\) cancel):
\[u_1'(t)y_1'(t)+u_2'(t)y_2'(t)=g(t).\]So then we have:
\[\left\{\begin{array}{l}u_1'(t)y_1(t)+u_2'(t)y_2(t)=0\\[2.5mm]u_1'(t)y_1'(t)+u_2'(t)y_2'(t)=g(t)\end{array}\right.\quad\Longleftrightarrow\quad \begin{pmatrix}y_1(t)&y_2(t)\\y_1'(t)&y_2'(t)\end{pmatrix}\begin{pmatrix}u_1'(t)\\u_2'(t)\end{pmatrix}=\begin{pmatrix}0\\g(t)\end{pmatrix}.\]Note that the determinant of the coefficient matrix
\[\begin{vmatrix}y_1(t)&y_2(t)\\y_1'(t)&y_2'(t)\end{vmatrix}=W(y_1,y_2)(t)\]is the Wronskian of the solutions \(y_1(t)\) and \(y_2(t)\) of the homogeneous differential equation. If these solutions are linear independent, then this determinant \(W(y_1,y_2)(t)\) is unequal to zero and then there exists a unique solution for \(u_1'(t)\) and \(u_2'(t)\). Then this leads to \(u_1(t)\) and \(u_2(t)\) by integration, each with an arbitrary integration constant. Then \(y(t)=u_1(t)y_1(t)+u_2(t)y_2(t)\) is the general solution of the nonhomogeneous differential equation, consisting of a particular solution and the general solution \(y_h(t)=c_1y_1(t)+c_2y_2(t)\) of the homogeneous differential equation.
Afterwards it turns out that it was allowed to set \(u_1'(t)y_1(t)+u_2'(t)y_2(t)\) equal to zero.
Examples:
1) Consider \(ty''(t)-(1+t)y'(t)+y(t)=2t^2e^{2t}\) for \(t>0\). It is easy to check that \(y_1(t)=1+t\) and \(y_2(t)=e^t\) are solutions of the homogeneous differential equation \(ty''(t)-(1+t)y'(t)+y(t)=0\). Now we can apply the method of variation of parameters to find a particular (or the general) solution of the nonhomogeneous differential equation. Suppose that \(y(t)=(1+t)u_1(t)+e^tu_2(t)\), then we have:
\[y'(t)=\underbrace{(1+t)u_1'(t)+e^tu_2'(t)}_{\text{set this equal to zero}}+u_1(t)+e^tu_2(t)\quad\Longrightarrow\quad y''(t)=u_1'(t)+e^tu_2'(t)+e^tu_2(t).\]Substitution then gives:
\[tu_1'(t)+te^tu_2'(t)+te^tu_2(t)-(1+t)u_1(t)-(1+t)e^tu_2(t)+(1+t)u_1(t)+e^tu_2(t)=2t^2e^{2t}\]or equivalently
\[tu_1'(t)+te^tu_2'(t)=2t^2e^{2t}\quad\Longleftrightarrow\quad u_1'(t)+e^tu_2'(t)=2te^{2t}.\]This implies:
\[\left\{\begin{array}{rcl}(1+t)u_1'(t)+e^tu_2'(t)&=&0\\[2.5mm]u_1'(t)+e^tu_2'(t)&=&2te^{2t}\end{array}\right.\quad\Longrightarrow\quad u_1'(t)=-2e^{2t}\quad\text{and}\quad u_2'(t)=2(1+t)e^t.\]This implies that \(u_1(t)=-e^{2t}+c_1\) and \(u_2(t)=2te^t+c_2\). Hence the general solution is:
\[y(t)=(1+t)u_1(t)+e^tu_2(t)=-(1+t)e^{2t}+2te^{2t}+c_1(1+t)+c_2e^t=(t-1)e^{2t}+c_1(1+t)+c_2e^t,\quad c_1,c_2\in\mathbb{R}.\]2) Consider \(y''(t)+4y'(t)+4y(t)=\displaystyle\frac{e^{-2t}}{t^2}\) for \(t>0\). The characteristic equation is \(r^2+4r+4=0\) or equivalently \((r+2)^2=0\). So the general solution of the homogeneous differential equation is: \(y_h(t)=c_1e^{-2t}+c_2te^{-2t}\). Now suppose that \(y(t)=u_1(t)e^{-2t}+u_2(t)te^{-2t}\), then we have:
\[y'(t)=\underbrace{u_1'(t)e^{-2t}+u_2'(t)te^{-2t}}_{\text{set this equal to zero}}-2u_1(t)e^{-2t}+u_2(t)(1-2t)e^{-2t}\]and
\[y''(t)=-2u_1'(t)e^{-2t}+u_2'(t)(1-2t)e^{-2t}+4u_1(t)e^{-2t}+u_2(t)(4t-4)e^{-2t}.\]Substitution then gives: \(-2u_1'(t)e^{-2t}+u_2'(t)(1-2t)e^{-2t}=\displaystyle\frac{e^{-2t}}{t^2}\). Hence:
\[\left\{\begin{array}{rcl}u_1'(t)e^{-2t}+u_2'(t)te^{-2t}&=&0\\[2.5mm]-2u_1'(t)e^{-2t}+u_2'(t)(1-2t)e^{-2t}&=&\displaystyle\frac{e^{-2t}}{t^2}\end{array}\right. \quad\Longrightarrow\quad\left\{\begin{array}{rcl}u_1'(t)+tu_2'(t)&=&0\\[2.5mm]-2u_1'(t)+(1-2t)u_2'(t)&=&\displaystyle\frac{1}{t^2}.\end{array}\right.\]This implies: \(u_2'(t)=\displaystyle\frac{1}{t^2}\) and \(u_1'(t)=-tu_2'(t)=-\displaystyle\frac{1}{t}\). Integration then leads to: \(u_1(t)=\ln(t)+k_1\) and \(u_2(t)=-\displaystyle\frac{1}{t}+k_2\). Hence the general solution is: \(y(t)=-e^{-2t}\ln(t)-e^{-2t}+k_1e^{-2t}+k_2te^{-2t}\) with \(k_1,k_2\in\mathbb{R}\). Note that this can be simplified to
\[y(t)=-e^{-2t}\ln(t)+c_1e^{-2t}+c_2te^{-2},\quad c_1,c_2\in\mathbb{R}.\]In this case we can also use \(y(t)=u(t)e^{-2t}\). Then we have:
\[y'(t)=u'(t)e^{-2t}-2u(t)e^{-2t}\quad\text{en}\quad y''(t)=u''(t)e^{-2t}-4u'(t)e^{-2t}+4u(t)e^{-2t}.\]Substitution then gives:
\[u''(t)e^{-2t}-4u'(t)e^{-2t}+4u(t)e^{-2t}+4u'(t)e^{-2t}-8u(t)e^{-2t}+4u(t)e^{-2t}=\frac{e^{-2t}}{t^2} \quad\Longrightarrow\quad u''(t)=\frac{1}{t^2}.\]This implies: \(u'(t)=-\displaystyle\frac{1}{t}+c_2\) and therefore \(u(t)=-\ln(t)+c_1+c_2t\). Hence the general solution is:
\[y(t)=u(t)e^{-2t}=-e^{-2t}\ln(t)+c_1e^{-2t}+c_2te^{-2t},\quad c_1,c_2\in\mathbb{R}.\]Last modified on April 19, 2021