Simple question about the heat equation (differential equations) This is a question from my textbook.

The question is to find the temperature with the following information:
f(x) = 1
u(0,t) = 0
u(L,t) = 0
u(x,t) = f(x)

The equation itself:



The solution from chegg:



From the circled line,
How did they get An = 0 from



A simple explanation would do. Thank you.
$$
\left[\frac{1}{n}\sin (nx) \right]^\pi_0=\frac{1}{n}\sin(n\cdot \pi)-\frac{1}{n}\sin (n \cdot 0)=\frac{1}{n}\cdot 0 -\frac{1}{n}\cdot 0=0-0=0
$$
We have that $\displaystyle \int_0^{π}\cos(x)\,dx=\int_0^{π}\cos(2x)\,dx.....=\int_0^{π}\cos(nx)\,dx=\boxed{0}$