Skip to main content

If we have two vectors, a$a$ and b$b$, how can I make Jacobian matrix automatically in Mathematica?

$$ a=\left( \begin{array}{c} \text{x1}^3+2\text{x2}^2 \\ 3\text{x1}^4+7\text{x2} \end{array} \right);b=\left( \begin{array}{c} \text{x1} \\ \text{x2} \end{array} \right);J=\left( \begin{array}{cc} \frac{\partial \left(\text{x1}^3+2\text{x2}^2\right)}{\partial \text{x1}} & \frac{\partial \left(\text{x1}^3+2\text{x2}^2\right)}{\partial \text{x2}} \\ \frac{\partial \left(3\text{x1}^4+7\text{x2}\right)}{\partial \text{x1}} & \frac{\partial \left(3\text{x1}^4+7\text{x2}\right)}{\partial \text{x2}} \end{array} \right); $$$$ a=\left( \begin{array}{c} x_1^3+2x_2^2 \\ 3x_1^4+7x_2 \end{array} \right);b=\left( \begin{array}{c} x_1 \\ x_2 \end{array} \right);J=\left( \begin{array}{cc} \frac{\partial \left(x_1^3+2x_2^2\right)}{\partial x_1} & \frac{\partial \left(x_1^3+2x_2^2\right)}{\partial x_2} \\ \frac{\partial \left(3x_1^4+7x_2\right)}{\partial x_1} & \frac{\partial \left(3x_1^4+7x_2\right)}{\partial x_2} \end{array} \right); $$

If we have two vectors, a and b, how can I make Jacobian matrix automatically in Mathematica?

$$ a=\left( \begin{array}{c} \text{x1}^3+2\text{x2}^2 \\ 3\text{x1}^4+7\text{x2} \end{array} \right);b=\left( \begin{array}{c} \text{x1} \\ \text{x2} \end{array} \right);J=\left( \begin{array}{cc} \frac{\partial \left(\text{x1}^3+2\text{x2}^2\right)}{\partial \text{x1}} & \frac{\partial \left(\text{x1}^3+2\text{x2}^2\right)}{\partial \text{x2}} \\ \frac{\partial \left(3\text{x1}^4+7\text{x2}\right)}{\partial \text{x1}} & \frac{\partial \left(3\text{x1}^4+7\text{x2}\right)}{\partial \text{x2}} \end{array} \right); $$

If we have two vectors, $a$ and $b$, how can I make Jacobian matrix automatically in Mathematica?

$$ a=\left( \begin{array}{c} x_1^3+2x_2^2 \\ 3x_1^4+7x_2 \end{array} \right);b=\left( \begin{array}{c} x_1 \\ x_2 \end{array} \right);J=\left( \begin{array}{cc} \frac{\partial \left(x_1^3+2x_2^2\right)}{\partial x_1} & \frac{\partial \left(x_1^3+2x_2^2\right)}{\partial x_2} \\ \frac{\partial \left(3x_1^4+7x_2\right)}{\partial x_1} & \frac{\partial \left(3x_1^4+7x_2\right)}{\partial x_2} \end{array} \right); $$

Tweeted twitter.com/#!/StackMma/status/204078019147595776
Source Link
George Mills
  • 953
  • 1
  • 9
  • 14

How to make Jacobian automatically in Mathematica

If we have two vectors, a and b, how can I make Jacobian matrix automatically in Mathematica?

$$ a=\left( \begin{array}{c} \text{x1}^3+2\text{x2}^2 \\ 3\text{x1}^4+7\text{x2} \end{array} \right);b=\left( \begin{array}{c} \text{x1} \\ \text{x2} \end{array} \right);J=\left( \begin{array}{cc} \frac{\partial \left(\text{x1}^3+2\text{x2}^2\right)}{\partial \text{x1}} & \frac{\partial \left(\text{x1}^3+2\text{x2}^2\right)}{\partial \text{x2}} \\ \frac{\partial \left(3\text{x1}^4+7\text{x2}\right)}{\partial \text{x1}} & \frac{\partial \left(3\text{x1}^4+7\text{x2}\right)}{\partial \text{x2}} \end{array} \right); $$