Solution to the heat equation using the method of separation method
$$u_t=u_{xx},0\le x\le 2\pi, t>0\\\\u(0,t)=0\\u_x(2 \pi, t)=0\\u(x,0)=x=f(x)$$
my attempt:
let us take $u(x,t)=X(x)T(t)$
then i got $X''-kX=0, T'-T=0$
now for $k=0 $ and $k=\lambda^2$ has trivial solution
Now for $k=-\lambda^2$ i got $\lambda=(2n+1)/4$
but i am not sure about it can any help
For first order derivatives, in this case for $t$, the solution is of the form $e^{- \mu t}$ and can be used in the following. For the equation $$u_{t} = u_{xx}$$ then let $u(x,t) = e^{- \mu t} \, F(x)$ to obtain $F'' + \mu F = 0$. This yields the form $$F(x) = A \, \cos(\mu x) + B \, \sin(\mu x).$$ By using the condition $u(0,t) = 0$ then this becomes $F(0) = 0$ and leads to $A = 0$ and $F(x) = B \, \sin(\mu x)$. Using the condition $u_{x}(2\pi, t) = 0$, or $F'(2\pi) = 0$, leads to $B \mu \, \cos(2 \pi \mu) = 0$ and provides $$\mu_{n} = \frac{2 n - 1}{4} \hspace{5mm} \text{ for } n \geq 1.$$ Placing this all together yields $$u(x,t) = \sum_{n=1}^{\infty} B_{n} \, e^{- \mu_{n} t} \, \sin(\mu_{n} x).$$ Applying the last condition, $u(x,0) = x$, gives a value to the coefficient $B_{n}$ by use of Fourier Sine series.
$$x = \sum_{n=1}^{\infty} B_{n} \, \sin(\mu_{n} x),$$ where $$B_{n} = \frac{1}{\pi} \, \int_{0}^{2 \pi} x \, \sin(\mu_{n} x) \, dx.$$ Calculating this integral yields the result $$B_{n} = \frac{16 \, (-1)^{n-1}}{(2n -1)^{2}}.$$
The solution is then given as: $$u(x,t) = \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{\mu_{n}^{2}} \, e^{- \mu_{n} t} \, \sin(\mu_{n} x), $$ where $4 \mu_{n} = 2n -1$.