Undo a change of variables

481 Views Asked by At

While I was solving one problem, with natural variables $(v,x,y,z)$ and I make change to $(\varphi,\chi,\psi,\omega)$ defined as

$\varphi=\arctan\big(\frac{Ax-y}{z}\big) \qquad \psi=\frac{(y-Ax)^2+z^2}{2A} \qquad \chi=\frac{y}{A} \qquad \text{and} \qquad \omega=z-Av $

For continue solving it, I need to undo this change, in order to get $v=v(\varphi,\chi,\psi,\omega), \quad x=x(\varphi,\chi,\psi,\omega),\quad y=y(\varphi,\chi,\psi,\omega), \quad z=z(\varphi,\chi,\psi,\omega)$

And I only know how to obtain $y=A\chi$.

So, my question is more general. How to invert a change of variables from $\{x_k\}$ to $\{y_k\}$ defined as $y_i=f(x_k)$

My guess is that you'll need the inverse function

2

There are 2 best solutions below

1
On BEST ANSWER

Yes, that's right. You can think of a change of variables as a function

$$\langle y_1, \ldots, y_n\rangle = F(x_1,\ldots,x_n)$$

transforming your $n$ original variables into $n$ new variables. To be a valid change of variables, this transformation must be reversible; that is to say, the Jacobian determinant of $F$ must be nonzero. In such a case, the inverse function theorem tells us that an inverse $F^{-1}$ for $F$ exists. (Therefore, solving for your old variables uniquely in terms of the new is possible in principle.)


For you in this case, I would simply solve your equations in reverse. The change of variables describes a right triangle in which the opposite side has length $k\equiv Ax-y$, the adjacent side has length $z$, the hypotenuse has length $2A\psi$, and the adjacent angle is $\varphi$.

Given this triangle and your other formulas, we find through trigonometry that:

$$\begin{align*} y &= A\chi\\ z &= 2A\psi \cos(\varphi)\\ k &\equiv Ax -y = 2A\psi\sin(\varphi)\\ x &= (k + y)/A = 2\psi \sin(\varphi) + \chi\\ v &= (z - \omega)/A = 2\psi\cos(\varphi) - \omega/A\\ \end{align*}$$

which gives a formula for your original variables completely in terms of your new variables.

0
On

In this case, you can use some trig identities about $\sin(\arctan\bullet)$ and $\cos(\arctan \bullet)$ and will get (if $z\neq 0$) \begin{align*} \sqrt{\psi}\sin \varphi &= \frac{Ax - y}{\sqrt{2A}}\operatorname{sign}(z) \\ \sqrt{\psi}\cos \varphi &= \frac{z}{\sqrt{2A}}\operatorname{sign}(z) \\ \end{align*} where $\operatorname{sign}$ is the sign function. From there it's just a linear system to solve.

(Please double-check on what I've calculated)


Concerning your general question: I think there is no general way to find and inverse function, but you should always be able to check whether an inverse function exists via the inverse function theorem. Essentially it requires to calculate the Jacobian and checking if the Jacobian is invertible. At each point, where the Jacobian is invertible, the function itself has a local inverse (assuming the Jacobian was continuous).