0
$\begingroup$

I am trying to solve the 1D Diffusion equation for a sigmoidal function. However I cannot the expression of the solution

Dz = 0.5;
eqn = D[u[x, t], t] == Dz*D[u[x, t], {x, 2}];
bc = {u[Infinity, t] == 1, u[-Infinity, t] == 0};
ic = {u[x, 0] == 1/(1 + Exp[-x])};
dsol = DSolve[{eqn, bc, ic}, u, {x, t}];

Am I missing certain specifications in DSolve ?

$\endgroup$
1
$\begingroup$

Mathematica cannot handle Infinity as boundary condition.

Try numerical solution with suitable inf

Dz = 1/2;
inf = 10;
eqn = D[u[x, t], t] == Dz*D[u[x, t], {x, 2}];
bc = {u[inf, t] == 1, u[-inf, t] == 0};
ic = {u[x, 0] == 1/(1 + Exp[-x])};
U = NDSolveValue[{eqn, bc, ic}, u, {x, -inf, inf}, {t, 0, 1}]
Plot3D[U[x, t], {x, -inf, inf}, {t, 0, 1}]

enter image description here

$\endgroup$
  • $\begingroup$ But I want the explicit expression of the solution as function of x and t. $\endgroup$ – Guest1 Apr 25 at 11:25
  • $\begingroup$ Sorry I could only evaluate the numerical solution as interpolation function U[x,t] $\endgroup$ – Ulrich Neumann Apr 25 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.