DiffEq Home

Higher Order ODEs: Undetermined Coefficients

    


Consider the linear nonhomogeneous second order ODE \[y^{(n)}+p_1(x)y^{(n-1)}+p_2(x)y^{(n-2)}+\cdots+p_n(x)y=g(x). \;\;\;\;(47)\] To find a particular solution of the ODE (47) use the following table: \[ \begin{array}{|c|c|} \hline g(x)&y_p\\ \hline c_0x^n+c_1x^{n-1}+\cdots+c_n & x^s(a_0x^n+a_1x^{n-1}+\cdots+a_n)\\ \hline (c_0x^n+c_1x^{n-1}+\cdots+c_n)e^{rx} & x^s(a_0x^n+a_1x^{n-1}+\cdots+a_n)e^{rx}\\ \hline (c_0x^n+c_1x^{n-1}+\cdots+c_n)\cos(\theta x), & x^s[(a_0x^n+a_1x^{n-1}+\cdots+a_n)\cos(\theta x)+\\ (c_0x^n+c_1x^{n-1}+\cdots+c_n)\sin(\theta x)\; & \;(b_0x^n+b_1x^{n-1}+\cdots+b_n)\sin(\theta x)]\\ \hline (c_0x^n+c_1x^{n-1}+\cdots+c_n)\cos(\theta x)e^{rx}, & x^s[(a_0x^n+a_1x^{n-1}+\cdots+a_n)\cos(\theta x)+\\ (c_0x^n+c_1x^{n-1}+\cdots+c_n)\sin(\theta x)e^{rx}\; & (b_0x^n+b_1x^{n-1}+\cdots+b_n)\sin(\theta x)]e^{rx}\\ \hline \end{array}\] where \(s\) is the smallest nonnegative integer \((s = 0, 1, 2,\ldots,n)\) that will ensure that no term in \(y_p\) is a solution of the corresponding homogeneous equation.

Example. Find the general solution.

  1. \((D^3+2D^2-3D)y=16xe^{x}\)

  2. \((D^3+2D^2-3D)y=-10x\sin x\)

  3. \((D^3+2D^2-3D)y=16xe^{x}-10x\sin x\)

Solution. The characteristic equation is \[\begin{align*} r^3+2r^2-3r&=0\\ r(r-1)(r+3)&=0\\ r&=0,-3,1. \end{align*}\] So the homogeneous solution is \[y_h=c_1+c_2e^{-3x}+c_3e^{x},\] for arbitrary constants \(c_1,c_2\), and \(c_3\). Now we will find a particular solution of the nonhomogeneous ODE.

  1. Let \(y_p=(ax+b)e^{x}\) be a particular solution for some constants \(a,b\). Note that \(e^x\) is already in the homogeneous solution. So let \(y_p=x(ax+b)e^{x}=(ax^2+bx)e^{x}\) be a particular solution for some constants \(a,b\). Then \[\begin{align*} y_p'&=[ax^2+(2a+b)x+b]e^{x},\\ y_p''&=[ax^2+(4a+b)x+2a+2b]e^{x},\\ y_p'''&=[ax^2+(6a+b)x+6a+3b]e^{x}. \end{align*}\] Plugging these into \(y_p'''+2y_p''-3y_p'=16e^{x}\), we get \[\begin{align*} [ax^2+(6a+b)x+6a+3b]e^{x}+2\cdot [ax^2+(4a+b)x+2a+2b]e^{x}-3\cdot [ax^2+(2a+b)x+b]e^{x}&=16xe^{x}\\ [8ax+10a+4b]e^{2x}&=16xe^{x}\\ 8ax+10a+4b&=16x. \end{align*}\] Comparing the coefficient \(x\) and the constant term in LHS and RHS, we get \[\begin{align*} 8a&=16 & 10a+4b&=0 \end{align*}\] Solving we get \(a=2,\; b=-5\). So \(y_p=(2x^2-5x)e^{x}\) is a particular solution. Thus the general solution is \[y=y_h+y_p=c_1+c_2e^{-3x}+c_3e^{x}+(2x^2-5x)e^{x}.\]

  2. Let \(y_p=(ax+b)\cos x+(cx+d)\sin x\) be a particular solution for some constants \(a,b,c,d\). Then \[\begin{align*} y_p'&=(cx+a+d)\cos x+(-ax-b+c)\sin x,\\ y_p''&=(-ax-b+2c)\cos x+(-cx-2a-d)\sin x,\\ y_p'''&=(-cx-3a-d)\cos x+(ax+b-3c)\sin x. \end{align*}\] Plugging these into \(y_p'''+2y_p''-3y_p'=-10x\sin x\), we get \[\begin{align*} [(-cx-3a-d)\cos x+(ax+b-3c)\sin x]+2[(-ax-b+2c)\cos x+(-cx-2a-d)\sin x]&\\ -3[(cx+a+d)\cos x+(-ax-b+c)\sin x]&=-10x\sin x\\ (-2a-4c)x\cos x+(-6a-2b+4c-4d)\cos x+(4a-2c)x\sin x+(-4a+4b-6c-2d)\sin x&=-10x\sin x \end{align*}\] Comparing the coefficients of \(x\cos x,\,\cos x,\,x\sin x\), and \(\sin x\) in LHS and RHS, we get \[\begin{align*} -2a-4c=0, && -6a-2b+4c-4d=0, && 4a-2c=-10, && -4a+4b-6c-2d=0 \end{align*}\] Solving we get \(a=-2,\; b=6/5,\; c=1,\; d=17/5\). So \[y_p=(-2x+6/5)\cos x+(x+17/5)\sin x\] is a particular solution. Thus the general solution is \[y=y_h+y_p=c_1+c_2e^{-3x}+c_3e^{x}+(-2x+6/5)\cos x+(x+17/5)\sin x.\]

  3. By preceding two parts and a theorem, \((2x^2-5x)e^{x}+(-2x+6/5)\cos x+(x+17/5)\sin x\) is a particular solution. Thus the general solution is \[y=c_1+c_2e^{-3x}+c_3e^{x}+(2x^2-5x)e^{x}+(-2x+6/5)\cos x+(x+17/5)\sin x.\]


Last edited