PDE problem: heat equation with periodic BC I need help with this exercise:
Given the PDE $$u_t=-10u_{xx}\tag{1},$$ with periodic boundary conditions in $[-1,1]$: $$u(-1,t)=u(1,t), \qquad u_x(-1,t)=u_x(1,t).$$
A) Obtain the solution $u(x,t)$ if $u(x,0)=u_0(x)=\sin(\frac{\pi}{10}x)$
B) If we consider as initial data $u_0(x)=x^2$ defined also in $[-1,1]$, does (1) have a solution in this case?
Thank you very much.
 A: First of all, periodic boundary conditions look like a pair of boundary conditions, e.g. like $$u(-1,t)=u(1,t), \quad u_x(-1,t)=u_x(1,t).$$
Start by separating variables, finding the eigenvalues $\lambda_n$, eigenfunctions $X_n(x)$, and temporal solutions $T_n(t)$.
Superimpose those to get something of the form $u(x,t)=\sum_n c_n X_n(x)T_n(t)$.
To obtain the coefficients in the series solution above, evaluate $u(x,t)$ at $t=0$, apply the initial data, and recognize this as an appropriate Fourier series. Use your knowledge of Fourier series and/or orthogonality on $[-1,1]$ to deduce formulas for the coefficients.
Edit based on progress in the comments:
The superimposed solution should look like $$u(x,t)=\sum_{n=1}^\infty [a_n\cos(n\pi x)+b_n\sin(n\pi x)]e^{10(n\pi)^2 t}.$$
Then, the initial condition $u(x,0)=f(x)$, $-1<x<1$, leads to
$$u(x,0)=\underbrace{\sum_{n=1}^\infty a_n\cos(n\pi x)+b_n\sin(n\pi x)=f(x)}, \quad -1<x<1,$$
which can be found as standard Fourier coefficients.
A: I doubt that whether you can really solve it even for A).
Let $u(x,t)=X(x)T(t)$ ,
Then $X(x)T'(t)=-10X''(x)T(t)$
$\dfrac{T'(t)}{10T(t)}=-\dfrac{X''(x)}{X(x)}=n^2\pi^2$
$\begin{cases}\dfrac{T'(t)}{T(t)}=10n^2\pi^2\\X''(x)+n^2\pi^2X(x)=0\end{cases}$
$\begin{cases}T(t)=c_3(n)e^{10n^2\pi^2t}\\X(x)=\begin{cases}c_1(n)\sin n\pi x+c_2(n)\cos n\pi x&\text{when}~n\neq0\\c_1x+c_2&\text{when}~n=0\end{cases}\end{cases}$
$\therefore u(x,t)=\sum\limits_{n=0}^\infty C_1(n)e^{10n^2\pi^2t}\sin n\pi x+\sum\limits_{n=0}^\infty C_2(n)e^{10n^2\pi^2t}\cos n\pi x$
$u(-1,t)=u(1,t)$ :
$\sum\limits_{n=0}^\infty C_1(n)e^{10n^2\pi^2t}\sin(-n\pi)+\sum\limits_{n=0}^\infty C_2(n)e^{10n^2\pi^2t}\cos(-n\pi)=\sum\limits_{n=0}^\infty C_1(n)e^{10n^2\pi^2t}\sin n\pi+\sum\limits_{n=0}^\infty C_2(n)e^{10n^2\pi^2t}\cos n\pi$
$-\sum\limits_{n=0}^\infty C_1(n)e^{10n^2\pi^2t}\sin n\pi+\sum\limits_{n=0}^\infty C_2(n)e^{10n^2\pi^2t}\cos n\pi=\sum\limits_{n=0}^\infty C_1(n)e^{10n^2\pi^2t}\sin n\pi+\sum\limits_{n=0}^\infty C_2(n)e^{10n^2\pi^2t}\cos n\pi$
$2\sum\limits_{n=0}^\infty C_1(n)e^{10n^2\pi^2t}\sin n\pi=0$
$C_1(n)=0$
$\therefore u(x,t)=\sum\limits_{n=0}^\infty C_2(n)e^{10n^2\pi^2t}\cos n\pi x$
$u_x(x,t)=-\sum\limits_{n=0}^\infty n\pi C_2(n)e^{10n^2\pi^2t}\sin n\pi x$
But $u_x(-1,t)\neq u_x(1,t)$
