I am given the diffusion equation including the external forces as follows: $$\frac{\partial c}{\partial t} = D\frac{\partial^2 c}{\partial x^2} - \frac{F}{\gamma} \frac{\partial c}{\partial x}$$

First, I have to find the steady state solution for the case of gravity $(0 < z < \infty)$ and then I have to find the whole solution of the equation. I tried, but couldn't find it. For the first question, I modified the equation as: $$ \frac{\partial^2c}{\partial z^2} = \frac{1}{D \gamma} F \frac{\partial c}{\partial z}$$

Then I fill in the $F$ as: $F = mg = \rho V g = \rho A z g$ with $A$ the area formed by values of $x$ and $y$. Including this in the equation gives then: $$ \frac{\partial^2 c}{\partial z^2} = \frac{\rho A g}{D \gamma} z \frac{\partial c}{\partial z} = C z \frac{\partial c}{\partial z}$$

I couldn't find a solution for this. Is it maybe wrong? For the second question, I have to use the usual (initial) conditions. Thanks for your help.


Firstly, it's important to note that problems that involve PDEs/ODEs cannot be solved without relevant boundary conditions/initial values. These have not been provided by the OP.

The last equation:

$$\frac{\partial^2 c}{\partial z^2}= C z \frac{\partial c}{\partial z}$$

isn't really a partial differential equation and can be rewritten as the ODE:



$$\dot{c}=u \Rightarrow\frac{\mathbf{d}\dot{c}}{\mathbf{d}z}=\ddot{c}=\dot{u}$$

Inserting we get:

$$\dot{u}=Cz u$$

Separate variables:


Integrate both sides:

$$\ln u=\frac12 Cz^2+c_1$$

With $c_1$ the first integration constant.

$$u=\exp{(\frac12 Cz^2+c_1)}$$ With: $u=\dot{c}$:

$$\dot{c}=\frac{\mathbf{d}c}{\mathbf{d}z}=\exp{(\frac12 Cz^2+c_1)}$$

Integrate both sides:

$$\int {d}c=\int \mathbf{d}z\exp{(\frac12 Cz^2+c_1)}$$ $$=\exp{c_1}\int\mathbf{d}z\exp{(\frac12 Cz^2)}$$

I've used Wolframalpha for this integration: $$c=\exp c_1\Big[c_2+\sqrt{\frac{\pi}{2C}}erfi\Big(\sqrt\frac{C}{2}x\Big)\Big]$$

where $erfi$ is the error function.

Regards the PDE: $$\frac{\partial c}{\partial t} = D\frac{\partial^2 c}{\partial x^2} - \frac{F}{\gamma} \frac{\partial c}{\partial x}$$

We're looking for a function $c(x,t)$ and assume ('Ansatz') it to be of the form:


where $X$ is a function that depends on $x$ only and $T$ a function that depends on $t$ only. Now insert into the PDE:


Divide both sides by $X(x)T(t)$, so we get:


Because one side is a function of $t$ only and the other a function of $x$ only, both sides must be equal to a Real number, say $-m^2$, known as the separation constant:


So the PDE splits into two ODEs:




$(1)$ solves easily to:


Rearranging $(2)$ slightly:


This a linear second-order homogenous ODE. Solutions can be found here.

You will also need the boundary conditions and an initial condition $(c(x,0))$. These then should allow you to determine $m$.

  • $\begingroup$ The OP stated in his question that he was tasked to obtain only the steady state solution, which is the solution to the ODE in the first part of the answer. I believe you should edit the answer to keep only the part relevant to the OP's question. $\endgroup$ – user137661 Apr 22 '19 at 22:38

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.