Thanks, Mariusz for solving the equation. Can you tell me what is the solution when I have initial conditions which are as follows,
u(x,0) = exp(-Ax) + a*exp(Ax) -d
I tried using NDSolve, but it did not fetch me any results again.
I used
A = 0.005;
B = 2;
c = 0.002;
b = 3;
a = 0.003;
d = 0.004;
heqn = D[u[x, t], t] == c*D[u[x, t], {x, 2}] - A*u[x, t] - B;
ic = u[x, 0] ==exp(-Ax) + a*exp(Ax)-d;
bc = {u[0, t] == 0, u[500, t] == 0};
sol = NDSolve[{heqn, ic, bc}, u, {x, 0, 1}, {t, 0, 1}]
Plot3D[u[x, t] /. sol, {x, 0, 1}, {t, 0, 1}, AxesLabel -> Automatic]
Thanks,
Vishal