# Evaluating (Analytical solution) heat equation in Mathematica [closed]

I want to find the analytical solution of the following PDE in Mathematica

$\frac{\partial u}{\partial t} = D_1\frac{\partial^2 u}{\partial x^2} - D_2 u$,

with inital condition $u(x,0) =u_0$ and

boundary conditions $u(-t, t) =u_1, u(k-t,t)=u_2$,

where $D_1, D_2, u_0, u_1, u_2$ and $k$ are constants.

## closed as off-topic by MarcoB, Sascha, RunnyKine, Cassini, corey979Jan 18 '17 at 18:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, Sascha, RunnyKine, Cassini, corey979
If this question can be reworded to fit the rules in the help center, please edit the question.

• You must have previously assigned a value to one of your variable. Evaluate Clear[u, x, t], or restart the kernel, and everything will work fine. – MarcoB Jan 18 '17 at 17:22
• I restarted the kernel, it works fine. Thank you MarcoB. – Tapan Jan 18 '17 at 21:25

eqn = D[u[x, t], t] == D[u[x, t], {x, 2}];