Skip to main content

Tutorial 3 & 4: 2nd Order Ordinary Differential Equations

  1. Use the Wronskian to show whether the give set of functions is linearly dependent or linearly independent.

    a. y1=xy2=x+1y_1=x \qquad y_2=x+1

    Solution
    y1=x,y1=1y2=x+1,y2=1\begin{aligned} y_1&=x, \qquad &y'_1&=1\\ y_2&=x+1, \qquad &y'_2&=1 \end{aligned}W(y1,y2)=xx+111=x(x1)=10\begin{aligned} W(y_1,y_2)&=\left| \begin{array}{cc}x&x+1\\1&1\end{array} \right|\\ &=x-(x-1)\\ &=1 \neq 0 \end{aligned}

    Since W(x,x+1)0W(x,x+1)\neq 0, thus {x,x+1}\{ x, x+1 \} are linearly independent

    b. y1=eαxsinβxy2=eαxcosβxy_1=e^{\alpha x}\sin\beta x \qquad y_2=e^{\alpha x}\cos\beta x

    Solution
    y1=eαxsinβx,y1=βeαxcosβx+αeαxsinβxy2=eαxcosβ,y2=βeαxsinβx+αeαxcosβx\begin{aligned} y_1&=e^{\alpha x}\sin\beta x, \qquad &y'_1&=\beta e^{\alpha x}\cos\beta x+ \alpha e^{\alpha x}\sin \beta x\\ y_2&=e^{\alpha x}\cos\beta, \qquad &y'_2&=-\beta e^{\alpha x}\sin\beta x+ \alpha e^{\alpha x}\cos \beta x \end{aligned}W(y1,y2)=eαxsinβxeαxcosβxβeαxcosβx+αeαxsinβxβeαxsinβx+αeαxcosβx=βe2αxsin2βx+αe2αxsinβxcosβxβe2αxcos2βxαe2αxsinβxcosβx=βe2αx(sin2βx+cos2βx)=βe2αx\begin{aligned} W(y_1,y_2)&=\left| \begin{array}{cc}e^{\alpha x}\sin\beta x&e^{\alpha x}\cos\beta x\\\beta e^{\alpha x}\cos\beta x+ \alpha e^{\alpha x}\sin \beta x&-\beta e^{\alpha x}\sin\beta x+ \alpha e^{\alpha x}\cos \beta x\end{array} \right|\\ &=-\beta e^{2\alpha x}\sin^2 \beta x+\alpha e^{2\alpha x}\sin\beta x\cos\beta x - \beta e^{2\alpha x}\cos^2\beta x - \alpha e^{2\alpha x}\sin\beta x\cos\beta x\\ &=-\beta e^{2\alpha x}(sin^2\beta x+\cos^2\beta x)\\ &=-\beta e^{2\alpha x} \end{aligned}

    Since β0\beta\neq0 and e2αx0e^{2\alpha x}\neq 0, thus W(y1,y2)0W(y_1,y_2)\neq 0.

    \therefore Linearly independent.

  2. Verify that each of the given functions is a solution of the differential equation, and use their Wronskian to show that these solutions are linearly independent.

    Verify the linear combination of the solutions is also a solution.

    a. y1=exy2=e2xy+y2y=0y_1=e^x\qquad y_2=e^{-2x}\qquad y''+y'-2y=0

    Solution
    y1=ex,y1=exy1=exy2=e2xy2=2e2xy2=4e2x\begin{aligned} y_1&=e^x,\qquad &y_1'&=e^x\qquad &y_1''&=e^x\\ y_2&=e^{-2x}\qquad &y_2'&=-2e^{-2x}\qquad &y_2''&=4e^{-2x} \end{aligned}

    For

    y1ex+ex2ex=0y24e2x+(2e2x)2(e2x)=0\begin{aligned} y_1&\rightarrow e^x+e^x-2e^x=0\\ y_2&\rightarrow 4e^{-2x}+(-2e^{-2x})-2(e^{-2x})=0 \end{aligned}

    Both are solution.

    W(y1,y2)=exe2xex2e2x=2exex=3ex0\begin{aligned} W(y_1,y_2)&=\left| \begin{array}{cc}e^x&e^{-2x}\\e^x&-2e^{-2x}\end{array} \right|\\ &=-2e^{-x}-e^{-x}\\ &=-3e^{-x}\neq 0 \end{aligned}

    Since ex0e^{-x}\neq0, thus W(y1,y2)0W(y_1,y_2)\neq 0.

    \therefore Linearly independent.

    b. y1=x2y2=x1x2y2y=0y_1=x^2\qquad y_2=x^{-1}\qquad x^2y''-2y=0

    Solution
    y1=x2,y1=2x,y1=2y2=x1,y2=x2,y2=2x3\begin{aligned} y_1&=x^2,\qquad &y_1'&=2x,\qquad &y_1''=2\\ y_2&=x^{-1},\qquad &y_2'&=-x^{-2},\qquad &y_2''=-2x^{-3} \end{aligned}

    For

    y1x2y2y=x2(2)2(x2)=0y2x2(2x3)2(x1)=2x12x1=0\begin{aligned} y_1&\rightarrow x^2y''-2y=x^2(2)-2(x^2)=0\\ y_2&\rightarrow x^2(2x^{-3})-2(x^{-1})=2x^{-1}-2x^{-1}=0 \end{aligned}

    Both are solution.

    W(y1,y2)=x2x12xx2=x02x0=30\begin{aligned} W(y_1,y_2)&=\left| \begin{array}{cc}x^2&x^{-1}\\2x&-x^{-2}\end{array} \right|\\ &=-x^0-2x^0\\ &=-3\neq 0 \end{aligned}

    \therefore Linearly independent.

    c. y1=exy2=xexy+2y+y=0y_1=e^{-x}\qquad y_2=xe^{-x}\qquad y''+2y'+y=0

    Solution
    y1=exy1=exy1=exy2=xexy2=xex+exy2=xexexex=xex2ex\begin{aligned} y_1&=e^{-x} \qquad &y_1'&=-e^{-x} \qquad &y_1''&=e^{-x}\\ y_2&=xe^{-x} \qquad &y_2'&=-xe^{-x}+e^{-x} \qquad &y_2''&=xe^{-x}-e^{-x}-e^{-x}=xe^{-x}-2e^{-x} \end{aligned}

    For

    y1y+2y+y=ex+2(ex)+ex=0y2(xex2ex)+2(xex+ex)+2ex=0\begin{aligned} y_1&\rightarrow y''+2y'+y=e^{-x}+2(-e^{-x})+e^{-x}=0\\ y_2&\rightarrow (xe^{-x}-2e^{-x})+2(-xe^{-x}+e^{-x})+2e^{-x}=0 \end{aligned}

    Both are solution.

    W(y1,y2)=exxexexxex+ex=(xe2x+e2x)+(xe2x)=e2x0\begin{aligned} W(y_1,y_2)&=\left| \begin{array}{cc}e^{-x}&xe^{-x}\\-e^{-x}&xe^{-x}+e^{-x}\end{array} \right|\\ &=(-xe^{-2x}+e^{-2x})+(xe^{-2x})\\ &=e^{-2x}\neq 0 \end{aligned}

    \therefore Linearly independent.

  3. Solve the following second order ODEs

    a. y4y=0y''-4y=0

    Solution
    y4y=0m24=0m=±2y=C1e2x+C2e2x\begin{aligned} y''-4y&=0\\ m^2-4&=0\\ m&=\pm 2\\ \Rightarrow y&=C_1e^{2x}+C_2 e^{-2x} \end{aligned}

    b. yy6y=0y''-y'-6y=0

    Solution
    yy+7y=0m2m+6=0(m3)(m+2)=0m=3,2y=C1e3x+C2e2x\begin{aligned} y''-y'+7y&=0\\ m^2-m+6&=0\\ (m-3)(m+2)&=0\\ m&=3,-2\\ \Rightarrow y&=C_1e^{3x}+C_2e^{-2x} \end{aligned}

    c. 6y+yy=06y''+y'-y=0

    Solution
    6y+yy=06m2+m1=0(3m1)(2m+1)=0m=13,12y=C1e13x+C2e12x\begin{aligned} 6y''+y'-y&=0\\ 6m^2+m-1&=0\\ (3m-1)(2m+1)&=0\\ m&=\frac{1}{3}, -\frac{1}{2}\\ \Rightarrow y&=C_1e^{\frac{1}{3}x}+C_2e^{-\frac{1}{2}x} \end{aligned}

    d. y+y=0y''+y=0

    Solution
    y+y=0m2+1=0m=1=±iy1=C1eix,y2=C1eixy=eix(C1cosx+C2sinx)=C1cosx+C2sinx\begin{aligned} y''+y&=0\\ m^2+1&=0\\ m&=\sqrt{-1}=\pm i \\ y_1=C_1e^{ix} &, y_2=C_1e^{-ix}\\ \Rightarrow y&=e^{ix}(C_1\cos x+C_2\sin x)\\ &=C_1\cos x+C_2\sin x \end{aligned}

    e. y+4y+8y=0y''+4y'+8y=0

    Solution
    y+4y+8y=0m2+4m+8=0m=4±424(1)(8)2(1)=12(4±1632)=12(4±4i)=2±2iy1=C1e(2+2i)x,y2=C2e(22i)xy=e2x(C1cos2x+C2sin2x)\begin{aligned} y''+4y'+8y&=0\\ m&2+4m+8&=0\\ m&=\frac{-4\pm\sqrt{4^2-4(1)(8)}}{2(1)}\\ &=\frac{1}{2}\left(-4\pm\sqrt{16-32}\right)\\ &=\frac{1}{2}(-4\pm 4i)\\&=-2\pm 2i\\ y_1=C_1e^{(-2+2i)x} &, y_2=C_2e^{(-2-2i)x} \\ y&=e^{-2x}(C_1\cos 2x + C_2\sin 2x) \end{aligned}
  4. Solve the following second order ODEs with initial-value conditions

    a. y4y=0y(0)=4y(0)=12y''-4y=0\qquad\qquad y(0)=4\qquad y'(0)=12

    Solution
    y4y=0m2=4m=±2\begin{aligned} y''-4y&=0\\m^2&=4\\m&=\pm2\\ \end{aligned}

    General Solution, y=C1e2x+C2e2xy=C_1e^{2x}+C_2e^{-2x}, y=2C1e2x2C2e2xy'=2C_1e^{2x}-2C_2e^{-2x}

    When

    x=0,y=44=C1+C2(1)x=0, y=4 \qquad \Rightarrow \qquad 4=C_1+C_2 \tag{1}x=0,y=1212=2C12C2(2)x=0, y'=12 \qquad \Rightarrow \qquad 12=2C_1-2C_2 \tag{2}

    Take (2)+2×(1)(2)+2\times(1)

    (12+8)=(2C1+2C2)+(2C12C2)20=4C1C1=5\begin{aligned} (12+8)&=(2C_1+2C_2)+(2C_1-2C_2)\\ 20&=4C_1\\ C_1&=5 \end{aligned}

    Into (1)(1),

    4=5+C2C2=14=5+C_2 \qquad \Rightarrow \qquad C_2=-1

    Thus,

    y=5e2xe2xy=5e^{2x}-e^{-2x}

    b. y6y+9y=0y(0)=1.4y(0)=4.6y''-6y+9y=0 \qquad \qquad y(0)=-1.4 \qquad y'(0)=4.6

    Solution
    y6y+9y=0m26m+0=0(m3)2=0m=3\begin{aligned} y''-6y'+9y&=0\\m^2-6m+0&=0\\(m-3)^2&=0\\m&=3 \end{aligned}

    General Solution, y=C1e3x+C2xe3xy=C_1e^{3x}+C_2xe^{3x}, y=3C1e3x+C2e3x+3xC2e3xy'=3C_1e^{3x}+C_2e^{3x}+3xC_2e^{3x}

    When

    x=0,y=1.41.4=C1+0C1=1.4\begin{aligned} x=0, y=-1.4 \qquad \Rightarrow \qquad -1.4&=C_1+0 \\ C_1&=-1.4 \end{aligned}x=0,y=4.64.6=3C1+C2+04.6=3(1.4)+C2C2=8.8\begin{aligned} x=0,y'=4.6 \qquad \Rightarrow \qquad 4.6&=3C_1+C_2+0 \\ 4.6 &=3(-1.4)+C_2 \\ C_2&=8.8 \end{aligned}

    Thus,

    y=1.4e3x+8.8xe3xy=-1.4e^{-3x}+8.8xe^{-3x}

    c. 4y8y+3y=0y(1)=45e12y(1)=25e124y''-8y+3y=0 \qquad\qquad y(1)=\frac{4}{5}e^{\frac{1}{2}} \qquad y'(1)=\frac{2}{5}e^{\frac{1}{2}}

    Solution
    4y8y+3y=04m28m+3=0(2m3)(2m1)=0m=12,32\begin{aligned} 4y''-8y'+3y&=0\\ 4m^2-8m+3&=0\\ (2m-3)(2m-1)=0\\ m&=\frac{1}{2}, \frac{3}{2} \end{aligned}

    General solution. y=C1e12x+C2e32xy=C_1e^{\frac{1}{2}x}+C_2e^{\frac{3}{2}x}, y=12C1e12x+32C2e32xy'=\frac{1}{2}C_1e^{\frac{1}{2}x}+\frac{3}{2}C_2e^{\frac{3}{2}x}

    When

    x=1,y=45e1245e12=C1e12+C2e32(45C1)e12=C2e32(1)\begin{aligned} x=1, y=\frac{4}{5}e^{\frac{1}{2}} \qquad \Rightarrow \qquad \frac{4}{5}e^{\frac{1}{2}}&=C_1e^{\frac{1}{2}}+C_2e^{\frac{3}{2}} \\ \left(\frac{4}{5}-C_1\right)e^{\frac{1}{2}}&=C_2e^{\frac{3}{2}} \tag{1} \end{aligned}x=1,y=25e1225e12=12C1e12+32C2e32(2512C1)e12=32C2e3223(2512C1)e12=C2e32(2)\begin{aligned} x=1, y'=\frac{2}{5}e^{\frac{1}{2}} \qquad \Rightarrow \qquad \frac{2}{5}e^{\frac{1}{2}} &= \frac{1}{2}C_1e^{\frac{1}{2}}+\frac{3}{2}C_2e^{\frac{3}{2}} \\ \left(\frac{2}{5}-\frac{1}{2}C_1\right) e^{\frac{1}{2}} &=\frac{3}{2}C_2e^{\frac{3}{2}} \\ \frac{2}{3}\left(\frac{2}{5}-\frac{1}{2}C_1\right)e^{\frac{1}{2}} &= C_2e^{\frac{3}{2}} \tag{2} \end{aligned}

    Let (1)=(2)(1) = (2),

    (45C1)e12=(41513C1)e12(45415)=(113)C123C1=815C1=45\begin{aligned} \left(\frac{4}{5}-C_1\right)e^{\frac{1}{2}}&=\left(\frac{4}{15}-\frac{1}{3}C_1\right)e^{\frac{1}{2}}\\ \left(\frac{4}{5}-\frac{4}{15}\right)&=\left(1-\frac{1}{3}\right)C_1\\ \frac{2}{3}C_1&=\frac{8}{15} \\ C_1&=\frac{4}{5} \end{aligned}

    Into (1)(1),

    (4545)e12=C2e32C2e32=0e320C2=0\begin{aligned} \left(\frac{4}{5}-\frac{4}{5}\right)e^{\frac{1}{2}}&=C_2e^{\frac{3}{2}} \\ C_2e^{\frac{3}{2}} &=0 \qquad e^{\frac{3}{2}} \neq 0 \\ C_2&=0 \end{aligned}

    Thus,

    y=45e12xy=\frac{4}{5}e^{\frac{1}{2}x}

    d. y+y=0y(0)=3y(0)=0.5y''+y=0 \qquad\qquad y(0)=3 \qquad y'(0)=-0.5

    Solution
    y+y=0m2+1=0m=±i\begin{aligned} y''+y&=0\\m^2+1&=0\\m&=\pm i \end{aligned}

    General Solution. y=C1sinx+C2cosxy=C_1\sin x + C_2\cos x, y=C1cosxC2sinxy'=C_1\cos x - C_2\sin x

    When

    x=0,y=33=C1(0)+C2(1)C2=3\begin{aligned} x=0, y=3 \qquad \Rightarrow \qquad 3&=C_1(0)+C_2(1) \\ C_2&=3 \end{aligned}x=0,y=0.50.5=C1(1)+C2(0)C1=0.5\begin{aligned} x=0, y'=-0.5 \qquad \Rightarrow \qquad -0.5&=C_1(1)+C_2(0) \\ C_1&=-0.5 \end{aligned}

    Thus,

    y=12sinx+3cosxy=-\frac{1}{2}\sin x+3\cos x

    e. y+2y+2y=0y(0)=1y(0)=1y''+2y'+2y=0 \qquad\qquad y(0)=1 \qquad y'(0)=-1

    Solution
    y+2y+2y=0m2+2m+2=0m=12(1)[2±224(1)(2)]=12[2±4]=1±i\begin{aligned} y''+2y'+2y&=0\\ m^2+2m+2&=0\\ m=\frac{1}{2(1)}\left[-2\pm\sqrt{2^2-4(1)(2)}\right]\\ &=\frac{1}{2}\left[-2\pm\sqrt{4}\right]\\ &=-1\pm i \end{aligned}

    General solution.

    y=ex(C1cosx+C2sinx)y=ex(C1cosx+C2sinx)+ex(C1sinx+C2cosx)\begin{aligned} y&=e^{-x}(C_1\cos x+C_2\sin x) \\ y'&=-e^x(C_1\cos x+C_2 \sin x)+e^{-x}(-C_1\sin x+C_2\cos x) \end{aligned}

    When

    x=0,y=11=C1(1)+C2(0)C1=1\begin{aligned} x=0, y=1 \qquad \Rightarrow \qquad 1&=C_1(1)+C_2(0) \\ C_1&=1 \end{aligned}x=0,y=11=[C1(1)+C2(0)]+[C1(0)+C2(1)]1=C1+C2C2=C11C2=0\begin{aligned} x=0, y'=-1 \qquad \Rightarrow \qquad -1&=-[C_1(1)+C_2(0)]+[-C_1(0)+C_2(1)]\\-1&=-C_1+C_2\\C_2&=C_1-1\\C_2&=0 \end{aligned}

    Thus,

    y=excosxy=e^{-x}\cos x
  5. Obtain a general solution for nonhomogeneous problems using the method of undetermined coefficients.

    a. y+3y+2y=2x2y''+3y'+2y=2x^2

    Solution
    m2+3m+2=0(m+1)(m+2)=0m=1,2yc=C1ex+C2e2x\begin{aligned} m^2+3m+2&=0\\ (m+1)(m+2)&=0\\ m&=-1,-2\\ \\ y_c=C_1e^{-x}+C_2e^{-2x} \end{aligned}yp=Ax2+Bx+cyp=2Ax+Byp=2A2(Ax2+Bx+C)+3(2Ax+B)+2(2A)=2x2(2A)x2+(2B+6A)x+(2C+3B+2A)=2x3\begin{aligned} y_p&=Ax^2+Bx+c\\ y'p&=2Ax+B\\ y''p&=2A\\ \\ \Rightarrow 2(Ax^2+Bx+C)+3(2Ax+B)+2(2A)&=2x^2\\ (2A)x^2+(2B+6A)x+(2C+3B+2A)=2x^3 \end{aligned}

    Thus, A=1A=1, B=3B=-3, C=72C=\frac{7}{2}

    yp=x23x+72y_p=x^2-3x+\frac{7}{2}y=C1ex+C2e2x+x23x+72\therefore y=C_1e^{-x}+C_2e^{-2x}+x^2-3x+\frac{7}{2}

    b. y+4y=4x2+6y''+4y=4x^2+6

    Solution
    m2+4=0m=±2iyc=C1e2ix+C2e2ixyc=C1cos2x+C2sin2x\begin{aligned} m^2+4&=0\\ m&=\pm 2i\\ \\ y_c&=C_1e^{-2ix}+C_2e^{2ix}\\ y_c&=C_1\cos 2x+C_2\sin 2x \end{aligned}yp=Ax2+Bx+cyp=2Ax+Byp=2A(2A)+4(Ax2+Bx+C)=4x2+6(4A)x2+(4B)x+(2A+4C)=4x2+6\begin{aligned} y_p&=Ax^2+Bx+c\\ y'p&=2Ax+B\\ y''p&=2A\\ \\ \Rightarrow (2A)+4(Ax^2+Bx+C)&=4x^2+6 \\ (4A)x^2 + (4B)x+(2A+4C)&=4x^2+6 \end{aligned}

    Thus,

    4A=44B=02A+4C=6A=1B=0C=1\begin{aligned} 4A &=4 \qquad &4B&=0 \qquad &2A+4C&=6 \\ A&=1 \qquad &B&=0 \qquad &C&=1 \end{aligned}yp=x2+1y_p=x^2+1y=C1cos2x+C2sin2x+x2+1\therefore y=C_1\cos 2x+C_2\sin 2x+x^2+1

    c. yy=exy''-y=e^x

    Solution
    m21=0m=±1yc=C1ex+C2exα=1m1m2\begin{aligned} m^2-1&=0\\ m&=\pm 1 \\ \\ y_c&=C_1e^{-x}+C_2e^x \\ \alpha&=1 \Rightarrow m_1\neq m_2 \end{aligned}yp=Axexyp=Aex+Axexyp=2Aex+Axex\begin{aligned} y_p&=Axe^x \\ y'_p&=Ae^x+Axe^x \\ y''_p&=2Ae^x+Axe^x \end{aligned}

    Thus

    (2Aex+Axex)(Axex)=ex2A=1A=12\begin{aligned} (2Ae^x+Axe^x)-(Axe^x)=e^x \\ 2A&=1 \\ A&=\frac{1}{2} \end{aligned}yp=12xexy_p=\frac{1}{2}xe^xy=C1ex+C2ex+12xex\therefore y=C_1e^{-x}+C_2e^x+\frac{1}{2}xe^x

    d. y+3y4y=10exy''+3y'-4y=10e^x

    Solution
    m2+3m4=0(m1)(m+4)=0m=1,4yc=C1ex+X2e4xα=1m1m2\begin{aligned} m^2+3m-4&=0\\ (m-1)(m+4)&=0\\ m&=1,-4 \\ \\ y_c&=C_1e^x+X_2e^{-4x} \\ \alpha&=1 \Rightarrow m_1\neq m_2 \end{aligned}yp=Axexyp=Axex+Aexyp=2Aex+Axex\begin{aligned} y_p&=Axe^x \\ y'_p&=Axe^x+Ae^x \\ y''_p &=2Ae^x+Axe^x \end{aligned}

    Thus

    (2Aex+Axex)+3(Axex+Aex)4(Axex)=10ex(A+3A4A)xex+(2A+3A)ex=10ex5A=10A=2\begin{aligned} (2Ae^x+Axe^x)+3(Axe^x+Ae^x)-4(Axe^x)&=10e^x \\ (A+3A-4A)xe^x+(2A+3A)e^x &=10e^x \\ 5A&=10\\ A&=2 \end{aligned}yp=2xexy_p=2xe^xy=C1ex+C2e4x+2xex\therefore y=C_1e^x+C_2e^{-4x}+2xe^x

    e. y4y+3y=2e3xy''-4y'+3y=2e^{3x}

    Solution
    m24m+3=0(m3)(m1)=0m=1,3α=3m2m1\begin{aligned} m^2-4m+3&=0\\ (m-3)(m-1)&=0\\ m=1,3 \\ \alpha&=3 \Rightarrow m_2\neq m_1 \end{aligned}yp=Axe3xyp=3Axe3x+Ae3xyp=9Axe3x+6Ae3x\begin{aligned} y_p&=Axe^{3x} \\ y'_p=3Axe^{3x}+Ae^{3x} \\ y''_p=9Axe^{3x}+6Ae^{3x} \\ \end{aligned}

    Thus

    (9Axe3x+6Ae3x)4(3Axe3x+Ae3x)+3(Axe3x)=2e3x(9A12A+3A)xe3x+(6A4A)=2e3x2A=2A=1\begin{aligned} (9Axe^{3x}+6Ae^{3x})-4(3Axe^{3x}+Ae^{3x})+3(Axe^{3x})&=2e^{3x} \\ (9A-12A+3A)xe^{3x}+(6A-4A)&=2e^{3x} \\ 2A&=2\\ A&=1 \end{aligned}yp=xe3xy_p=xe^{3x}y=C1ex+C2e3x+xe3x\therefore y=C_1e^x+C_2e^{3x}+xe^{3x}

    f. y+4y2y=2x23x+6y''+4y'-2y=2x^2-3x+6

    Solution
    m2+4m2=0(m2+4m+4)6=0(m+2)2=6m=2±6yc=C1e(26)x+C2e(2+6)x\begin{aligned} m^2+4m-2&=0 \\ (m^2+4m+4)-6&=0\\ (m+2)^2&=6\\ m&=-2\pm\sqrt{6} \\ \\ y_c&=C_1e^{(-2-\sqrt{6})x} + C_2e^{(-2+\sqrt{6})x} \end{aligned}yp=Ax2+Bx+6yp=2Ax+Byp=2A(2A)+4(2Ax+B)2(Ax2+Bx+C)=2x23x+6\begin{aligned} y_p=Ax^2+Bx+6\\ y'_p&=2Ax+B\\ y''_p=2A \\ \\ (2A)+4(2Ax+B)-2(Ax^2+Bx+C)&=2x^2-3x+6 \end{aligned}2A=28(1)2B=32(1)4(52)2C=6A=1B=52C=0\begin{aligned} -2A&=2 \qquad &8(-1)-2B&=-3 \qquad &2(-1)4\left(-\frac{5}{2}\right)-2C&=6 \\ A&=-1 &B&=-\frac{5}{2} &C&=-0 \end{aligned}yp=x252x9y_p=-x^2-\frac{5}{2}x-9y=C1e(26)x+C2e(2+6)xx252x9\therefore y=C_1e^{(-2-\sqrt{6})x}+C_2e^{(-2+\sqrt{6})x}-x^2-\frac{5}{2}x-9

    g. y+3y+2y=6y''+3y'+2y=6

    Solution
    m2+3m+2=0(m+1)(m+2)=0m=1,2\begin{aligned} m^2+3m+2&=0\\ (m+1)(m+2)&=0\\ m&=-1,-2 \end{aligned}

    Pn(x)P_n(x) same order as G(s)G(s),

    yp=A,yp=0,yp=0y_p=A, y'_p=0, y''_p=00+3(0)+2(A)=6A=3\begin{aligned} 0+3(0)+2(A)&=6\\A&=3 \end{aligned}yp=3y_p=3y=C1ex+C2e2x+3\therefore y=C_1e^{-x}+C_2e^{-2x}+3
  6. Obtain a general solution for nonhomogeneous problems using the method of undetermined coefficients.

    a. y2y+5y=excos2xy''-2y'+5y=e^x\cos 2x

    Solution
    m22m+5=0m=12[2±420]12(2±4i)1±2iyc=ex(C1cos2x+C2sin2x)α=(1+2i)m1m2\begin{aligned} m^2-2m+5&=0\\ m&=\frac{1}{2}[2\pm\sqrt{4-20}]\\ \frac{1}{2}(2\pm 4i)\\1\pm 2i \\ \\ y_c&=e^x(C_1\cos 2x+C_2\sin 2x)\\ \alpha&=(1+2i)\neq m_1\neq m_2 \end{aligned}

    Thus

    g(x)=excos2xexRee2ixRe(e(1+2i)x)yp=AxRe(e(1+2i)x)\begin{aligned} g(x)&=e^x\cos 2x\\ e^x\cdot \text{Re}e^{2ix}\\ \text{Re}(e^{(1+2i)x})\\ y_p&=A_x\text{Re}(e^{(1+2i)x}) \end{aligned}

    Let

    Yp=Axe(1+2i)x,yp=AxRe(e(1+2i)x)Yp=(1+2i)Axe(1+2i)x+Ae(1+2i)xYp=(1+2i)2Axe(1+2i)x+(1+2i)Ae(1+2i)x+(1+2i)Ae(1+2i)x=(3+4i)Axe(1+2i)x+2A(1+2i)e(1+2i)x\begin{aligned} Y_p&=Axe^{(1+2i)x},\qquad y_p=Ax\text{Re}(e^{(1+2i)x}) \\ Y'_p&=(1+2i)Axe^{(1+2i)x}+Ae^{(1+2i)x} \\ Y''_p&=(1+2i)^2Axe^{(1+2i)x}+(1+2i)Ae^{(1+2i)x}+(1+2i)Ae^{(1+2i)x}\\ &=(-3+4i)Axe^{(1+2i)x}+2A(1+2i)e^{(1+2i)x} \end{aligned}(3+4i)Axe(1+2i)x+2A(1+2i)e(1+2i)x2[(1+2i)Axe(1+2i)x+Ae(1+2i)x]+5[Axe(1+2i)x]=excos2x[3+4i24i+5]Axe(1+2i)x+[2+4i2]Ae(1+2i)x=excos2x4Ai=1A=14i\begin{aligned} (-3+4i)Axe^{(1+2i)x}+2A(1+2i)e^{(1+2i)x}-2\left[(1+2i)Axe^{(1+2i)x}+Ae^{(1+2i)x}\right]+5[Axe^{(1+2i)x}]&=e^x\cos 2x \\ [-3+4i-2-4i+5]Axe^{(1+2i)x}+[2+4i-2]Ae^{(1+2i)x}&=e^x\cos 2x \\ 4Ai&=1 \\ A&=-\frac{1}{4}i \end{aligned}Yp=14ixe(1+2i)x=14ixex[cos2x+isin2x]=14xex[sin2xicos2x]yp=ReYp=14xexsin2x\begin{aligned} Y_p=-\frac{1}{4}ixe^{(1+2i)x} \\ &=-\frac{1}{4}ixe^x[\cos 2x+i\sin 2x] \\ &=\frac{1}{4}xe^x[\sin 2x-i\cos 2x]\\ \\ y_p&=\text{Re}Y_p=\frac{1}{4}xe^x\sin 2x \end{aligned}y=ex(C1cos2x+C2sin2x)+14xexsin2x\therefore y = e^x(C_1\cos 2x+C_2\sin 2x)+\frac{1}{4}xe^x\sin 2x

    b. y+y=2xsinxy''+y=2x\sin x

    Solution
    m2=1m=±iyp=C1eix+C2eix=C1cosx+C2sinx\begin{aligned} m^2&=-1 \\ m&=\pm i \\ \\ y_p&=C_1e^{-ix} + C_2e^{ix} \\ &=C_1\cos x+C_2 \sin x \end{aligned}

    Compare eαxQn(x)=2xsinxe^{\alpha x}Q_n(x)=2x\sin x,

    α=1=m1m2\alpha=1=m_1\neq m_2

    Let

    Yp=(Ax2+Bx)eix,yp=ImYpYp=(2Ax+B)eix+i(Ax2+Bx)eixYp=(2A)eix+i(2Ax+B)eix+i(2Ax+B)eix+i2(Ax2+Bx)eix=(2A)eix+2i(2Ax+B)eix(Ax2+Bx)eix\begin{aligned} Y_p&=(Ax^2+Bx)e^{ix}, \qquad y_p=\text{Im}Y_p \\ Y'_p&=(2Ax+B)e^{ix}+i(Ax^2+Bx)e^{ix} \\ Y''_p&=(2A)e^{ix}+i(2Ax+B)e^{ix}+i(2Ax+B)e^{ix}+i^2(Ax^2+Bx)e^{ix} \\ &=(2A)e^{ix}+2i(2Ax+B)e^{ix}-(Ax^2+Bx)e^{ix} \end{aligned}[(2Aeix)+2i(2Ax+B)eix(Ax+B)eix]+(Ax+B)eix=2xeix2A+4Aix+2Bi=2x(4Ai)x+(2A+2Bi)=2x\begin{aligned} \left[(2Ae^{ix})+2i(2Ax+B)e^{ix}-(Ax+B)e^{ix}\right]+(Ax+B)e^{ix}&=2xe^{ix} \\ 2A+4Aix+2Bi&=2x \\ (4Ai)x+(2A+2Bi)&=2x \end{aligned}

    Thus

    4Ai=2(2A+2Bi)=0A=12i=12iB=Ai=(12i)i=12\begin{aligned} 4Ai&=2 \qquad &(2A+2Bi)&=0 \\ A&=\frac{1}{2i}=-\frac{1}{2}i &B&=-\frac{A}{i}=-\frac{(\frac{1}{2}i)}{i}=\frac{1}{2} \end{aligned}

    Into equation

    Yp=(12ix2+12x)eix=(12ix2+12x)(cosx+isinx)=12ix2cosx+12x2sinx+12xcosx+12ixsinx=(12x2sinx+12xcosx)+i(12x2cosx+12xsinx)yp=ImYp=12x2cosx+12xsinx\begin{aligned} Y_p&=\left(-\frac{1}{2}ix^2+\frac{1}{2}x\right)e^{ix} \\ &=\left(-\frac{1}{2}ix^2+\frac{1}{2}x\right)(\cos x+i\sin x) \\ &=-\frac{1}{2}ix^2\cos x+\frac{1}{2}x^2\sin x+\frac{1}{2}x\cos x+\frac{1}{2} ix \sin x \\ &=\left(\frac{1}{2}x^2\sin x+\frac{1}{2}x\cos x\right)+i\left(-\frac{1}{2}x^2\cos x+\frac{1}{2}x \sin x\right) \\ \\ y_p&=\text{Im}Y_p \\ &=-\frac{1}{2}x^2\cos x+\frac{1}{2}x\sin x \end{aligned}y=C1cosx+C2sinx12x2cosx+12xsinx\therefore y=C_1\cos x+C_2\sin x-\frac{1}{2}x^2\cos x+\frac{1}{2}x\sin x

    c. y+2y+2y=exsinxy''+2y'+2y=e^x\sin x

    Solution
    m2+2m+2=0m=12[2±48]12[1±2i]1±iyc=ex(C1cosx+C2sinx)\begin{aligned} m^2+2m+2&=0\\ m&=\frac{1}{2}[-2\pm\sqrt{4-8}]\\ \frac{1}{2}[-1\pm 2i]\\ -1\pm i \\ \\ y_c&=e^{-x}(C_1\cos x+C_2\sin x) \end{aligned}g(x)=exsinx=Im(exeix)=Im(e(1+i)x)α=1+im1m2yp=ImAe(1+i)x\begin{aligned} g(x)&=e^x\sin x \\ &=\text{Im}(e^xe^{ix})\\ &=\text{Im}(e^{(1+i)x}) \\ \\ \alpha&=1+i\neq m_1\neq m_2 \\ y_p=\text{Im}Ae^{(1+i)x} \end{aligned}

    Let

    Yp=Ae(1+i)xYp=(1+i)Ae(1+i)xYp=2iAe(1+i)x\begin{aligned} Y_p&=Ae^{(1+i)x} \\ Y'_p&=(1+i)Ae^{(1+i)x} \\ Y''_p&=2iAe^{(1+i)x} \end{aligned}

    Into equation

    2iAe(1+i)x+2[(1+i)Ae(1+i)x]+2[Ae(1+i)x]=e(1+i)x(2i+2+2i+2)Ae(1+i)x=e(1+i)x4(1+i)Ae(1+i)x=Ime(1+i)xA=14(1+i)=18(1i)\begin{aligned} 2iAe^{(1+i)x}+2\left[(1+i)Ae^{(1+i)x}\right]+2\left[Ae^{(1+i)x}\right] &=e^{(1+i)x} \\ (2i+2+2i+2)Ae^{(1+i)x}&= e^{(1+i)x}\\ 4(1+i)Ae^{(1+i)x} &=\text{Im}e^{(1+i)x} \\ A&=\frac{1}{4(1+i)}=\frac{1}{8}(1-i) \end{aligned}

    Thus

    Yp=18(1i)e(1+i)x=18(1i)ex[cosx+isinx]=18ex[cosx+isinxicosx+sinx]=18ex[(cosx+sinx)+i(cosx+sinx)]yp=ImYp=18ex(cosx+sinx)\begin{aligned} Y_p&=\frac{1}{8}(1-i)e^{(1+i)x} \\ &=\frac{1}{8}(1-i)e^x[\cos x+i\sin x] \\ &=\frac{1}{8}e^x[\cos x+i\sin x-i\cos x+\sin x] \\ &=\frac{1}{8}e^x[(\cos x+\sin x)+i(\cos x+\sin x)] \\ \\ y_p&=\text{Im}Y_p=\frac{1}{8}e^x(-\cos x+\sin x) \end{aligned}y=ex(C1cosx+C2sinx)+18ex(sinxcosx)\therefore y=e^{-x}(C_1\cos x+C_2\sin x)+\frac{1}{8}e^x(\sin x-\cos x)

    d. y3y+2y=x2e3xy''-3y'+2y=x^2e^{3x}

    Solution
    m23m+2=0(m1)(m2)=0m=1,2yc=C1ex+C2e2x\begin{aligned} m^2-3m+2&=0\\ (m-1)(m-2)&=0\\ m&=1,2\\ \\ y_c&=C_1e^x+C_2e^{2x} \end{aligned}g(x)=x2e3x=Pn(x)eαxα=3m1m2Pn=x2\begin{aligned} g(x)&=x^2e^{3x}=P_n(x)e^{\alpha x} \\ \alpha&=3\neq m_1\neq m_2 \\ \\ P_n&=x^2 \end{aligned}

    Thus

    yp=e3x(Ax2+Bx+C)y_p=e^{3x}(Ax^2+Bx+C)yp=3e3x(Ax2+Bx+C)+e3x(2Ax+B)=e3x(3Ax2+3Bx+3C+2Ax+B)=e3x[(3A)x2+(3B+2A)x+(3C+B)]yp=3e3x[3Ax2+(3B+2A)x+(3C+B)]+e3x[6Ax2+(3B+2A)]=e3x[9Ax2+(9B+6A)x+(6C+3B)]+e3x[6Ax2+(3B+2A)]=e3x[9Ax2+(12A+9B)x+(2A+6B+9C)]\begin{aligned} y'_p&=3e^{3x}(Ax^2+Bx+C)+e^{3x}(2Ax+B) \\ &=e^{3x}(3Ax^2+3Bx+3C+2Ax+B)\\ &=e^{3x}\left[(3A)x^2+(3B+2A)x+(3C+B)\right] \\ y''_p&=3e^{3x}[3Ax^2+(3B+2A)x+(3C+B)]+e^{3x}[6Ax^2+(3B+2A)]\\ &=e^{3x}[9Ax^2+(9B+6A)x+(6C+3B)]+e^{3x}[6Ax^2+(3B+2A)] \\ &=e^{3x}[9Ax^2+(12A+9B)x+(2A+6B+9C)] \end{aligned}

    Into equation

    e3x[9Ax2+(12A+9B)x+(2A+6B+9C)]3ex[3Ax2+(3B+2A)x+(3C+B)]+2ex(Ax2+Bx+C)=x2e3xe3x[(9A9A+2A)x2+(12A+9B9B6A+2B)x+(2A+6B+9C9C3B+2C)]=x2e3xe3x[(2A)x2+(16A+2B)x+(2A+3B+2C)]=x2e3x\begin{aligned} e^{3x}[9Ax^2+(12A+9B)x+(2A+6B+9C)]-3e^x[3Ax^2+(3B+2A)x+(3C+B)]+2e^x(Ax^2+Bx+C)&=x^2e^{3x}\\ e^{3x}[(9A-9A+2A)x^2+(12A+9B-9B-6A+2B)x+(2A+6B+9C-9C-3B+2C)]&=x^2e^{3x}\\ e^{3x}[(2A)x^2+(16A+2B)x+(2A+3B+2C)]&=x^2e^{3x} \end{aligned}

    Thus

    2A=16A+2B=02A+3B+2C=0A=122B=6(122C=2(1)3(32)B=32C=12(72)=74\begin{aligned} 2A&=1 \qquad &6A+2B&=0 \qquad &2A+3B+2C&=0 \\ A&=\frac{1}{2} \qquad &2B&=-6(\frac{1}{2} \qquad &2C&=-2(1)-3(-\frac{3}{2}) \\ &&B&=-\frac{3}{2} \qquad &C&=\frac{1}{2}(\frac{7}{2})=\frac{7}{4} \end{aligned}

    Thus

    y+p=e3x(12x232x+74)=14e3x(2x26x+7)\begin{aligned} y+p&=e^{3x}\left(\frac{1}{2}x^2-\frac{3}{2}x+\frac{7}{4}\right) \\ &=\frac{1}{4}e^{3x}(2x^2-6x+7) \end{aligned}y=C1ex+C2ex+14e3x(2x26x+7)\therefore y=C_1e^x+C_2e^x+\frac{1}{4}e^{3x}(2x^2-6x+7)
  7. Solve the following nonhomogeneous with initial value using the method of undetermined coefficients.

    a. 5y+y=6xy(0)=0y(0)=05y''+y'=-6x \qquad\qquad y(0)=0 \qquad y'(0)=0

    Solution
    5m2+m=0m(5m+1)=0m=0,15α=0=m1m2\begin{aligned} 5m^2+m&=0\\ m(5m+1)&=0\\ m&=0,-\frac{1}{5}\\ \\ \alpha&=0=m_1 \neq m_2 \end{aligned}

    Thus

    yp=x(Ax+B)e0=Ax2+Bxyp=2Ax+Byp=2A\begin{aligned} y_p&=x(Ax+B)e^0\\ &=Ax^2+Bx \\ y'_p&=2Ax+B\\ y''_p&=2A \end{aligned}

    Into formula

    5(2A)+(2Ax+B)=6x(10A+B)+2Ax=6x\begin{aligned} 5(2A)+(2Ax+B)&=-6x \\ (10A+B)+2Ax&=-6x \end{aligned}

    Thus

    A=3,B=30A=-3,\qquad B=30yp=3x2+30x\Rightarrow y_p=-3x^2+30x

    General solution:

    y=C1e0+C2e15x+30x30x2y=15C2e15x+3060x\begin{aligned} y&=C_1e^0+C_2e^{-\frac{1}{5}x}+30x-30x^2 \\ y'&=-\frac{1}{5}C_2e^{-\frac{1}{5}x}+30-60x \end{aligned}y(0)=0C1+C2=0C1=C2y(0)=0 \qquad \Rightarrow \qquad C_1+C_2=0 \quad \rightarrow \quad C_1=-C_2y(0)=015C2+30=0C2=150y'(0)=0 \qquad \Rightarrow \qquad -\frac{1}{5}C_2+30=0 \quad \rightarrow \quad C_2=150y=150+150ex530x2+30x\therefore y=-150+150e^{-\frac{x}{5}}-30x^2+30x

    b. y+4y+5y=35e4xy(0)=3y(0)=1y''+4y'+5y=35e^{-4x} \qquad\qquad y(0)=-3 \qquad y'(0)=1

    Solution
    m2+4m+5=0m=12[4±1620]=12[4±2i]=2±iα=4m1m2yc=e2x(C1cosx+C2sinx)\begin{aligned} m^2+4m+5&=0\\ m&=\frac{1}{2}\left[-4\pm\sqrt{16-20}\right] \\ &=-\frac{1}{2}[-4\pm 2i] \\ &=-2\pm i \\ \\ \alpha&=-4\neq m_1\neq m_2 \\ y_c&=e^{-2x}(C_1\cos x+C_2\sin x) \end{aligned}yp=Ae4xyp=4Ae4xyp=16Ae4x\begin{aligned} y_p&=Ae^{-4x} \\ y'_p&=-4Ae^{-4x} \\ y''_p&=16Ae^{-4x} \end{aligned}

    Into equation

    (16Ae4x)+4(4Ae4x)+5(Ae4x)=35e4x5Ae4x=35e4xA=7\begin{aligned} (16Ae^{-4x})+4(-4Ae^{-4x})+5(Ae^{-4x})&=35e^{-4x} \\ 5Ae^{-4x}&=35e^{-4x} \\ A&=7 \end{aligned}

    General Solution

    y=C1e2xcosx+C2e2xsinx+7e2xy=C_1e^{-2x}\cos x+C_2e^{-2x}\sin x+7e^{-2x}

    When

    x=0,y=33=C1+7C1=10x=0, y=-3 \qquad \Rightarrow \qquad -3=C_1+7 \quad \rightarrow \quad C_1=-10x=0,y=11=2C1e2xcosxC1e2xsinx2C2e2xsinx+C2e2xcosx28e4x1=2C1+C228C2=9\begin{aligned} x=0, y'=1 \qquad \Rightarrow \qquad 1&=-2C_1e^{-2x}\cos x-C_1e^{-2x}\sin x-2C_2e^{-2x}\sin x+C_2e^{-2x}\cos x-28e^{-4x}\\ 1&=-2C_1+C_2-28 \\ C_2&=9 \end{aligned}y=10e2xcosx+9e2xsinx+7e4x\therefore y=-10e^{-2x}\cos x+9e^{-2x}\sin x+7e^{-4x}

    c. y+25y=5xy(0)=5y(0)=4.8y''+25y=5x \qquad\qquad y(0)=5 \qquad y'(0)=-4.8

    Solution
    m2+25=0m=±5iyc=C1e5ix+C2e5ix=A1cos5x+A2sin5xα=0m1m2\begin{aligned} m^2+25&=0\\ m&=\pm 5i \\ \\ y_c&=C_1e^{5ix}+C_2e^{5ix}\\ &=A_1\cos 5x+A_2\sin5x\\ \alpha&=0\neq m_1\neq m_2 \end{aligned}yp=B1x+B2yp=Byp=0(0)+25(B1x+B2)=5x25B1x+25B2=5xB1=15,B2=0\begin{aligned} y_p&=B_1x+B_2\\ y_p'&=B\\ y_p''&=0 \\ \Rightarrow (0)+25(B_1x+B_2)&=5x\\ 25B_1x+25B_2&=5x\\ B_1=\frac{1}{5} &, B_2=0 \end{aligned}yp=15xy_p=\frac{1}{5}x

    When

    x=0,y=55=A1cos5x+A2sin5x+15x5=A1x=0,y=4.848=5A1sin5x+5A2cos5x+154.8=5A2+0.2A2=1\begin{aligned} x=0,y=5 \qquad 5&=A_1\cos 5x+A_2\sin 5x +\frac{1}{5}x \\ 5&=A_1 \\ \\ x=0, y'=-4.8 \qquad -48&=-5A_1\sin 5x+5A_2\cos 5x+\frac{1}{5} \\ -4.8&=5A_2+0.2 \\ A_2&=-1 \end{aligned}y=5cos5xsin5x+15x\therefore y=5\cos 5x-\sin 5x+\frac{1}{5}x

    d. y2y+y=2x28x+4y(0)=0.3y(0)=0.3y''-2y'+y=2x^2-8x+4 \qquad\qquad y(0)=0.3 \qquad y'(0)=0.3

    Solution
    m22m+1=0(m1)2=0m=1yc=C1ex+C2xex\begin{aligned} m^2-2m+1&=0\\ (m-1)^2&=0\\ m&=1\\ y_c&=C_1e^x+C_2xe^x \end{aligned}yp=Ax2+Bx+4yp=2Ax+Byp=2A\begin{aligned} y_p&=Ax^2+Bx+4 \\ y'_p&=2Ax+B \\ y''_p&=2A \end{aligned}

    Into formula

    (2A)2(2Ax+B)+(Ax2+Bx+C)=2x28x+4Ax2+(4A+B)x+(2A2B+C)=2x28x+4\begin{aligned} (2A)-2(2Ax+B)+(Ax^2+Bx+C)&=2x^2-8x+4\\ Ax^2+(-4A+B)x+(2A-2B+C)&=2x^2-8x+4 \end{aligned}

    thus

    A=24A+B=82A2B+C=4B=0C=0\begin{aligned} A&=2 \qquad &-4A+B &=-8 \qquad &2A-2B+C&=4 \\ &&B&=0 &C&=0 \end{aligned}yp=2x2y_p=2x^2y=C1ex+C2xex+2x2y=C1ex+C2ex+C2xex+4x\begin{aligned} y&=C_1e^x+C_2xe^x+2x^2\\y'&=C_1e^x+C_2e^x+C_2xe^x+4x \end{aligned}

    When

    x=0,y=0.30.3=C1+0+0C1=0.3x=0,y=0.30.3=C1+C2+0+0C1+C2=0.3C2=0\begin{aligned} x=0, y=0.3 \qquad 0.3&=C_1+0+0 \\ C_1&=0.3\\ x=0, y'=0.3 \qquad 0.3&=C_1+C_2+0+0\\ C_1+C_2&=0.3 \\ C_2&=0 \end{aligned}y=0.3ex+2x2\therefore y=0.3e^x+2x^2

    e. yy2y=3e2xy(1)=e1y(1)=e1+e2y''-y'-2y=3e^{2x} \qquad\qquad y(1)=e^{-1} \qquad y'(1)=-e^{-1}+e^2

    Solution
    m2m2=0(m2)(m+1)=0m=2,1yp=C1e2x+C2exα=2=m1m2\begin{aligned} m^2-m-2&=0\\ (m-2)(m+1)&=0\\ m&=2,-1\\ \\ y_p&=C_1e^{2x}+C_2e^{-x}\\ \alpha&=2=m_1\neq m_2 \end{aligned}yp=Axe2xyp=2Axe2x+Ae2xyp=4Axe2x+2Ae2x+2Ae2x=4Axe2x+4Ae2x\begin{aligned} y_p&=Axe^{2x}\\ y'_p&=2Axe^{2x}+Ae^{2x}\\ y''_p&=4Axe^{2x}+2Ae^{2x}+2Ae^{2x}\\ &=4Axe^{2x}+4Ae^{2x} \end{aligned}

    Into formula

    (4Axe2x+4Ae2x)(2Axe2x+Ae2x)2(Axe2x)=3e2x(4A2A2A)xe2x+(4AA)e2x=3e2x3A=3A=1\begin{aligned} (4Axe^{2x}+4Ae^{2x})-(2Axe^{2x}+Ae^{2x})-2(Axe^{2x})&=3e^{2x} \\ (4A-2A-2A)xe^{2x}+(4A-A)e^{2x}&=3e^{2x} \\ 3A&=3\\ A&=1 \end{aligned}y=C1e2x+C2ex+xe2xy=2C1e2xC2ex+2xe2x+e2x\begin{aligned} y=C_1e^{2x}+C_2e^{-x}+xe^{2x} \\ y'&=2C_1e^{2x}-C_2e^{-x}+2xe^{2x}+e^{2x} \end{aligned}

    When

    x=1,y=C1e2C2e1+e2=e1C1e2+C2e1=e1e2(1)\begin{aligned} x=1, \qquad y=C_1e^2C_2e^{-1}+e^2&=e^{-1} \\ C_1e^2+C_2e^{-1}&=e^{-1}-e^2 \tag{1} \end{aligned}x=1,y=C1e2C2e1+e2=e1C1e2+C2e1=e1e2(1)\begin{aligned} x=1, \qquad y=C_1e^2C_2e^{-1}+e^2&=e^{-1} \\ C_1e^2+C_2e^{-1}&=e^{-1}-e^2 \tag{1} \end{aligned}x=1,y=2C1e2C2e1+2e2+e2=e1+e22C1e2C2e1=e12e2(2)\begin{aligned} x=1, \qquad y'=2C_1e^2-C_2e^{-1}+2e^2+e^2&=-e^{-1}+e^2\\ 2C_1e^2-C_2e^{-1}&=-e^{-1}-2e^2 \tag{2} \end{aligned}

    (1)+(2)(1)+(2),

    3C1e2=3e2C1=1\begin{aligned} 3C_1e^2&=-3e&2\\ C_1&=-1 \end{aligned}

    Into (1)(1),

    e2+C2e1=e1e2C2e1=e1C2=1\begin{aligned} -e^2+C_2e^{-1}&=e^{-1}-e^2 \\ C_2e^{-1}&=e^{-1}\\ C_2&=1 \end{aligned}y=e2x+ex+xe2x\therefore y=-e^{2x}+e^{-x}+xe^{2x}
  8. Obtain a general solution using the method of variation of parameter.

    a. y4y+4y=e2x/xy''-4y'+4y=e^{2x}/x

    Solution
    m24m+4=0(m2)2=0m=2yc=C1e2x+C2xe2x\begin{aligned} m^2-4m+4&=0\\ (m-2)^2&=0\\m&=2\\ \\ y_c&=C_1e^{2x}+C_2xe^{2x} \end{aligned}y1=e2x,y1=2e2xy2=xe2x,y2=2xe2x+e2x\begin{aligned} y_1&=e^{2x} \qquad, \qquad &y'_1&=2e^{2x} \\ y_2&=xe^{2x} \qquad, \qquad &y'_2&=2xe^{2x}+e^{2x} \end{aligned}W(y1,y2)=e2xxe2x2e2x2xe2x+e2x=2xe4x+e4x2xe4x=e4x\begin{aligned} W(y_1,y_2)&=\left\vert \begin{array}{cc} e^{2x} & xe^{2x} \\ 2e^{2x} & 2xe^{2x}+e^{2x} \end{array}\right\vert \\ &=2xe^{4x}+e^{4x}-2xe^{4x}\\ &=e^{4x} \end{aligned}U1(x)=(e2xx)(xe2x)e4xdx=dx=xU2(x)=(e2xx)(e2x)e4xdx=1xdx=lnx\begin{aligned} U_1(x)=-\int\frac{\left(\frac{e^{2x}}{x}\right)(xe^{2x})}{e^{4x}}dx\\ &=-\int dx &=-x U_2(x)=-\int\frac{\left(\frac{e^{2x}}{x}\right)(e^{2x})}{e^{4x}}dx\\ &=-\int \frac{1}{x} dx\\ &=\ln x \end{aligned}yp=(x)(e2x)+(lnx)(xe2x)=xe2x+xe2xlnx\begin{aligned} y_p&=(-x)(e^{2x})+(\ln x)(xe^{2x}) \\ &=-xe^{2x}+xe^{2x}\ln x \end{aligned}y=C1e2x+C2xe2xxe2x+xe2xlnx=C1e2x+(C21)xe2x+xe2xlnx=C1e2x+C3xe2x+xe2xlnx\begin{aligned} \therefore y&=C_1e^{2x}+C_2xe^{2x}-xe^{2x}+xe^{2x}\ln x \\ &=C_1e^{2x}+(C_2-1)xe^{2x}+xe^{2x}\ln x \\ &=C_1e^{2x}+C_3xe^{2x}+xe^{2x}\ln x \end{aligned}

    where C3=C21C_3=C_2-1

    b. y+2y+y=x3/2/exy''+2y'+y=x^{3/2}/e^x

    Solution
    m2+2m+1=0(m+1)(m+1)=0m=1yc=C1ex+C2xex\begin{aligned} m^2+2m+1&=0\\ (m+1)(m+1)&=0\\ m&=-1\\ \\ y_c&=C_1e^{-x}+C_2xe^{-x} \end{aligned}y1=ex,y1=exy2=xex,y2=xex+ex\begin{aligned} y_1&=e^{-x} \qquad, \qquad &y'_1&=-e^{-x} \\ y_2&=xe^{-x} \qquad, \qquad &y'_2&=-xe^{-x}+e^{-x} \end{aligned}W(y1,y2)=exxexexxex+ex=xe2x+e2x+xe2x=e2x\begin{aligned} W(y_1,y_2)&=\left\vert \begin{array}{cc} e^{-x} & xe^{-x} \\ -e^{-x} & -xe^{-x}+e^{-x} \end{array}\right\vert \\ &=-xe^{-2x}+e^{-2x}+xe^{-2x} \\ &=e^{-2x} \end{aligned}U1(x)=(x32ex)(xex)e2xdx=x52dx=27x72U2(x)=(x32ex)(ex)e2xdx=x32dx=25x52\begin{aligned} U_1(x)=-\int\frac{\left(\frac{x^{\frac{3}{2}}}{e^x}\right)(xe^{-x})}{e^{-2x}} dx \\ &=-\int x^{\frac{5}{2}} dx \\ &=-\frac{2}{7}x^{\frac{7}{2}} \\ U_2(x)=-\int\frac{\left(\frac{x^{\frac{3}{2}}}{e^x}\right)(e^{-x})}{e^{-2x}}dx\\ &=\int x^{\frac{3}{2}} dx \\ &=-\frac{2}{5}x^{\frac{5}{2}} \\ \end{aligned}yp=(27x72)(ex)+(25x52xex)=(1035+1435)x72ex=435x72ex\begin{aligned} y_p&=\left(-\frac{2}{7}x^{\frac{7}{2}}\right)(e^{-x})+\left(\frac{2}{5}x^{\frac{5}{2}}xe^{-x}\right) \\ &=\left(-\frac{10}{35}+\frac{14}{35}\right)x^{\frac{7}{2}}e^{-x} \\ &=\frac{4}{35}x^{\frac{7}{2}}e^{-x} \end{aligned}C1ex+C2xex+435x72ex\therefore C_1e^{-x}+C_2xe^{-x}+\frac{4}{35}x^{\frac{7}{2}}e^{-x}

    c. y2y+y=exsinxy''-2y'+y=e^x\sin x

    Solution
    m22m+1=0(m1)2=0m=1yc=C1ex+C2xex\begin{aligned} m^2-2m+1&=0\\ (m-1)^2&=0\\ m&=1\\ \\ y_c&=C_1e^x+C_2xe^x \end{aligned}y1=ex,y1=exy2=xex,y2=xex+ex\begin{aligned} y_1&=e^x \qquad , \qquad &y'_1=&e^x \\ y_2&=xe^x \qquad , \qquad &y'_2&=xe^x+e^x \end{aligned}W(y1,y2)=exxexexxex+ex=xe2x+e2xxe2x=e2x\begin{aligned} W(y_1,y_2)&=\left\vert \begin{array}{cc} e^x&xe^x\\e^x&xe^x+e^x \end{array}\right\vert \\ &=xe^{2x}+e^{2x}-xe^{2x} \\ &=e^{2x} \end{aligned}U1(x)=(exsinx)(xex)e2xdx=xsinxdx=xcosxsinxU2(x)=(exsinx)(ex)e2xdx=sinxdx=cosx\begin{aligned} U_1(x)&=-\int \frac{(e^x\sin x)(xe^x)}{e^{2x}} dx \\ &=-\int x\sin x dx \\ &=x\cos x - \sin x \\ U_2(x)&=-\int \frac{(e^x\sin x)(e^x)}{e^{2x}} dx \\ &=-\int \sin x dx \\ &=-\cos x \end{aligned}yp=(xcosxsinx)ex+(cosx)xex=xexcosxexsinxxexcosx=exsinx\begin{aligned} y_p=(x\cos x-\sin x)e^x+(-\cos x)xe^x \\ &=xe^x\cos x-e^x\sin x - xe^x\cos x \\ &=-e^x\sin x \end{aligned}y=C1ex+C2xexexsinx\therefore y=C_1e^x+C_2xe^x-e^x\sin x

    d. y+2y+2y=exsecxy''+2y'+2y=e^{-x}\sec x

    Solution
    m2+2m+2=0m=12[2±44(1)(2)]=12[2±2i]=1±iyc=ex(C1cosx+C2sinx)\begin{aligned} m^2+2m+2&=0 \\ m&=\frac{1}{2}[-2\pm\sqrt{4-4(1)(2)}] \\ &=\frac{1}{2}[-2\pm 2i] \\ &=-1\pm i \\ \\ y_c&=e^{-x}(C_1\cos x+C_2\sin x) \end{aligned}y1=excosx,y1=excosxexsinxy2=exsinx,y1=exsinx+excosx\begin{aligned} y_1&=e^{-x}\cos x \qquad , \qquad &y'_1&=-e^{-x}\cos x-e^{-x}\sin x \\ y_2&=e^{-x}\sin x \qquad , \qquad &y'_1&=-e^{-x}\sin x+e^{-x}\cos x \end{aligned}W(y1,y2)=excosxexsinxexcosxexsinxexsinx+excosx=e2xsinxcosx+e2xcos2x+e2xsinxcosx+e2xsin2x=e2x(cos2x+sin2x)=e2x\begin{aligned} W(y_1,y_2)&=\left\vert \begin{array}{cc} e^{-x}\cos x & e^{-x}\sin x \\ -e^{-x}\cos x-e^{-x}\sin x & -e^{-x}\sin x+e^{-x}\cos x \end{array}\right\vert \\ &=-e^{-2x}\sin x\cos x +e^{-2x}\cos^2 x + e^{-2x}\sin x\cos x+e^{-2x} \sin^2 x \\ &=e^{-2x} (\cos^2 x+\sin^2 x) \\ &=e^{-2x} \end{aligned}U1(x)=(exsecx)(exsinx)e2xdx=sinxcosxdx=lncosxU2(x)=(exsecx)(excosx)e2xdx=dx=x\begin{aligned} U_1(x)&=-\int\frac{(e^{-x}\sec x)(e^{-x}\sin x)}{e^{-2x}} dx \\ &=-\int \frac{\sin x}{\cos x} dx \\ &= \ln \vert\cos x\vert \\ U_2(x)&=-\int\frac{(e^{-x}\sec x)(e^{-x}\cos x)}{e^{-2x}} dx \\ &=-\int dx \\ &= x \end{aligned}yp=excosxlncosx+exsinxxy_p=e^{-x}\cos x \ln \vert \cos x \vert + e^{-x}\sin x \cdot xy=ex(C1cosx+C2sinx)+excosxlncosx+xexsinx\therefore y=e^{-x}(C_1\cos x+C_2\sin x)+e^{-x}\cos x \ln \vert \cos x \vert + xe^{-x}\sin x

    e. y4y+4y=(x+1)e2xy''-4y'+4y=(x+1)e^{2x}

    Solution
    m24m+4=0(m2)(m2)=0m=2yc=C1e2x+C2xe2x\begin{aligned} m^2-4m+4&=0 \\ (m-2)(m-2)&=0 \\ m&=2 \\ \\ y_c&=C_1e^{2x}+C_2xe^{2x} \end{aligned}y1=e2x,y1=2e2xy2=xe2x,y2=2xe2x+e2x\begin{aligned} y_1 &=e^{2x} \qquad , \qquad &y'_1&=2e^{2x} \\ y_2&=xe^{2x} \qquad , \qquad &y'_2&=2xe^{2x}+e^{2x} \end{aligned}W(y1,y2)=e2xxe2x2e2x2xe2x+e2x=2xe4x+e4x2xe4x=e4x\begin{aligned} W(y_1,y_2)&=\left\vert \begin{array}{cc} e^{2x} & xe^{2x} \\ 2e^{2x} & 2xe^{2x}+e^{2x} \end{array}\right\vert \\ &= 2xe^{4x}+e^{4x}-2xe^{4x} \\ &=e^{4x} \end{aligned}U1(x)=(x+1)e2xxe2xe4xdx=x2+xdx=13x312x2U2(x)=(x+1)e2xe2xe4xdx=x+1dx=12x2+x\begin{aligned} U_1(x)=-\int \frac{(x+1)e^{2x}\cdot xe^{2x}}{e^{4x}} dx \\ &=-\int x^2+x dx \\ &=-\frac{1}{3}x^3 - \frac{1}{2} x^2 \\ U_2(x)=-\int \frac{(x+1)e^{2x}\cdot e^{2x}}{e^{4x}} dx \\ &=-\int x+1 dx \\ &=\frac{1}{2}x^2 +x \end{aligned}yp=(13x312x2)(e2x)+(12x2+x)(xe2x)=13x3e2x12x2e2x+12x3e2x+x2e2x=16x3e2x+12x2e2x\begin{aligned} y_p&=\left(-\frac{1}{3}x^3-\frac{1}{2}x^2\right)(e^{2x})+\left(\frac{1}{2}x^2+x\right)(xe^{2x}) \\ &=-\frac{1}{3}x^3e^{2x}-\frac{1}{2}x^2e^{2x}+\frac{1}{2}x^3e^{2x}+x^2e^{2x} \\ &=\frac{1}{6}x^3e^{2x}+\frac{1}{2}x^2e^{2x} \end{aligned}y=C1e2x+C2xe2x+16x3e2x+12x2e2x\therefore y=C_1e^{2x} + C_2 xe^{2x} + \frac{1}{6}x^3e^{2x}+\frac{1}{2}x^2e^{2x}

    f. y5y+6y=2exy''-5y'+6y=2e^x

    Solution
    m2+2m+1=0(m+1)(m+1)=0m=1yc=C1ex+C2xex\begin{aligned} m^2+2m+1&=0\\ (m+1)(m+1)&=0\\ m&=-1 \\ \\ y_c&=C_1e^{-x}+C_2xe^{-x} \end{aligned}y1=ex,y1=exy2=xex,y2=xex+ex\begin{aligned} y_1&=e^{-x} \qquad , \qquad &y'_1&=-e^{-x} \\ y_2&=xe^{-x} \qquad , \qquad &y'_2&=-xe^{-x}+e^{-x} \end{aligned}W(y1,y2)=exxexexxex+ex=xe2x+e2x+xe2x=e2x\begin{aligned} W(y_1,y_2)&=\left\vert \begin{array}{cc} e^{-x} & xe^{-x} \\ -e^{-x} & -xe^{-x}+e^{-x} \end{array}\right\vert \\ &=-xe^{-2x}+e^{-2x}+xe^{-2x} \\ &=e^{-2x} \end{aligned}U1(x)=(4ex)(xex)e2xdx=4xdx=2x2U2(x)=(4ex)(ex)e2xdx=4dx=4x\begin{aligned} U_1(x)&=-\int \frac{(4e^{-x})(xe^{-x})}{e^{-2x}} dx \\ &=-\int 4x dx \\ &=-2x^2 \\ U_2(x)&=-\int \frac{(4e^{-x})(e^{-x})}{e^{-2x}} dx \\ &=-\int 4 dx \\ &=4x \end{aligned}yp=(2x2)(ex)+(4x)(xex)=2x2ex+4x2ex=2x2ex\begin{aligned} y_p&=(-2x^2)(e^{-x})+(4x)(xe^{-x}) \\ &=-2x^2e^{-x}+4x^2e^{-x} \\ &=2x^2e^{-x} \end{aligned}y=C1ex+C2xex+2x2ex\therefore y=C_1e^{-x}+C_2xe^{-x}+2x^2e^{-x}

    g. y+2y+y=4exy''+2y'+y=4e^{-x}

    Solution
    m25m+6=0(m3)(m2)=0m=2,3yc=C1e2x+C2e3x\begin{aligned} m^2-5m+6&=0\\ (m-3)(m-2)&=0\\m&=2,3 \\ \\ y_c&=C_1e^{2x}+C_2e^{3x} \end{aligned}y1=e2x,y1=2e2xy2=e3x,y2=3e3x\begin{aligned} y_1=e^{2x} \qquad , \qquad &y'_1&=2e^{2x} \\ y_2=e^{3x} \qquad , \qquad &y'_2&=3e^{3x} \end{aligned}W(y1,y2)=e2xe3x2e2x3e3x=3e5x2e5x=e5x\begin{aligned} W(y_1,y_2)&=\left\vert \begin{array}{cc} e^{2x} & e^{3x} \\ 2e^{2x} & 3e^{3x} \end{array}\right\vert \\ &= 3e^{5x}-2e^{5x} \\ &=e^{5x} \end{aligned}U1(x)=(2ex)(e3x)e5xdx=2exdx=2exU2(x)=(2ex)(e2x)e5xdx=2e2xdx=e2x\begin{aligned} U_1(x) &= -\int\frac{(2e^x)(e^{3x})}{e^{5x}} dx \\ &=-\int 2 e^{-x} dx \\ &=2e^{-x} \\ U_2(x) &= -\int\frac{(2e^x)(e^{2x})}{e^{5x}} dx \\ &=\int 2 e^{-2x} dx \\ &=-e^{-2x} \end{aligned}yp=(2ex)(e2x)+(e2x)(e3x)=2exex=ex\begin{aligned} y_p&=(2e^{-x})(e^{2x})+(-e^{-2x})(e^{3x}) \\ &=2e^x-e^x \\ &=e^x \end{aligned}y=C1e2x+C2e3x+ex\therefore y = C_1e^{2x}+C_2e^{3x}+e^x