The temperature u(x,t) in a thin bar of length 1 satisfies the diffusion equation
d^2u/dx^2 = du/dt.
Bar is insulated at x = 0 and x = 1, meaning du/dx = 0 at both ends. The initial condition is u(0,t) = cos^2(pi x)
I have deduced that u(x,t) = sum from n = 1 to infinity of
A exp(-n^2 pi^2 t) cos (n pi x), but I need help applying the orthogonality condition to obtain my coefficients A.