# How would you integrate this function?

1. Apr 11, 2017

### Vitani11

1. The problem statement, all variables and given/known data
I need to find the coefficients for a fourier expansion. Here is the integral I need to solve: (1/π) ∫sin(x/2)sin(nx)dx where the limits are from -π to π. The original function for the expansion is f(x) = sin(x/2)

2. Relevant equations
None

3. The attempt at a solution
Should I do this in terms of complex numbers? I think that should be my approach but I am not sure. If this is the right approach can you help me get started with setting up the integral?

2. Apr 11, 2017

### Staff: Mentor

I don't think so. The usual approach is integration by parts, twice. Here's a link to a similar example, https://www.math.ucdavis.edu/~kouba/CalcTwoDIRECTORY/trigintsoldirectory/TrigIntSol3.html#SOLUTION 24, problem #24

3. Apr 11, 2017

### Dr Transport

use the identity

$$\frac{1}{2\pi} \int_{-\pi} ^{\pi} \sin(nx)\sin(mx) dx = \delta_{nm}$$

and the integral pops right out for you . (i might have the normalization wrong.... off the top of my head....)

4. Apr 11, 2017

### Vitani11

Woah, so you're saying that using the kronecker delta I can just say it is δn (1/2)? Can you walk me through those steps? Does it have something to do with the dirac delta function/identities? If the kronecker truly makes it simpler then I'd rather use that lol.

5. Apr 11, 2017

### Dr Transport

it is a definition....if you write the sine functions in terms of complex exponential's and do the integrals, it comes out very quickly....

6. Apr 11, 2017

### Dr Transport

$$\frac{1}{\pi}\int_{-\pi}^{\pi}\sin(nx)\sin(mx)dx = \delta_{nm}$$

7. Apr 11, 2017

### Vitani11

Yes I've solved this now- thank you