Jacobian
Jacobian
Revision C
By Tom Irvine
Email: [email protected]
Introduction
The Jacobian of a function describes the orientation of a tangent plane to the function at a
given point.
Consider a function F given by m real-valued component functions:
y1(x1, ... , xn), ... , ym(x1 , ... , xn)
y1 y1
x
x n
1
J (1)
y m
y m
x1 x n
Example
m x c x k x F( t ) (2)
x (c / m) x (k / m) x (F / m) (3)
Let
y x
y x
1
The second-order equation is thus transformed into two first-order equations.
y 0 1 x
y k / m c / m x (5)
The Jacobian is
0 1
J (6)
k / m c / m
Other Applications
Reference
1. T. Irvine, The State Space Method for Solving Shock and Vibration Problems,
Revision A, Vibrationdata, 2005.
2
APPENDIX A
s
Node 1
s=1
y Node 2
Node 3
Node 4
r = -1 s = -1
r=1
z x
Figure A-1.
Note that
-1 < r < +1
-1 < s < +1
3
The coordinate interpolation is
x
1
1 r 1 sx1 1 1 r 1 sx 2 1 1 r 1 sx3 1 1 r 1 sx 4
4 4 4 4
(A-1)
y
1
1 r 1 sy1 1 1 r 1 sy2 1 1 r 1 sy3 1 1 r 1 sy4
4 4 4 4
(A-2)
x 1
1 s x1 1 s x 2 1 s x3 1 s x 4
1 1 1
(A-3)
r 4 4 4 4
x 1
1 r x1 1 r x 2 1 r x 3 1 r x 4
1 1 1
(A-4)
s 4 4 4 4
y 1
1 s y1 1 s y 2 1 s y 3 1 s y 4
1 1 1
(A-5)
r 4 4 4 4
y 1
1 r x1 1 r x 2 1 r x 3 1 r x 4
1 1 1
(A-6)
s 4 4 4 4
x y
r r
r x
(A-7)
x y
r s s y
4
The Jacobian matrix J is
x y
r r
J (A-8)
x y
s s
By substitution,
J
[(1+ s)x1 - (1 + s)x2 - (1 - s)x3 + (1 - s)x4 ] / 4 [(1+ s)y1 - (1 + s)y2 - (1 - s)y3 + (1 - s)y4 ] / 4
[(1+ r)x1 + (1 - r)x2 - (1 - r)x3 - (1 + r)x4 ] / 4 [(1+ r)y1 + (1 - r)y2 - (1 - r)y3 - (1 + r)y4 ] / 4
(A-9)
5
The inverse of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)
(A-16)
7
The inverse Jacobian at each of the four nodes is
Ĵ 1
(A-17)
Ĵ 2
(A-18)
Ĵ 3
- (2y3 - 2y 2 ) - (2y4 - 2y 3 )
1
(x 3 - x 2 )y 4 (x 2 - x 4 )y3 (x 4 - x 3 )y 2
2x 3 - 2x 2 2x 4 - 2x 3
(A-19)
Ĵ 4
(A-20)
8
Note that the Jacobian and its inverse should be evaluated at each node. Furthermore, at
node i,
r
x 1
J i , at r r i and s s j
y s
(A-21)
The determinant of the Jacobian is found via wxMaxima.
a(r,s):=((1+s)*x1-(1+s)*x2+(-(1-s))*x3+(1-s)*x4)/4;
b(r,s):=((1+s)*y1-(1+s)*y2+(-(1-s))*y3+(1-s)*y4)/4;
c(r,s):=((1+r)*x1+(1-r)*x2+(-(1-r))*x3+(-(1+r))*x4)/4;
d(r,s):=((1+r)*y1+(1-r)*y2+(-(1-r))*y3+(-(1+r))*y4)/4;
ratsimp(determinant(matrix([a(r,s),b(r,s)],[c(r,s),d(r,s)])));
(A-22)
det J =
-(((s-1)*x3+(-s-r)*x2+(r+1)*x1)*y4+
((1-s)*x4+(r-1)*x2+(s-r)*x1)*y3+((s+r)*x4+(1-r)*x3+(-s-1)*x1)*y2+
((-r-1)*x4+(r-s)*x3+(s+1)*x2)*y1)/8
(A-23)
Equation (A-23) is left in wxMaxima format because it is convenient to copy and paste
into Matlab.
J(r,s):=matrix([a(r,s),b(r,s)],[c(r,s),d(r,s)]);
detJ(r,s):=ratsimp(determinant(matrix([a(r,s),b(r,s)],[c(r,s),d(r,s)])));
Jinv(r,s):=invert(matrix([a(r,s),b(r,s)],[c(r,s),d(r,s)]));