Find the general solution $y(t)$ of the ordinary differential equation $$y''+\omega^2 y=\cos \omega t,$$ where $\omega>0$.
I'm relatively new to ODEs and PDEs but can someone show me the general steps to do here for this question? Thanks.
Find the general solution $y(t)$ of the ordinary differential equation $$y''+\omega^2 y=\cos \omega t,$$ where $\omega>0$.
I'm relatively new to ODEs and PDEs but can someone show me the general steps to do here for this question? Thanks.
For the complementary function you are solving $u^2+\omega^2=0$ which gives $y=A\cos\omega t+B\sin \omega t$. However, for the particular integral, this is a "failure case", so you need to use a PI of the form $$y=t(P\cos\omega t+Q\sin\omega t)$$
I get y''p = -Aω^2sinωt - Bω^2cosωt. substitute into ODE. But when I do I equate -Bω^2 + Bω^2 = 1 =0. ???
– Andrew Cavagnino Aug 30 '15 at 12:28Both the answers by David Quinn and Terry Lee are correct. That's not my issue. But what I find disturbing is that there is no heuristics for the particular solution $y_p$ . It just drops out of the blue sky. So I'm actually asking: why is the PI of the form $y=t(P\cos\omega t+Q\sin\omega t)$ ?
Operator Calculus provides us with the desired heuristics, as will be demonstrated now.
The differential
equation shall be written in operator form as:
$$ \left[ \left( \frac{d}{dt} \right)^2 + \omega^2 \right] y(t) = \cos(\omega\,t) $$
By decomposing into factors:
$$ \left(\frac{d}{dt} - i\,\omega \right)
\left(\frac{d}{dt} + i\,\omega \right) y(t) = \cos(\omega\,t) $$
We are going to use a basic formula in Operator Calculus (see reference):
$$ \large \overline{\underline{ \left| \; \frac{d}{dx} + f = e^{-\int f \, dx}\,
\frac{d}{dx}\, e^{+\int f \, dx } \; \right| }} $$
As follows:
$$ \frac{d}{dt} + i\,\omega =
e^{- \int i\,\omega \, dt}\ \frac{d}{dt} \ e^{ + \int i\,\omega \, dt}
= e^{- i\,\omega\, t} \ \frac{d}{dt} \ e^{+ i\,\omega\, t } $$
And likewise:
$$ \frac{d}{dt} - i\,\omega = e^{+ i\,\omega\, t} \ \frac{d}{dt} \ e^{- i\,\omega\, t } $$
Giving for the O.D.E.:
$$ e^{+ i\,\omega\ t } \ \frac{d}{dt} \ e^{- i\,\omega\ t } \
e^{- i\,\omega\ t } \ \frac{d}{dt} \ e^{+ i\,\omega\ t } \ y(t) = \cos(\omega\,t) $$
Systematic integration is possible now. It's a bit cumbersome, but straightforward:
$$
\frac{d}{dt} \ e^{ - 2\,i\,\omega\, t } \frac{d}{dt}\ e^{ + i\,\omega\, t } y(t) =
e^{ - i\,\omega\, t } \cos(\omega\,t) =
e^{ - i\,\omega\, t } \frac{e^{+ i\,\omega\, t} + e^{- i\,\omega\, t}}{2} =
\frac{1 + e^{- 2\,i\,\omega\, t}}{2}
$$ $$
e^{ - 2\,i\,\omega\, t } \frac{d}{dt}\ e^{ + i\,\omega\, t } y(t) =
\int \frac{1 + e^{- 2\,i\,\omega\, t}}{2}\, dt =
\frac{1}{2}\left[ t + \frac{1}{- 2\,i\,\omega}\ e^{- 2\,i\,\omega\, t}\right] + C_1
$$ $$
\frac{d}{dt}\ e^{ + i\,\omega\, t } y(t) =
\frac{1}{2}\left[ t\ e^{2\,i\,\omega\, t} + \frac{1}{- 2\,i\,\omega}\right] + C_1 \ e^{2\,i\,\omega\, t }
$$ $$
e^{ + i\,\omega\, t } y(t) =
\frac{1}{2} \int t \ e^{2\,i\,\omega\, t } \, dt - \int \frac{dt}{4\,i\,\omega} +
C_1 \int e^{2\,i\,\omega\, t } \, dt = \frac{1}{4\,i\,\omega} \int t \, d\left(e^{2\,i\,\omega\, t }\right)
- \frac{t}{4\,i\,\omega} + \frac{C_1}{2\,i\,\omega} \ e^{2\,i\,\omega\, t } + C_2 \\
= \frac{t}{4\,i\,\omega} \, e^{2\,i\,\omega\, t } - \frac{1}{4\,i\,\omega} \int e^{2\,i\,\omega\, t } \, dt
- \frac{t}{4\,i\,\omega} + \frac{C_1}{2\,i\,\omega} \ e^{2\,i\,\omega\, t } + C_2 =
\frac{t}{4\,i\,\omega} \, e^{2\,i\,\omega\, t } + \frac{1}{8\,\omega^2} \ e^{2\,i\,\omega\, t }
- \frac{t}{4\,i\,\omega} + \frac{C_1}{2\,i\,\omega} \ \ e^{2\,i\,\omega\, t } + C_2
$$
So finally:
$$
y(t) = \left\{\frac{t}{2\,\omega}\frac{e^{+ i\,\omega\, t} - e^{- i\,\omega\, t}}{2\,i}\right\}
+ \left\{ \left[ \frac{1}{8\,\omega^2} + \frac{C_1}{2\,i\,\omega} \right] \, e^{i\,\omega\, t}
+ C_2 \, e^{- i\,\omega\, t}\right\}
$$
The particular solution is the first one between $\left\{ \right\}$ :
$$
y_p(t) = \frac{t\sin(\omega\,t)}{2\,\omega}
$$
The homogeneous solution is the second one between $\left\{ \right\}$ , the one with the arbitrary constants $C1,C_2$ involved. It is equivalent with $\;y=A\ \cos(\omega\ t)+B\ \sin(\omega\ t)$ .