Deriving the weak form for linear elasticity equation Consider the BVP from linear elasticity:
\begin{align*}
-\mu \Delta\textbf{u} - (\lambda + \mu) \nabla(\nabla \cdot \textbf{u})) &= \textbf{f}, \text{ in } \Omega \subset\mathbb{R}^2, \\
\textbf{u} &= \textbf{g}_D, \text{ on } \partial \Omega.
\end{align*}
First, we multiply by a test function and integrate both sides,
\begin{align*}
\int_{\Omega}( -\mu \textbf{v} \Delta \textbf{u} - (\lambda + \mu) \textbf{v} \nabla (\nabla\cdot \textbf{u})))dX = \int_{\Omega} \textbf{v}\textbf{f} dX.
\end{align*}
Now I am not sure what the best way to proceed is. I think I should break everything up into components, but I am not confident. I think I will end up using the divergence theorem (twice?). Would anyone be able to help me work out the details? I think the $\Delta \textbf{u}$ term should be simple, but I have no clue what identities to use for $\nabla (\nabla \cdot \textbf{u})$. I appreciate any help.
 A: Edit: First equation it should be $\nabla b$ and not $\nabla v$. And it not possible to edit just one letter. So the edit.
Let us start with some background in tensor calculus.
For arbitrary domain $D$, tensor $A_{ij}$ and vector $b_i$ the following Green's theorem holds:
$$\int_D \mathrm{div} A \cdot b \,\mathrm{d}x = \int_{\partial D} (An)\cdot b \,\mathrm{d}s - \int_D A : \nabla b\,\mathrm{d}x,$$
where $n$ is the normal vector to the boundary $\partial D$ and $:$ denotes the double dot product, i.e. for tensors $C_{ij}$ and $D_{ij}$ we have
$$C : D = \sum_{i,j=1}^3 C_{ij} D_{ij}.$$
The divergence of a tensor field $A_{ij}$ is defined as the vector with components
$$(\mathrm{div} A)_i = \sum_{j=1}^3 \frac{\partial A_{ij}}{\partial x_j}$$
The gradient of a vector field $b_i$ is the tensor with components
$$(\nabla b)_{ij} = \frac{\partial b_i}{\partial x_j}.$$
Back to linear elasticity. People usually write the governing equations in the following way:
$$-\mathrm{div}\,\sigma(u) = f,$$
where the stress tensor is
$$\sigma(u) = 2 \mu \,\epsilon(u) + \lambda \,\mathrm{tr}\,\epsilon(u) I,$$
and the strain tensor is
$$\epsilon(u) = \frac12(\nabla u + \nabla u^T).$$
Then you multiply the first equation with a vectorial test function and integrate over the domain $\Omega$ to get
$$-\int_\Omega \mathrm{div}\, \sigma(u) \cdot v \,\mathrm{d}x = \int_\Omega f \cdot v \,\mathrm{d}x.$$
Next we use the Green's theorem to get
$$-\int_{\partial \Omega} \sigma(u)n \cdot v \,\mathrm{d}s + \int_\Omega \sigma(u) : \nabla v \,\mathrm{d}x = \int_\Omega f \cdot v \,\mathrm{d}x.$$
Since $\sigma$ happens to be symmetric we can equivalently write
$$-\int_{\partial \Omega} \sigma(u)n \cdot v \,\mathrm{d}s + \int_\Omega \sigma(u) : (\frac12(\nabla v + \nabla v^T)) \,\mathrm{d}x = \int_\Omega f \cdot v \,\mathrm{d}x,$$
or
$$-\int_{\partial \Omega} \sigma(u)n \cdot v \,\mathrm{d}s + \int_\Omega \sigma(u) : \epsilon(v) \,\mathrm{d}x = \int_\Omega f \cdot v \,\mathrm{d}x,$$
which is the weak formulation of linear elasticity.
