Solution (source code)

= Solution

Under a Cartesian frame change $B'_i=R_{ik}B_k$, where $R$ is an <orthogonal matrix>. Orthogonality gives $B'_kB'_k=B_kB_k$ and $R_{ik}R_{j\ell}\delta_{k\ell}=\delta_{ij}$. Therefore
$$
\alpha B'_iB'_j+\beta|\mathbf B'|^2\delta_{ij}=R_{ik}R_{j\ell}T_{k\ell},
$$
which is the <tensor component transformation law>. Also $T_{ij}=T_{ji}$ directly, proving that it is a symmetric <Cartesian second-rank tensor> for every choice of the two scalars.

For $\mathbf B\ne0$, the direction of $\mathbf B$ is an <eigenvector> with <eigenvalue> $(\alpha+\beta)|\mathbf B|^2$. Every vector perpendicular to $\mathbf B$ is an <eigenvector> with <eigenvalue> $\beta|\mathbf B|^2$, a two-dimensional <eigenspace>. If $\alpha=0$, these eigenvalues coincide and every nonzero vector is an eigenvector. If $\mathbf B=0$, the <tensor> is zero and again every nonzero vector is an eigenvector, now with eigenvalue zero.

For the position-dependent field with zero <divergence>, the <product rule> gives
$$
\partial_jT_{ij}=\alpha B_j\partial_jB_i+2\beta B_k\partial_iB_k.
$$
Contraction of the two <Levi-Civita symbols> in the <curl> and <cross product> gives
$$
[(\nabla\times\mathbf B)\times\mathbf B]_i=B_j\partial_jB_i-B_k\partial_iB_k.
$$
Consequently
$$
\boxed{\alpha=1,\qquad\beta=-\frac12},\qquad T_{ij}=B_iB_j-\frac12|\mathbf B|^2\delta_{ij}.
$$
These constants give the magnetic part of the <Maxwell stress tensor>, with its physical prefactor suppressed. They are forced if the identity is to hold for every divergence-free field: $\mathbf B=(y,0,0)$ forces $2\beta=-1$; at the origin $\mathbf B=(y,1,0)$ then forces $\alpha=1$.

Apply the <divergence theorem> separately to each component:
$$
\int_V[(\nabla\times\mathbf B)\times\mathbf B]_i\,dV=\int_S T_{ij}n_j\,dS.
$$
Since the whole vector field vanishes on $S$, all components of $T$ vanish there, and hence \b[the vector volume integral is zero]. The argument assumes a differentiable field and a boundary for which the <divergence theorem> applies.