$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# 5.5E: The Method of Undetermined Coefficients II (Exercises)

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

In Exercises [exer:5.5.1} –[exer:5.5.17} find a particular solution.

[exer:5.5.1] $$y''+3y'+2y=7\cos x-\sin x$$

[exer:5.5.2] $$y''+3y'+y=(2-6x)\cos x-9\sin x$$

[exer:5.5.3] $$y''+2y'+y=e^x(6\cos x+17\sin x)$$

[exer:5.5.4] $$y''+3y'-2y=-e^{2x}(5\cos2x+9\sin2x)$$

[exer:5.5.5] $$y''-y'+y=e^x(2+x)\sin x$$

[exer:5.5.6] $$y''+3y'-2y=e^{-2x}\left[(4+20x)\cos 3x+(26-32x)\sin 3x\right]$$

[exer:5.5.7] $$y''+4y=-12\cos2x-4\sin2x$$

[exer:5.5.8] $$y''+y=(-4+8x)\cos x+(8-4x)\sin x$$

[exer:5.5.9] $$4y''+y=-4\cos x/2-8x\sin x/2$$

[exer:5.5.10] $$y''+2y'+2y=e^{-x}(8\cos x-6\sin x)$$

[exer:5.5.11] $$y''-2y'+5y=e^x\left[(6+8x)\cos 2x+(6-8x)\sin2x\right]$$

[exer:5.5.12] $$y''+2y'+y=8x^2\cos x-4x\sin x$$

[exer:5.5.13] $$y''+3y'+2y=(12+20x+10x^2)\cos x+8x\sin x$$

[exer:5.5.14] $$y''+3y'+2y=(1-x-4x^2)\cos2x-(1+7x+2x^2)\sin2x$$

[exer:5.5.15] $$y''-5y'+6y=-e^x\left[(4+6x-x^2)\cos x-(2-4x+3x^2)\sin x\right]$$

[exer:5.5.16] $$y''-2y'+y=-e^x\left[(3+4x-x^2)\cos x+(3-4x-x^2)\sin x\right]$$

[exer:5.5.17] $$y''-2y'+2y=e^x\left[(2-2x-6x^2)\cos x+(2-10x+6x^2)\sin x\right]$$

[exer:5.5.18] $$y''+2y'+y=e^{-x}\left[(5-2x)\cos x-(3+3x)\sin x\right]$$

[exer:5.5.19] $$y''+9y=-6\cos 3x-12\sin 3x$$

[exer:5.5.20] $$y''+3y'+2y=(1-x-4x^2)\cos2x-(1+7x+2x^2)\sin2x$$

[exer:5.5.21] $$y''+4y'+3y=e^{-x}\left[(2+x+x^2)\cos x+(5+4x+2x^2)\sin x\right]$$

[exer:5.5.22] $$y''-7y'+6y=-e^x(17\cos x-7\sin x), \quad y(0)=4,\; y'(0)=2$$

[exer:5.5.23] $$y''-2y'+2y=-e^x(6\cos x+4\sin x), \quad y(0)=1,\; y'(0)=4$$

[exer:5.5.24] $$y''+6y'+10y=-40e^x\sin x, \quad y(0)=2,\quad y'(0)=-3$$

[exer:5.5.25] $$y''-6y'+10y=-e^{3x}(6\cos x+4\sin x), \quad y(0)=2,\quad y'(0)=7$$

[exer:5.5.26] $$y''-3y'+2y=e^{3x}\left[21\cos x-(11+10x)\sin x\right], \; y(0)=0, \quad y'(0)=6$$

[exer:5.5.27] $$y''-2y'-3y=4e^{3x}+e^x(\cos x-2\sin x)$$

[exer:5.5.28] $$y''+y=4\cos x-2\sin x+xe^x+e^{-x}$$

[exer:5.5.29] $$y''-3y'+2y=xe^x+2e^{2x}+\sin x$$

[exer:5.5.30] $$y''-2y'+2y=4xe^x\cos x+xe^{-x}+1+x^2$$

[exer:5.5.31] $$y''-4y'+4y=e^{2x}(1+x)+e^{2x}(\cos x-\sin x)+3e^{3x}+1+x$$

[exer:5.5.32] $$y''-4y'+4y=6e^{2x}+25\sin x, \quad y(0)=5,\; y'(0)=3$$

[exer:5.5.33] $$y''+4y=-e^{-2x}\left[(4-7x)\cos x+(2-4x)\sin x\right], \; y(0)=3, \quad y'(0)=1$$

[exer:5.5.34] $$y''+4y'+4y=2\cos2x+3\sin2x+e^{-x}, \quad y(0)=-1,\; y'(0)=2$$

[exer:5.5.35] $$y''+4y=e^x(11+15x)+8\cos2x-12\sin2x, \quad y(0)=3,\; y'(0)=5$$

[exer:5.5.36]

Verify that if

$y_p=A(x)\cos\omega x+B(x)\sin\omega x$

where $$A$$ and $$B$$ are twice differentiable, then

\begin{aligned} y_p'&=&(A'+\omega B)\cos\omega x+(B'-\omega A) \sin\omega x\mbox{ and}\\ y_p''&=&(A''+2\omega B'-\omega^2A)\cos\omega x +(B''-2\omega A'-\omega^2B)\sin\omega x.\end{aligned}

Use the results of

## a

to verify that

\begin{aligned} ay_p''+by_p'+cy_p&=&\left[(c-a\omega^2)A+b\omega B+2a\omega B'+bA'+aA''\right] \cos\omega x+\ \[5pt] && \left[-b\omega A+(c-a\omega^2)B-2a\omega A'+bB'+aB''\right]\sin\omega x.\end{aligned}

Use the results of

## a

to verify that

$y_p''+\omega^2 y_p=(A''+2\omega B')\cos\omega x+ (B''-2\omega A')\sin\omega x.$

Prove Theorem [thmtype:5.5.2}.

[exer:5.5.37] Let $$a$$, $$b$$, $$c$$, and $$\omega$$ be constants, with $$a\ne0$$ and $$\omega>0$$, and let

$P(x)=p_0+p_1x+\cdots+p_kx^k \mbox{\quad and \quad} Q(x)=q_0+q_1x+\cdots+q_kx^k,$

where at least one of the coefficients $$p_k$$, $$q_k$$ is nonzero, so $$k$$ is the larger of the degrees of $$P$$ and $$Q$$.

Show that if $$\cos\omega x$$ and $$\sin\omega x$$ are not solutions of the complementary equation

$ay''+by'+cy=0,$

then there are polynomials

$A(x)=A_0+A_1x+\cdots+A_kx^k \mbox{\quad and \quad} B(x)=B_0+B_1x+\cdots+B_kx^k \eqno{\rm (A)}$

such that

$\begin{array}{lcl} \quad (c-a\omega^2)A+b\omega B+2a\omega B'+bA'+aA''&=&P\phantom{.}\ \[5pt] -b\omega A+(c-a\omega^2)B-2a\omega A'+bB'+aB''&=&Q, \end{array}$

where $$(A_k,B_k)$$, $$(A_{k-1},B_{k-1})$$, …,$$(A_0,B_0)$$ can be computed successively by solving the systems

$\begin{array}{lcl} \phantom{-}(c-a\omega^2)A_k+b\omega B_k&=&p_k\phantom{.}\ \[5pt] -b\omega A_k+(c-a\omega^2)B_k&=&q_k, \end{array}$

and, if $$1\le r\le k$$,

$\begin{array}{lcl} \phantom{-}(c-a\omega^2)A_{k-r}+b\omega B_{k-r}&=&p_{k-r}+\cdots\phantom{.}\ \[5pt] -b\omega A_{k-r}+(c-a\omega^2)B_{k-r}&=&q_{k-r}+\cdots, \end{array}$

where the terms indicated by “$$\cdots$$” depend upon the previously computed coefficients with subscripts greater than $$k-r$$. Conclude from this and Exercise [exer:5.5.36}

## b

that

$y_p=A(x)\cos\omega x+B(x)\sin\omega x \eqno{\rm (B)}$

is a particular solution of

$ay''+by'+cy=P(x)\cos\omega x+Q(x)\sin\omega x.$

Conclude from Exercise [exer:5.5.36}

## c

that the equation

$a(y''+\omega^2 y)=P(x)\cos\omega x+Q(x)\sin\omega x \eqno{\rm (C)}$

does not have a solution of the form (B) with $$A$$ and $$B$$ as in (A). Then show that there are polynomials

$A(x)=A_0x+A_1x^2+\cdots+A_kx^{k+1}\mbox{\quad and \quad} B(x)=B_0x+B_1x^2+\cdots+B_kx^{k+1}$

such that

$\begin{array}{rcl} a(A''+2\omega B')&=&P\ \[5pt] a(B''-2\omega A')&=&Q, \end{array}$

where the pairs $$(A_k,B_k)$$, $$(A_{k-1},B_{k-1})$$, …, $$(A_0,B_0)$$ can be computed successively as follows:

\begin{aligned} A_k&=&-{q_k\over2a\omega(k+1)}\ \[5pt] B_k&=&\phantom{-}{p_k\over2a\omega(k+1)},\end{aligned}

and, if $$k\ge 1$$,

\begin{aligned} A_{k-j}&=&-{1\over2\omega} \left[{q_{k-j}\over a(k-j+1)}-(k-j+2)B_{k-j+1}\right]\ \[5pt] B_{k-j}&=&\phantom{-}{1\over2\omega} \left[{p_{k-j}\over a(k-j+1)}-(k-j+2)A_{k-j+1}\right]\end{aligned}

for $$1\le j\le k$$. Conclude that (B) with this choice of the polynomials $$A$$ and $$B$$ is a particular solution of (C).

[exer:5.5.38] Show that Theorem [thmtype:5.5.1} implies the next theorem: Suppose $$\omega$$ is a positive number and $$P$$ and $$Q$$ are polynomials. Let $$k$$ be the larger of the degrees of $$P$$ and $$Q$$. Then the equation

$ay''+by'+cy=e^{\lambda x}\left(P(x)\cos \omega x+Q(x)\sin \omega x\right)$

has a particular solution

$y_p=e^{\lambda x}\left(A(x)\cos\omega x+B(x)\sin\omega x\right), \eqno{\rm (A)}$

where

$A(x)=A_0+A_1x+\cdots+A_kx^k \mbox{\quad and \quad} B(x)=B_0+B_1x+\cdots+B_kx^k,$

provided that $$e^{\lambda x}\cos\omega x$$ and $$e^{\lambda x}\sin\omega x$$ are not solutions of the complementary equation. The equation

$a\left[y''-2\lambda y'+(\lambda^2+\omega^2)y\right]= e^{\lambda x}\left(P(x)\cos \omega x+Q(x)\sin \omega x\right)$

$$($$for which $$e^{\lambda x}\cos\omega x$$ and $$e^{\lambda x}\sin\omega x$$ are solutions of the complementary equation$$)$$ has a particular solution of the form (A), where

$A(x)=A_0x+A_1x^2+\cdots+A_kx^{k+1} \mbox{\quad and \quad} B(x)=B_0x+B_1x^2+\cdots+B_kx^{k+1}.$

[exer:5.5.39] This exercise presents a method for evaluating the integral

$y=\int e^{\lambda x}\left(P(x)\cos \omega x+Q(x)\sin \omega x\right)\,dx$

where $$\omega\ne0$$ and

$P(x)=p_0+p_1x+\cdots+p_kx^k,\quad Q(x)=q_0+q_1x+\cdots+q_kx^k.$

Show that $$y=e^{\lambda x}u$$, where

$u'+\lambda u=P(x)\cos \omega x+Q(x)\sin \omega x. \eqno{\rm (A)}$

Show that (A) has a particular solution of the form

$u_p=A(x)\cos \omega x+B(x)\sin \omega x,$

where

$A(x)=A_0+A_1x+\cdots+A_kx^k,\quad B(x)=B_0+B_1x+\cdots+B_kx^k,$

and the pairs of coefficients $$(A_k,B_k)$$, $$(A_{k-1},B_{k-1})$$, …,$$(A_0,B_0)$$ can be computed successively as the solutions of pairs of equations obtained by equating the coefficients of $$x^r\cos\omega x$$ and $$x^r\sin\omega x$$ for $$r=k$$, $$k-1$$, …, $$0$$.

Conclude that

$\int e^{\lambda x}\left(P(x)\cos \omega x+Q(x)\sin \omega x\right)\,dx = e^{\lambda x}\left(A(x)\cos \omega x+B(x)\sin \omega x\right) +c,$

where $$c$$ is a constant of integration.

[exer:5.5.40] Use the method of Exercise [exer:5.5.39} to evaluate the integral.

## a

$$\int x^2\cos x\,dx$$

## b

$$\int x^2e^x\cos x\,dx$$

[2]

## c

$$\int xe^{-x}\sin2x\,dx$$

## d

$$\int x^2e^{-x}\sin x\,dx$$

[2]

## e

$$\int x^3e^x\sin x\,dx$$

## f

$$\int e^x\left[x\cos x-(1+3x)\sin x\right]\,dx$$

[2]

## g

$$\int e^{-x}\left[(1+x^2)\cos x+(1-x^2)\sin x\right]\,dx$$