Answer is: option1
\(\frac{1}{n} f(x) \sin(nx) - \frac{1}{n} \int f'(x) \sin(nx) \, dx\)
Solution:
We are tasked with solving the integral:
\[ \int f(x) \cos(nx) \, dx \]
Step 1: Choose \( u \) and \( dv \)
We choose:
\[ u = f(x) \quad \Rightarrow \quad du = f'(x) \, dx \]
\[ dv = \cos(nx) \, dx \quad \Rightarrow \quad v = \frac{1}{n} \sin(nx) \]
Step 2: Apply the Integration by Parts Formula
The integration by parts formula is:
\[ \int u \, dv = u v - \int v \, du \]
Substitute \( u = f(x) \), \( du = f'(x) \, dx \), and \( v = \frac{1}{n} \sin(nx) \):
\[ \int f(x) \cos(nx) \, dx = f(x) \cdot \frac{1}{n} \sin(nx) - \int \frac{1}{n} \sin(nx) \cdot f'(x) \, dx \]
Step 3: Simplify the Expression
This simplifies to:
\[ \int f(x) \cos(nx) \, dx = \frac{1}{n} f(x) \sin(nx) - \frac{1}{n} \int f'(x) \sin(nx) \, dx \]
Final Answer
The final solution is:
\[ \int f(x) \cos(nx) \, dx = \frac{1}{n} f(x) \sin(nx) - \frac{1}{n} \int f'(x) \sin(nx) \, dx \]