So, I have the following solution to a differential equation:
$$ y(t) = \frac{k\int \! e^{-pt} \frac{\mathrm{d}x(t)}{\mathrm{d}t} \mathrm{d}t}{e^{-pt}} $$
But I am not sure if I can cancel out the $ \mathrm{d}t $.
What I would like to do is to prove that $ y(t) = k x(t) $, as I have a hunch that that’s the solution, but I could be wrong. (I’m working on an electrical engineering problem in which the output voltage should be more-or-less proportional to the input voltage, albeit shifted somewhat, etc. etc...)
I’ve tried integration by parts:
$$ \begin{align} u &= e^{-pt} \quad& {\rm d}v &= \frac{{\rm d}x(t)}{{\rm d}t} \, {\rm d}t \\ {\rm d}u &= -pe^{-pt} \, {\rm d}t \quad& v &= x(t) \end{align} $$
Which yields:
$$ \begin{align} y(t) &= \frac{k\Big( uv - \int \! v \, {\rm d}u \Big)}{e^{-pt}} \\ &= \frac{k\Big( e^{-pt} x(t) - \int \! x(t)(-pe^{-pt}) \, {\rm d}t \Big)}{e^{-pt}} \\ &= \frac{k\Big( e^{-pt} x(t) + p \int \! x(t) e^{-pt} \, {\rm d}t \Big)}{e^{-pt}} \end{align} $$
...but applying it a second time returns me to right where I started.
One thing that doesn’t help is the fact that $ x(t) = A*sin(\omega t + \phi) $, so, like $ e^x $, it never really disappears out of the integral no matter what tricks I try.
Any ideas?
So, as Gerry Myerson pointed out, it turns out I was being silly, in that I was refusing to expand the $ x(t) $ function. Unfortunately I didn’t see his comment until a few more hours of struggling before finally finding a solution. At any rate, I figured I’d post the fully written-out process to assist any visual-learners out there who might happen to stumble across this page in the future...
The problem was that I should have just expanded the $ \frac{{\rm d}x(t)}{{\rm d}t} $ out and done the integral that way, instead of trying to use IBP with $ x(t) $ in its LHS form. If left in that form, during the second IBP expansion, you either end up undoing the first expansion (if you swap your $u$ and $dv$) or, you get $ \int \! x(t) \, {\rm d}t $, within the outermost integral, which just ends up being more of a mess than it’s worth...
This is my solution:
Given that
$$ x(t) = A*{\rm sin}(\omega t + \phi) $$
We can solve for
$$ \int \! e^{-pt} \frac{{\rm d}x(t)}{{\rm d}t} \, {\rm d}t $$
quite easily. First, evaluate $ \frac{{\rm d}x(t)}{{\rm d}t} $:
$$ \frac{{\rm d}x(t)}{{\rm d}t} = A * \omega * {\rm cos}(\omega t + \phi) $$
and then just plug it into the integral:
$$ \begin{align} \quad&\quad \int \! e^{-pt} * A * \omega * {\rm cos}(\omega t + \phi) \, {\rm d}t \\ =&\quad A \omega \int \! e^{-pt} {\rm cos}(\omega t + \phi) \, {\rm d}t, \end{align} $$
$$ \begin{align} u &= e^{-pt} &\quad {\rm d}v &= {\rm cos}(\omega t + \phi) \, {\rm d}t \\ {\rm d}u &= -pe^{-pt} \, {\rm d}t &\quad v &= \frac{{\rm sin}(\omega t + \phi)}{\omega}, \end{align} $$
$$ \begin{align} \quad&\quad A \omega \Bigg( \frac{1}{\omega} e^{-pt} {\rm sin}(\omega t + \phi) - \int \! - \frac{p}{\omega} e^{-pt} {\rm sin}(\omega t + \phi) \, {\rm d}t \Bigg) \\ =&\quad A \omega \Bigg( \frac{1}{\omega} e^{-pt} {\rm sin}(\omega t + \phi) + \frac{p}{\omega} \int \! e^{-pt} {\rm sin}(\omega t + \phi) \, {\rm d}t \Bigg), \end{align} $$
$$ \begin{align} u &= e^{-pt} &\quad {\rm d}v &= {\rm sin}(\omega t + \phi) \, {\rm d}t \\ {\rm d}u &= -pe^{-pt} \, {\rm d}t &\quad v &= - \frac{{\rm cos}(\omega t + \phi)}{\omega}, \end{align} $$
$$ \begin{align} \quad&\quad A \omega \Bigg( \frac{1}{\omega} e^{-pt} {\rm sin}(\omega t + \phi) + \frac{p}{\omega} \Big( - \frac{1}{\omega} e^{-pt} {\rm cos}(\omega t + \phi) - \int \! \frac{-p}{- \omega} e^{-pt} {\rm cos}(\omega t + \phi) \, {\rm d}t \Big) \Bigg) \\ =&\quad A \omega \Bigg( \frac{1}{\omega} e^{-pt} {\rm sin}(\omega t + \phi) + \frac{p}{\omega} \Big( - \frac{1}{\omega} e^{-pt} {\rm cos}(\omega t + \phi) - \frac{p}{\omega} \int \! e^{-pt} {\rm cos}(\omega t + \phi) \, {\rm d}t \Big) \Bigg) \\ =&\quad A \omega \Bigg( \frac{1}{\omega} e^{-pt} {\rm sin}(\omega t + \phi) - \frac{p}{\omega^2} e^{-pt} {\rm cos}(\omega t + \phi) - \frac{p^2}{\omega^2} \int \! e^{-pt} {\rm cos}(\omega t + \phi) \, {\rm d}t \Bigg) \\ =&\quad A e^{-pt} {\rm sin}(\omega t + \phi) - A \frac{p}{\omega} e^{-pt} {\rm cos}(\omega t + \phi) - A \frac{p^2}{\omega} \int \! e^{-pt} {\rm cos}(\omega t + \phi) \, {\rm d}t \end{align} $$
Which yields:
$$ \begin{align} \quad &\quad \Bigg( A \omega + A \frac{p^2}{\omega} \Bigg) \int \! e^{-pt} {\rm cos}(\omega t + \phi) \, {\rm d}t = A e^{-pt} {\rm sin}(\omega t + \phi) - A \frac{p}{\omega} e^{-pt} {\rm cos}(\omega t + \phi) \\ \therefore &\quad \Bigg( \frac{\omega^2 + p^2}{\omega} \Bigg) \int \! e^{-pt} {\rm cos}(\omega t + \phi) \, {\rm d}t = e^{-pt} {\rm sin}(\omega t + \phi) - \frac{p}{\omega} e^{-pt} {\rm cos}(\omega t + \phi) \\ \therefore &\quad \int \! e^{-pt} {\rm cos}(\omega t + \phi) \, {\rm d}t = \frac{\omega}{\omega^2 + p^2} e^{-pt} {\rm sin}(\omega t + \phi) - \frac{p}{\omega^2 + p^2} e^{-pt} {\rm cos}(\omega t + \phi) \end{align} $$
So, for my original equation...
$$ \begin{align} y(t) &= \frac{k \int \! e^{-pt} \frac{{\rm d}x(t)}{{\rm d}t} {\rm d}t}{e^{-pt}} \\ &= \frac{k A \omega \int \! e^{-pt} {\rm cos}(\omega t + \phi) \, {\rm d}t}{e^{-pt}} \\ &= \frac{k A \omega \Big( \frac{\omega}{\omega^2 + p^2} e^{-pt} {\rm sin}(\omega t + \phi) - \frac{p}{\omega^2 + p^2} e^{-pt} {\rm cos}(\omega t + \phi) \Big)}{e^{-pt}} \\ &= \frac{k A \omega^2}{\omega^2 + p^2} {\rm sin}(\omega t + \phi) - \frac{k A \omega p}{\omega^2 + p^2} {\rm cos}(\omega t + \phi) \end{align} $$
...which actually ended up being quite close (waveform-wise) to what I expected, so I think I’m on the right track.