Linear transformation that does this I am looking for a linear transformation that transforms 
$$ \sum_{i=1}^3 \frac{\partial^2}{\partial x_i^2} +\Big( b_1 (x_1-x_2)^2+ b_2 (x_2-x_3)^2+b_3(x_3-x_1)^2 \Big)$$
into something that looks like this 
$$ \sum_{i=1}^3  a_i \frac{\partial^2}{\partial y_i^2}+ \Big( \hat{b}_1 (y_1-y_2)^2+ \hat{b}_2 (y_2-y_3)^2+\hat{b}_3(y_3-y_1)^2 \Big)$$
So again, I am looking for a matrix A sucht that $y=Ax$. I thought about using PCA but I did not succeed. Also, I do not know how to transform the Laplacian.
I guess an easy description of how to solve this problem would be totally sufficient.
 A: Suppose such an $A$ exists. Let's first look at the 2nd order part. First, by the chain rule,
$$
 \frac{\partial}{\partial x_i} = \sum_j \frac{\partial y_j}{\partial x_i} \frac{\partial}{\partial y_j} = \sum_j \frac{\partial}{\partial x_i}\left(\sum_k A_{kj}x_k \right)\frac{\partial}{\partial y_j} = \sum_j \left(\sum_k A_{kj}\delta_{ik} \right)\frac{\partial}{\partial y_j} = \sum_j A_{ij}\frac{\partial}{\partial y_j},
$$
so that
$$
 \sum_{ij} \delta_{ij}\frac{\partial}{\partial x_i}\frac{\partial}{\partial x_j} = \sum_{ij}\delta_{ij} \left(\sum_k A_{ik}\frac{\partial}{\partial y_k}\right)\left(\sum_l A_{jl}\frac{\partial}{\partial y_l}\right) = \sum_{kl} A_{ik}A_{il}\frac{\partial}{\partial y_k}\frac{\partial}{\partial y_l} = \sum_{kl} (A^T A)_{kl}\frac{\partial}{\partial y_k}\frac{\partial}{\partial y_l}.
$$
Setting highest order terms equal, we therefore have that
$$
 \sum_{n=1}^3 a_n \frac{\partial^2}{\partial y_n^2} = \sum_{kl} (A^T A)_{kl}\frac{\partial}{\partial y_k}\frac{\partial}{\partial y_l},
$$
i.e., that
$$
 A^T A = \begin{pmatrix} a_1 & 0 & 0 \\ 0 & a_2 & 0 \\ 0 & 0 & a_3 \end{pmatrix}.
$$
Thus, necessarily, $a_1 \geq 0$, $a_2 \geq 0$, $a_3 \geq 0$, and the columns $A_k$ of $A$ are orthogonal with $\|A_k\| = \sqrt{a_k}$. In other words, $A = VP$, where $V$ is any orthogonal matrix and $P = \operatorname{diag}(\sqrt{a_1},\sqrt{a_2},\sqrt{a_3})$. In particular, the only unknown left is $V$.
Having taken care of the 2nd order part, let's look at the 0th order part; for simplicity, let's assume, in fact, that each $a_n > 0$. First, observe that
$$
 \begin{pmatrix} x_1 - x_2 \\ x_2 - x_3 \\ x_3 - x_1 \end{pmatrix} = W \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}, \quad W = \begin{pmatrix} 1 & -1 & 0 \\ 0 & 1 & -1\\ -1 & 0 & 1 \end{pmatrix},
$$
and hence that
$$
 b_1(x_1-x_2)^2 + b_2(x_2-x_3)^2 + b_3(x_3-x_1)^2 = x^T W^T B W x, \quad B = \operatorname{diag}(b_1,b_2,b_3),\\
\hat{b}_1(y_1-y_2)^2 + \hat{b}_2(y_2-y_3)^2 + b_3(y_3-y_1)^2 = y^T W^T \hat{B} W y, \quad \hat{B} = \operatorname{diag}(\hat{b}_1,\hat{b}_2,\hat{b}_3).
$$
Thus, setting 0th order parts equal, we have that
$$
 x^T W^T B W x = y^T W^T \hat{B} W y = x^T A^T W^T \hat{B} W A x = x^T P V^T W^T \hat{B} W V P x;
$$
since two quadratic forms are equal if and only if their associated bilinear forms are equal, it therefore follows that
$$
 W^T B W = P V^T W^T \hat{B} W V P,
$$
or equivalently, that
$$
 V^T W^T \hat{B} W V = P^{-1} W^T B W P^{-1}.
$$
So, to sum up, if $A$ exists, then $A = VP$, where $P = \operatorname{diag}(\sqrt{a_1},\sqrt{a_2},\sqrt{a_3})$, and where $V$ is an orthogonal matrix such that
$$
 V^T W^T \hat{B} W V = P^{-1} W^T B W P^{-1},
$$
where
$$
 B = \operatorname{diag}(b_1,b_2,b_3),\quad \hat{B} = \operatorname{diag}(\hat{b}_1,\hat{b}_2,\hat{b}_3), \quad W = \begin{pmatrix} 1 & -1 & 0 \\ 0 & 1 & -1\\ -1 & 0 & 1 \end{pmatrix}.
$$
EDIT: So, when does $A = VP$ exist? Observe:


*

*$P$ can only be constructed if $a_n \geq 0$ for $n=1,2,3$.

*In the case that $a_n \neq 0$ for $n=1,2,3$, $V$ must be an orthogonal matrix such that $V^T W^T \hat{B} W V = P^{-1} W^T B W P^{-1}$, where $P = \operatorname{diag}(\sqrt{a_1},\sqrt{a_2},\sqrt{a_3})$. Since $W^T \hat{B} W$ and $P^{-1} W^T B W P^{-1}$ are symmetric matrices, $W$ exists if and only if $W^T \hat{B} W$ and $P^{-1} W^T B W P^{-1}$ have the same eigenvalues with the same multiplicities.


Since all the arguments above are essentially reversible, you can check, at least in the case that $a_n \neq 0$ for $n=1,2,3$, that $A$ exists if and only if $a_n > 0$ for $n=1,2,3$ and $W^T \hat{B} W$ and $P^{-1} W^T B W P^{-1}$ have the same eigenvalues with the same multiplicities (i.e., are similar), where
$$
 P = \operatorname{diag}(\sqrt{a_1},\sqrt{a_2},\sqrt{a_3}), \quad B = \operatorname{diag}(b_1,b_2,b_3),\quad \hat{B} = \operatorname{diag}(\hat{b}_1,\hat{b}_2,\hat{b}_3), \quad W = \begin{pmatrix} 1 & -1 & 0 \\ 0 & 1 & -1\\ -1 & 0 & 1 \end{pmatrix}.
$$
In that case, $A = VP$, where $P$ is as above, and $V$ is any orthogonal matrix such that
$$
 V^T W^T \hat{B} W V = P^{-1} W^T B W P^{-1}.
$$
For example, since $W^T \hat{B} W$ and $P^{-1} W^T B W P^{-1}$ are symmetric matrices with the same eigenvalues, once can find a diagonal matrix $\Lambda$ and orthogonal matrices $R$ and $S$ such 
$$
 W^T \hat{B} W = R^T \Lambda R, \quad P^{-1} W^T B W P^{-1} = S^T \Lambda S;
$$
then $V = R^T S$ does the trick.
