For the heat equation on a semi infinite domain we have been shown the method of images. Which to my understanding is basically using an even or odd extension to match the boundary condition.ie for U_x(0,t)=0
we use the even extension which meets this condition.And when the derivative is not specified but instead U(0,t)=0 we use the odd extension which has non zero derivative at x=0 but meets this boundary condition.

For example:

U_t=kU_xx
U(x,0)=sinx
U(0,t)=0

Then using the general solution to solve this i get 2(sinx)e^{-kt}

The solution does not have a two. Which implies that the initial condition has been extended to an infinite domain and there is only one integral. As we were shown in class i get two integrals and since -sin(-x)=sinx i get the factor of two. I am wondering why there isnt a two in the solution.