I have been trying to solve a PDE where I encounter the expression
$$ \int_0^L \sin(\frac{k\pi x}{L})\cos(\frac{n\pi x}{L})\mathrm{d}x \tag A $$
I know that $$ \int_{-L}^L \sin(\frac{k\pi x}{L})\cos(\frac{n\pi x}{L})\mathrm{d}x=\int_0^{2L} \sin(\frac{k\pi x}{L})\cos(\frac{n\pi x}{L})\mathrm{d}x=0 $$ I have considered the domain to be $x\in [0,L]$ while modelling my problem.
Is there any series representation or solution to the integral in (A) which I could use ?
CONTEXT
Ultimately I would like to solve something like
$$ \sum_{k=0}^{\infty} {}\int_0^L \sin(\frac{k\pi x}{L})\cos(\frac{n\pi x}{L}) \mathrm{d}x $$
ATTEMPT $$ \sum_{k=0}^{\infty} \int_0^L \sin(\frac{k\pi x}{L})\cos(\frac{n\pi x}{L}) \mathrm{d}x\\ \Rightarrow \sum_{k=0}^{\infty} \frac{1}{2} \Bigg[\frac{L(\cos((k-n)\pi) - 1)}{(k-n)\pi} - \frac{L(\cos((k+n)\pi) + 1)}{(k+n)\pi}\Bigg] $$
The integral is not always $0$. Use the formula $\sin A \cos B=\frac 1 2 (\sin (A+B)-\sin (A-B))$ to evaluate the integral.