I want to solve a PDE as:
$\frac{\partial u}{\partial t}=\frac{\partial u}{\partial x}$, with conditions: $u(x,0)=sin(\pi cos(x))$ and $u(x+2\pi,t)=u(x,t)$. I have solved it by hand and obtained: $u(x,t)=sin(\pi cos(x+t))$. I would like to solve it both numerically and analytically by Mathematica. I have written:
NDSolve[{D[u[t, x], t] == D[u[t, x], x], u[x, 0] == Sin[Pi Cos[x]],
u[x, t] == u[x + 2 Pi, t]}, u, {t, 0, 10}, {x, 0, 5}].
What's the problem?
DSolve[{D[u[x, t], t] == D[u[x, t], x], u[x, 0] == Sin[\[Pi] Cos[x]]}, u, {x, t}]
, which gives{{u -> Function[{x, t}, Sin[\[Pi] Cos[t + x]]]}}
in version 10.3. $\endgroup$