Consider the standard weak form of the Poisson equation with coefficient $\alpha$: \begin{equation} \int_\Omega \dfrac{\partial v}{\partial x} \dfrac{ \partial \left( \alpha u \right) }{\partial x} = \int_\Omega v f \end{equation} If $\alpha$ is constant it can be dragged from inside the partial derivative and one can write this: \begin{equation} \int_\Omega \alpha \dfrac{\partial v}{\partial x} \dfrac{ \partial u }{\partial x} = \int_\Omega v f \end{equation} but I also find that if $\alpha$ is a function of $x$ i.e. $\alpha:=\alpha(x)$ we still drag the $\alpha$ coefficient outside the partial derivative inside the weak from as: \begin{equation} \int_\Omega \dfrac{\partial v}{\partial x} \dfrac{ \partial \left( \alpha(x) u \right) }{\partial x} ?= \int_\Omega \alpha(x) \dfrac{\partial v}{\partial x} \dfrac{ \partial u }{\partial x} = \int_\Omega v f \end{equation} Is this valid? I see that many fem tutorials do this and proceed with discritiziation as normal


2 Answers 2


The Poisson equation with variable coefficient reads $$ - \nabla \cdot (\alpha \nabla u) = f. $$ After the usual integration by parts, the weak form is given as $$ \int_\Omega \alpha(x) \frac{\partial v}{\partial x} \frac{\partial u}{\partial x}\ \mathrm{d}x = \int_\Omega vf\ \mathrm{d}x. $$ For an implementation of this problem, I would refer you to step 5 of the deal.II tutorials.

  • $\begingroup$ Thank you. I even saw step 5 before asking this but I still didn't pay attention. The question kinda still stands: What If I ended up with a problem that had the $\alpha$ inside the derivative operator? What if I had something like \int_{\Omega} \dfrac{\partial v}{\partial x} \dfrac{\partial \alpha u}{\partial x}? $\endgroup$ Commented Jan 18 at 10:23
  • 1
    $\begingroup$ Then I think you would need to apply the product rule $\dfrac{\partial (\alpha u)}{\partial x} = \alpha \dfrac{\partial u}{\partial x} + u \dfrac{\partial \alpha}{\partial x}$ $\endgroup$ Commented Jan 18 at 11:38

@julianroth already gave the right answer, namely that the equation is typically of the form where there is only one derivative on the coefficient. The situation would be more complicated if the equation had been $$ -\Delta (\alpha u) = f, $$ but this is not typically the case and this answer is simply to say why this is so: In most physical situations, the Poisson equation appears because something (thermal energy, mass, concentrations, ...) diffuses and the flux is proportional to the negative gradient, i.e., you have $\mathbf{j} = -\alpha\nabla u$. The flux is not the gradient of a quantity proportional to $u$, i.e., it is not $\mathbf{j} = -\nabla (\alpha u)$. The Poisson equation results from the conservation property of the thing that diffuses, and then implies that $\text{div} \ \mathbf j = f$.

There are cases where you end up with a coefficient on the inside, typically of the form $$ -\nabla \cdot \alpha\nabla (\beta u) = f. $$ This typically happens if $u$ is not the conserved quantity, but $\beta u$ is. An example is when you consider modeling the temperature $T$ of a body. In that case, the temperature $T$ is not the conserved quantity. Rather, it is the thermal energy whose density is $e=\rho C_p T$. So the equation would then be $$ -\nabla \cdot (\alpha \nabla [\rho C_p T]) = f, $$ and both $\rho$ and $C_p$ can be spatially variable (and, for real materials) also nonlinearly depend on $T$. In practice, the way this is best modeled then is not to consider $T$ as the variable you try to solve for, but $e$, and then you're back at the equation $$ -\nabla \cdot (\alpha \nabla e) = f. $$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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