# Solve the following ODE by using the method of undetermined coefficients in which Euler's formula needs to be utilized: y′′−2y′+y=sin(t)

Violet Woodward 2022-07-22 Answered
Solve the following ODE by using the method of undetermined coefficients in which Euler's formula needs to be utilized:
${y}^{″}-2{y}^{\prime }+y=\mathrm{sin}\left(t\right)$
The way that I solved this doesn't involve Euler's formula, and I was wondering how I might use the formula here.

My approach:
The formula can be written as $y\left(t\right)={y}_{h}\left(t\right)+{y}_{p}\left(t\right)$ where ${y}_{h}\left(t\right)$ is the "homogeneous version" of the ODE and ${y}_{p}\left(t\right)$ is the particular solution that we'll obtain via the basic rule of the method of undetermined coefficients.

${y}_{h}\left(t\right)$:
Putting $r\left(t\right)=\mathrm{sin}\left(t\right)=0$ in the original equation, the ODE we need to solve is:
${y}^{″}-2{y}^{\prime }+y=0$
where we can set the general solution as $y={e}^{\lambda t}$ and obtain the characteristic equation:
${\lambda }^{2}-2\lambda +1=0$
which has a real double root, hence giving us the solution:
${y}_{h}\left(t\right)=\left({c}_{1}+{c}_{2}t\right){e}^{t}$

${y}_{p}\left(t\right)$:
Judging by the fact that $r\left(t\right)$ is shape $k\mathrm{sin}\left(\omega t\right)$ and we know that $\omega =1$ we can set the general solution to be of form:
$\begin{array}{rl}{y}_{p}\left(t\right)& =\phantom{-}K\mathrm{cos}\left(t\right)+M\mathrm{sin}\left(t\right)\\ {y}_{p}^{\prime }\left(t\right)& =-K\mathrm{sin}\left(t\right)+M\mathrm{cos}\left(t\right)\\ {y}_{p}^{″}\left(t\right)& =-K\mathrm{cos}\left(t\right)-M\mathrm{sin}\left(t\right)\end{array}$
substituting these equations into the original equation and then simplifying gives us:
${y}_{p}\left(t\right)=\frac{1}{2}\mathrm{cos}\left(t\right)$
And in conclusion, we can write that the solution to the given ODE is:
$\begin{array}{rl}y\left(t\right)& ={y}_{h}\left(t\right)+{y}_{p}\left(t\right)\\ & =\left({c}_{1}+{c}_{2}t\right){e}^{t}+\frac{1}{2}\mathrm{cos}\left(t\right)\end{array}$
How would we be able to derive this conclusion via Euler's formula? Thanks in advance.
You can still ask an expert for help

Expert Community at Your Service

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Available 24/7
• Math expert for every subject
• Pay only if we can solve it

## Answers (2)

repotasonwf
Answered 2022-07-23 Author has 12 answers
So, here Euler's formula means using $\mathrm{sin}t==\frac{{e}^{it}-{e}^{-it}}{2i}$ The particular integral will be found as
$f\left(D\right)y={e}^{at}\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}{y}_{p}\left(t\right)=\frac{{e}^{at}}{f\left(a\right)}$
Where we have
$\left(D-1{\right)}^{2}y=\frac{{e}^{it}-{e}^{-it}}{2i}\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}{y}_{p}\left(t\right)=\left(2i{\right)}^{-1}\left(\frac{{e}^{it}}{\left(i-1{\right)}^{2}}-\frac{{e}^{-it}}{\left(-i-1{\right)}^{2}}\right)=\frac{1}{4}\left[{e}^{it}+{e}^{-it}\right]$
$=\frac{1}{2}\mathrm{cos}t.$
${y}_{h}\left(t\right)$ remains the same as you found.
###### Not exactly what you’re looking for?
Luz Stokes
Answered 2022-07-24 Author has 3 answers
Consider a new differential equation
$\begin{array}{}\text{(1)}& \frac{{d}^{2}y}{d{t}^{2}}-2\frac{dy}{dt}+1=\left(\frac{{d}^{2}}{dt}-2\frac{d}{dt}+1\right)y={e}^{it}.\end{array}$
Let $y={e}^{it}g\left(t\right)$. By the product rule
$\begin{array}{r}\frac{dy}{dt}=\frac{d}{dt}\left({e}^{it}g\left(t\right)\right)={e}^{it}\frac{d}{dt}g\left(t\right)+\left(\frac{d}{dt}{e}^{it}\right)g\left(t\right)={e}^{it}\left(\frac{d}{dt}+i\right)g\left(t\right).\end{array}$
Then the differential equation (1) becomes
$\begin{array}{r}{e}^{it}\left[{\left(\frac{d}{dt}+i\right)}^{2}-2\left(\frac{d}{dt}+i\right)+1\right]g\left(t\right)={e}^{it}\end{array}$
so that after cancelling ${e}^{it}$ from both sides and expanding the expression in parenthesis on the LHS
$\begin{array}{r}\left[{\left(\frac{d}{dt}+i\right)}^{2}-2\left(\frac{d}{dt}+i\right)+1\right]g\left(t\right)=\left(\frac{{d}^{2}}{d{t}^{2}}+\left(2i-2\right)\frac{d}{dt}-2i\right)g\left(t\right)=1\end{array}$
so that $g\left(t\right)=c$ for some constant $c\in \mathbb{C}$. Therefore, $g\left(t\right)=i/2$. A particular solution of $y$ would then be
$\begin{array}{r}y=\frac{i}{2}{e}^{it}=\frac{i}{2}\left(\mathrm{cos}t+i\mathrm{sin}t\right).\end{array}$
Since $\mathrm{sin}t=\mathrm{I}\mathrm{m}\left({e}^{it}\right)$, then a particular solution to
$\frac{{d}^{2}y}{d{t}^{2}}-2\frac{dy}{dt}+1=\left(\frac{{d}^{2}}{dt}-2\frac{d}{dt}+1\right){y}_{p}=\mathrm{sin}t$
is ${y}_{p}=\mathrm{I}\mathrm{m}\left(y\right)=\mathrm{I}\mathrm{m}\left(\frac{i}{2}\left(\mathrm{cos}t+i\mathrm{sin}t\right)\right)=\frac{1}{2}\mathrm{cos}t$
###### Not exactly what you’re looking for?

Expert Community at Your Service

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Available 24/7
• Math expert for every subject
• Pay only if we can solve it