Respuesta :

It comes from integrating by parts twice. Let

[tex]I = \displaystyle \int e^n \sin(\pi n) \, dn[/tex]

Recall the IBP formula,

[tex]\displaystyle \int u \, dv = uv - \int v \, du[/tex]

Let

[tex]u = \sin(\pi n) \implies du = \pi \cos(\pi n) \, dn[/tex]

[tex]dv = e^n \, dn \implies v = e^n[/tex]

Then

[tex]\displaystyle I = e^n \sin(\pi n) - \pi \int e^n \cos(\pi n) \, dn[/tex]

Apply IBP once more, with

[tex]u = \cos(\pi n) \implies du = -\pi \sin(\pi n) \, dn[/tex]

[tex]dv = e^n \, dn \implies v = e^n[/tex]

Notice that the ∫ v du term contains the original integral, so that

[tex]\displaystyle I = e^n \sin(\pi n) - \pi \left(e^n \cos(\pi n) + \pi \int e^n \sin(\pi n) \, dn\right)[/tex]

[tex]\displaystyle I = \left(\sin(\pi n) - \pi \cos(\pi n)\right) e^n - \pi^2 I[/tex]

[tex]\displaystyle (1 + \pi^2) I = \left(\sin(\pi n) - \pi \cos(\pi n)\right) e^n[/tex]

[tex]\implies \displaystyle I = \frac{\left(\sin(\pi n) - \pi \cos(\pi n)\right) e^n}{1+\pi^2} + C[/tex]