I have the function f(x) = cos(x) on the interval from 0 to pi and I need to comput the Fourier sine series.

I have the integral of cos(x) multiplied by sin(nx), I can't figure out a way to integrate them! The "n" gets in the way, what do I do?

first sketch a graph of cos x and sin x, sin 2x, sin 3x, sin 4x

in the interval from 0 to pi
You will notice that for n = 1 for example, the plus contribution between 0 and pi/2 cancels the negative contribution between pi/2 and pi
in fact for cos 1x * sin n x dx, only even values of n will contribute for the integral from 0 to pi.
The general rule for this definite integral is:
integral from 0 to pi of
sin ax cos bx dx
is:
2a/(a^2-b^2) if (a-b) is odd
0 if (a-b) is even
so here:
2/(1-n^2) if n is even
0 if n is odd

So basically, that is the coefficient "bn" that I place in the summation from n=1 to infinity of sin(nx)?

If that is correct, thanks, I was going into a complicated page of integration . . .

Okay, I got it, thanks Damon.

yes :)

To compute the Fourier sine series for the function f(x) = cos(x) on the interval from 0 to π, you need to find the coefficients a_n for the sine terms in the series.

The formula for the Fourier sine series is:
f(x) = a_0/2 + Σ [a_n * sin(nx)]

To find the coefficient a_n, you need to integrate the product of f(x) and sin(nx) over the interval from 0 to π:

a_n = (2/π) ∫[0 to π] [f(x) * sin(nx)] dx

In this case, f(x) = cos(x) and you need to calculate the integral:

a_n = (2/π) ∫[0 to π] [cos(x) * sin(nx)] dx

To evaluate this integral, you can use integration by parts. Let's break down the steps to integrate cos(x) * sin(nx) using integration by parts:

Step 1: Choose u and dv:
u = cos(x) (function to differentiate)
dv = sin(nx) dx (function to integrate)

Step 2: Calculate du and v:
du = -sin(x) dx (derivative of u)
v = -(1/n) * cos(nx) (integral of dv)

Step 3: Apply the integration by parts formula:
∫[cos(x) * sin(nx)] dx = u * v - ∫[v * du]

∫[cos(x) * sin(nx)] dx = cos(x) * (-(1/n) * cos(nx)) - ∫[-(1/n) * cos(nx) * (-sin(x))] dx

Simplifying the above expression, we get:
∫[cos(x) * sin(nx)] dx = -(cos(x) * cos(nx))/n + (1/n^2) * ∫[cos(nx) * sin(x)] dx

Step 4: Evaluate the remaining integral:
∫[cos(nx) * sin(x)] dx

This integral can be evaluated using a similar integration by parts process. Following the same steps as above, you'll find:
∫[cos(nx) * sin(x)] dx = (cos(nx) * (-cos(x))/n - (1/n^2) * ∫[sin(nx) * (-sin(x))] dx

Simplifying further, we get:
∫[cos(nx) * sin(x)] dx = (-cos(x) * cos(nx))/n - (1/n^2) * ∫[sin(nx) * sin(x)] dx

Step 5: Evaluate the new integral:
∫[sin(nx) * sin(x)] dx

This integral can be evaluated using the product-to-sum identity for sine:
∫[sin(nx) * sin(x)] dx = ∫[(1/2) * (cos((n-1)x) - cos((n+1)x))] dx

Splitting the integral, we get:
∫[sin(nx) * sin(x)] dx = (1/2) * ∫[cos((n-1)x)] dx - (1/2) * ∫[cos((n+1)x)] dx

Evaluating these integrals gives:
∫[sin(nx) * sin(x)] dx = (1/2) * (sin((n-1)x)/(n-1)) - (1/2) * (sin((n+1)x)/(n+1))

Now that we have found the expression for the integral, we can substitute it back into the expression for the coefficient a_n:

a_n = (2/π) * (-(cos(x) * cos(nx))/n + (1/n^2) * (-cos(x) * cos(nx))/n + (1/n^2) * ((1/2) * (sin((n-1)x)/(n-1)) - (1/2) * (sin((n+1)x)/(n+1))))

Simplifying the above expression will give you the coefficient a_n for each value of n. Repeat this process for different values of n to obtain the coefficients for the Fourier sine series.