Mixed form Poisson with in-homogeneous conductivity

Hi,

What is the correct method for including spatially varying conductivity (i.e. multiple materials), \kappa(\boldsymbol{x}), in the mixed form of the Poisson equation?

In particular, in my derivation below I am unsure about the \int (\nabla\cdot\kappa(\boldsymbol{x})\tau)u\,d\Omega term in Equation (6). Is it correct to include \kappa within the divergence operator? This is currently solving but I want to make sure I am not missing something.

Strong form

\begin{aligned} \nabla\cdot (\kappa(\boldsymbol{x})\nabla u) &= -f \;\;\;\;\;\;\;\;\;\;\;\;\;(1) \\ u &= u_D\; \textrm{on}\; \Gamma_D\;\;\;(2) \\ \kappa(\boldsymbol{x})\nabla u\cdot n &= g \; \textrm{on}\; \Gamma_N \;\;\;\;\;\;(3) \end{aligned}

Converting to mixed form:

\begin{aligned} q - \kappa(\boldsymbol{x})\nabla u &= 0\;\;\;\;\;\;(4)\\ \nabla\cdot q &= -f\;\;\;(5) \end{aligned}

Weak form (after integration by parts)
Find q, u \in W = Q \times U , with test functions: \tau, v \in W such that:

\begin{aligned} a &= \int q\cdot \tau\,d\Omega + \int (\nabla\cdot q)v \,d\Omega + \int (\nabla\cdot\kappa(\boldsymbol{x})\tau)u\,d\Omega \;\;\;(6) \\ L &= \int u_D \kappa(\boldsymbol{x})\tau \cdot n\,ds - \int fv\,d\Omega \;\;\;(7) \end{aligned}

A similar question was posted a few years ago, but an explicit solution was not provided.

Thanks!

It is more common to write

\begin{aligned} \kappa(\mathbf{x})^{-1} q -\nabla u &= 0\;\;\;\;\;\;(4)\\ \nabla\cdot q &= -f\;\;\;(5) \end{aligned}

so that you get the nicely symmetric:

\begin{aligned} a &= \int \kappa(\mathbf{x})^{-1} q\cdot \tau\,d\Omega + \int (\nabla\cdot q)v \,d\Omega + \int (\nabla\cdot \tau)u\,d\Omega \\ L &= \int u_D\, \tau \cdot n\,ds - \int fv\,d\Omega\end{aligned}

Thanks - this looks much cleaner!