How to solve the Fick's partial differential equation? Consider a finite diffusion in which the concentration profiles at different times are like

How to solve the differential equation as opposed to the common solution for semi-infinite/infinite condition boundary?
My question is the solution of the differential equation
$$\frac{\partial c}{\partial t} = D \frac{\partial^2 c}{\partial x^2}$$
with the initial boundary condition of
$$c(0,t)=A$$
different when the boundary condition is changed from
$$c(\infty,t)=0$$
to
$$c(x=l,t)=0$$
 A: The graph you have presented is the solution to the following problem:
$$\frac{\partial u}{\partial t}=D\frac{\partial^2u}{\partial x^2}$$subject to the initial condition 
$u=0$ at t = 0 
and the boundary conditions 
$u=1$ at x = 0 
and 
$\frac{\partial u}{\partial x}=0$ at x = L
The first step in solving this is to write $$u(x,t)=1-U(t,x)$$where U is the solution to the following set of equations:
$$\frac{\partial U}{\partial t}=D\frac{\partial^2U}{\partial x^2}$$subject to the initial condition 
$U=1$ at t = 0 
and the boundary conditions 
$U=0$ at x = 0 
and 
$\frac{\partial U}{\partial x}=0$ at x = L
The next step in obtaining a solution is expressing U(t,x) in the form of a product of a function of t and a function of x:
$$U(t,x)=T(t)X(x)$$
I'm not going to continue with the rest of the solution because you can find it in any book covering partial differential equations as well as in virtually all books on heat and mass transfer, such as Transport Phenomena by Bird, Stewart, and Lightfoot.
