Well, I've a series RL circuit that is powered by a voltage source. The input voltage is given by:
$$\text{V}_{\text{in}}\left(t\right)=50+\frac{400}{\pi}\cdot\sum_{\text{n}=1}^\infty\frac{\sin\left(200\pi\cdot\text{n}\cdot t\right)}{\text{n}}\tag1$$
The resistor value is equal to \$\text{R}=20\space\Omega\$ and the inductor value is equal to \$\text{L} =25\cdot10^{-3}\space\text{H}\$.
Question: I've to find the average power that is dissipated in the resistor.
My work:
We can write for the power dissipated in the resistor, using Ohm's law, that:
$$\text{P}_\text{R}\left(t\right)=\text{V}_\text{R}\left(t\right)\cdot\text{I}_\text{R}\left(t\right)=\text{I}_\text{R}^2\left(t\right)\cdot\text{R}\tag2$$
Where \$\text{I}_\text{R}\left(t\right)\$ is the current trough the resistor and \$\text{V}_\text{R}\left(t\right)\$ is the voltage across the resistor.
Because it is a series circuit, the input current, \$\text{I}_\text{in}\left(t\right)\$, delivered by the source is the same trough the resistor and the inductor, so \$\text{I}_\text{R}\left(t\right)=\text{I}_\text{in}\left(t\right)=\text{I}_\text{L}\left(t\right)\$. Using Faraday's law, we can find that input current:
$$-\text{V}_\text{in}\left(t\right)+\text{I}_\text{in}\left(t\right)\cdot\text{R}=-\text{I}_\text{in}'\left(t\right)\cdot\text{L}\tag3$$
The initial condition is equal to \$0\$, so we know that \$\text{I}_\text{in}\left(0\right)=0\$. Now we need to solve equation \$(3)\$ using the values that are given.
Solving equation \$(3)\$ gives:
$$\text{I}_\text{in}\left(t\right)=\frac{1}{\text{L}}\cdot\exp\left(-\frac{\text{R}}{\text{L}}\cdot t\right)\cdot\left\{\int_1^t\text{X}\left(\tau\right)\space\text{d}\tau-\int_1^0\text{X}\left(\tau\right)\space\text{d}\tau\right\}\tag4$$
Where \$\text{X}\left(\tau\right)=\exp\left(\frac{\text{R}}{\text{L}}\cdot\tau\right)\cdot\text{V}_\text{in}\left(\tau\right)\$.
The average power that is dissipated in the resistor is equal to:
$$\overline{\text{P}}_\text{R}=\lim_{\text{n}\to\infty}\frac{1}{\text{n}}\cdot\int_0^\text{n}\text{P}_\text{R}\left(t\right)\space\text{d}t=\lim_{\text{n}\to\infty}\frac{1}{\text{n}}\cdot\int_0^\text{n}\text{I}_\text{R}^2\left(t\right)\cdot\text{R}\space\text{d}t=$$ $$\text{R}\cdot\left\{\lim_{\text{n}\to\infty}\frac{1}{\text{n}}\cdot\int_0^\text{n}\text{I}_\text{in}^2\left(t\right)\space\text{d}t\right\}\tag5$$
Now, the input current \$\text{I}_\text{in}\left(t\right)\$ that is stated in the integral at the end of equation \$(5)\$ can be found using the solution to the DE given in equation \$(4)\$.
Question: How can I solve the integral given in equation \$(5)\$, that is the part where I do not get my head around?
EDIT:
I already found that, using the given values that:
$$\int_1^0\text{X}\left(t\right)\space\text{d}\tau=\frac{3}{8}\cdot\left(1-e^{800}\right)\tag6$$
And:
$$\frac{1}{\text{L}}\cdot\exp\left(-\frac{\text{R}}{\text{L}}\cdot t\right)=40e^{-800t}\tag7$$
And:
$$\int_1^t\text{X}\left(\tau\right)\space\text{d}\tau=\int_1^t\exp\left(\frac{\text{R}}{\text{L}}\cdot\tau\right)\cdot\left\{50+\frac{400}{\pi}\cdot\sum_{\text{n}=1}^\infty\frac{\sin\left(200\pi\cdot\text{n}\cdot\tau\right)}{\text{n}}\right\}\space\text{d}\tau=$$ $$\int_1^t\exp\left(\frac{\text{R}}{\text{L}}\cdot\tau\right)\cdot50\space\text{d}\tau+\int_1^t\exp\left(\frac{\text{R}}{\text{L}}\cdot\tau\right)\cdot\frac{400}{\pi}\cdot\sum_{\text{n}=1}^\infty\frac{\sin\left(200\pi\cdot\text{n}\cdot\tau\right)}{\text{n}}\space\text{d}\tau=$$ $$\frac{e^{800t}-e^{800}}{16}+\frac{400}{\pi}\cdot\sum_{\text{n}=1}^\infty\frac{1}{\text{n}}\cdot\left\{\int_1^t\exp\left(800\cdot\tau\right)\cdot\sin\left(200\pi\cdot\text{n}\cdot\tau\right)\space\text{d}\tau\right\}\tag8$$