Integration by parts loop with coefficient

calculusindefinite-integralsintegration

I leant that when the integral appears on the right side of the equation, it can be transferred accross to the left side, as in this post, but I'm trying to learn how to do this if there is a coefficient with the integral on the RHS. For example:

\begin{align}\int e^{-int}\sin(t)\,dt&=\frac{i}{n}e^{-int}\sin(t)-\int\frac{i}{n}e^{-int}\cos(t)\,dt \\
&=\frac{i}{n}e^{-int}\sin(t)-\left(-\frac{1}{n^2}e^{-int}\cos(t)-\int\frac{1}{n^2}e^{-int}\sin(t)\,dt\right)\end{align}

I can see that the integral appears on the RHS, and normally this could be transferred across to the LHS, but I'm not sure of how it all works with the $\frac{1}{n^2}$

Any help or direction would be much appreciated.

Best Answer

You have $$ \int e^{-int} \sin(t) \, dt = \frac{i}{n}e^{-int}\sin(t) + \frac{1}{n^2}e^{-int}\cos(t) + \frac{1}{n^2} \int e^{-int}\sin(t) $$

So, $$ \left( 1 - \frac{1}{n^2} \right) \int e^{-int} \sin(t) \, dt = \frac{i}{n}e^{-int}\sin(t) + \frac{1}{n^2}e^{-int}\cos(t) $$ i.e. $$ \int e^{-int} \sin(t) \, dt = \left( 1 - \frac{1}{n^2} \right)^{-1} \left( \frac{i}{n}e^{-int}\sin(t) + \frac{1}{n^2}e^{-int}\cos(t) \right) \\ = \frac{n^2}{n^2-1} \left( \frac{i}{n}e^{-int}\sin(t) + \frac{1}{n^2}e^{-int}\cos(t) \right) \\ = \frac{in}{n^2-1}e^{-int}\sin(t) + \frac{1}{n^2-1}e^{-int}\cos(t) \\ $$