4

have this integral, and looking for the best\quickest way to solve it:

$$\int_{-b}^bD\sin\left({\pi ny \over b}\right)\sin\left({\pi n'y \over b}\right)dy$$

amWhy
  • 209,954
  • 2
    Are you using the prime on $n$ in order to denote that it is distinct from $n$? And does D denote "derivative"? If so, is its scope the first factor? Please edit your post to clarify your notation. – amWhy Jun 20 '14 at 12:36
  • Use one of the trigonometry factor formulae to split the product of two sines into the difference of two cosines and then integrate separately. You can find the formulae listed here:http://www.examsolutions.net/maths-revision/core-maths/trigonometry/identities/factor-formulae/example-1.php – Deepak Jun 20 '14 at 12:38

2 Answers2

3

$$\cos(a+b)=\cos(a) \cos(b)-\sin(a) \sin(b)$$ $$\cos(a-b)=\cos(a) \cos(b)+\sin(a) \sin(b)$$

From these two relations ,we get that:

$$\sin(a) \sin(b)=\frac{\cos(a-b)-\cos(a+b)}{2}$$

evinda
  • 7,823
1

Use complex exponential functions: $2i \sin(x) = \exp(ix)-\exp(-ix)$. Let $k=n\pi/b$ and $k'=n'\pi/b$, then we can rewrite the integral as,

$$\frac{-D}{4} \int_{-b}^b dy (e^{iky}-e^{-iky})(e^{ik'y}-e^{-ik'y}), $$

$$= \frac{-D}{4} \int_{-b}^b dy (e^{i(k+k')y}-e^{-i(k-k' )y}+e^{i(k-k')y}-e^{-i(k+k' )y}), $$

$$= \frac{-D}{4} \left[ \frac{e^{i(k+k')y}}{i(k+k')}-\frac{e^{-i(k-k' )y}}{-i(k-k')}+\frac{e^{i(k-k')y}}{i(k-k')}-\frac{e^{-i(k+k')y}}{-i(k+k')} \right]_{-b}^b, $$

$$= \frac{-D}{4} \left[ \frac{e^{i(k+k')y}+e^{-i(k+k')y}}{i(k+k')}+\frac{e^{-i(k-k' )y}+e^{i(k-k')y}}{i(k-k')}+\right]_{-b}^b, $$

$$= \frac{-D}{4} \left[ \frac{2\cos((k+k')y)}{i(k+k')}+\frac{2\cos((k-k')y)}{i(k-k')}+\right]_{-b}^b, $$

$$= \frac{-D}{4} \left[ \frac{2\cos((k+k')b)-2\cos(-(k+k')b)}{i(k+k')} \\+\frac{2\cos((k-k')b)-2\cos(-(k-k')b)}{i(k-k')}+\right], $$

$$= 0. $$

However since the anti-derivatives used above had a division by $k-k'$ we must treat the case where $k=k'$ separately.

Spencer
  • 12,271