Vectors and Tensors by Example Including Cartesian Tensors, Quaternions, and Matlab Examples


320 70 28MB

English Pages [367] Year 2015

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
scan 0
Scan 1
Scan 2
Scan 3
Scan 4
Scan 7
Scan
done sort of
Recommend Papers

Vectors and Tensors by Example Including Cartesian Tensors, Quaternions, and Matlab Examples

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

lnlJ'OducllOn IO Veaors and Matrices

14.

~bing

14.1 I ·I 2 1-1.3 14.4

Rouuom b\ Qua1cr111on, ROLllJOn ofa \'rtlor Ill 3-0 Sp.ice: \·cctor Ro1auon mmg Q11a1. "hu:.h \OU "ilJ t,picalh need to I.no" 111 fi.-..1-H·oar cullc:i:l' r a< t-ilhc:-r ro" Or column macrice' in \latlab. and thc:-n add or \Ubtracl them in Ma1fab. '.\lultiphing \nlon ;, mort• complirated bec.:mented b' directed line -.cgmcnh The""'' that the cnmpnn..-m' of a \C'CIOr an be "rincn in \fatlab "'ill be introduct' a \Qlar is a ph\ require three pieces Of informa1ion to complc1eh egment 1> pt oporuonal to thl' magni1ude of the 'cc:tor and the orientation ofllrl' lmc ~mmt 'l>cho,.ing that R - 1-A ) = Bin hg 1.10. The rc,uh 1"ho,.n in Fig. I.I I.

Figure I.I I R • A = 8

' t"igure 1.6 D = A

+ 8 ..- C

Ora-. the H"Ctor \llm (A + B) m hg. 1.6. The reuh i< •h I ml. The magrutudt' ofthl· \l"ctor A;, "ri11t·n a• 1A1 = .-l In Fig. J.H. the urlit •eclor i. •. "hid1 b;i, a 11ugnitude of unil\. i. in the same direcuon ,.., A. We can t~rdore ,.,.;u, the \ector A a> the magnitude of A muluplied b• th'= AsinB

which has a magnitude of unity, is in the san1c

direction as A. We can therefore write the vector A as the n1agniLudc

7

I 1om which the ratio

The uniL

AY sin B B -= =tan A~

vector A. A in the direction of A can then be written as A. A = A

A

cosB

"°lquare A, and A , and add the results to obtain Figure 1.14 A=AA.A

A}+ A_~= A2 ( cos 2 B+sin 2 B) = A2 It 01n which

Fig. 1.15 shows A Lo be Lhe vccLor su1n of A~ and A,. Thal is, A= A .~+ A,,. The vccLors A .. and A, lie along the x and y axes; therefore, we say that the vector A has been resolved into its x and y components.

A= )A; +A_~ .

1.5 Addition of Vectors by Components

·ro

illustrate the addition of vectors by con1poncnts, consider the '1·1 tor sum R =A+ B shown in Fig. J .16. By resolving A and B into x 111d rcomponents, we can write

R =A+ B = Ari + A..J + Bri + B,l'j

Ay

It n111 which

R = (A\ + B.r ) i + (A,. + B>' ) j Figure I. L5 A= A,i

+ AJ

8

Chapter 1

Addition and Subtraction of Vectors

1.6 Three-Dimensional Vectors

)'

--------------------- --

-- -- --

rite results above can readily be extended Lo three dimensions. I 1 0111 Fig. 1. J 8, the vector A is the vector sun1 A =A +A +A or, 111 I

11 1111s -

Figure l . l 6 R

9

)

'

of the unit vectors i,j, and k,

-1---.1...--X

A= A,i + 1-l, j + A,k

= (A, + /J,)i + (A,.+ B,)j

But, in Fig. 1.16, R can be wriuen as R

=R\i + R>'j.

Therefore,

rite n1agnitudcs associated with this vector sum arc shown in Fig. I 11. I 11 tenns of B and ¢ , we can write

,;.\ =Reos¢

R.t =~+Bx R.v =A.., +B>'

A . = /? sin¢ 1

A,,= AcosB These resulls arc summarized in Fig. 1.17. '-li11cc

R = JJsinB, the components in Fig. 1.19 can be writlcn as

y

''

''

Az

' ',

'' ..,.v /

A

Ax+Ay

/

------------Ay

If - ----------Figure 1.18

A = Ai+AJ'+Ak I

)

'

/

/

I / / f/

Figure 1.19 Magnitudes of the components of A

8

Chapter 1

Addition and Subtraction of Vectors

9

1.6 Three-Dimensional Vectors

y

-------------------=, ... .,-

-- --

I

___, I I I

tl1.te:;;...__ _ _ _ _...__ _._1 Figure 1. 16 R = (A,

The rcsulls above can readily be extended to Lhrcc dimensions. From Fig. 1.18, Lhc vector A is Lhe vector sun1 A = A 1 +A, + A , or, in terms of the uniL vectors i,j , and k,

I I I

_. x

+ 13,)i + (A,+

A = A, i + A, j + A, k

B>)j

The n1agnitudes associated with this vector sum arc shown in Fig. 1.19. In terms of(} and ¢,we can write

But, in Fig. J. J 6, R can be written as R = Rri + R1.j. Therefore ,

Rx=~ +J3.r

.I' =)~cos ¢

Ry= Ay+ B.v

A,. = R sin¢

A, These resu Its arc su1nmarized in Fig. J. 17.

=.11cos fJ

Since R = / lsin fJ, the cornponents in Fig. 1.19 can be written as y

--------------------

!,J1f~::::::____ -~~~~-! ,I:.___

_._i_ _

.._!_

Ax

x

Rx

''

Az

- --•I._ Bx -

-t--- - - -

i"'·

. ., . .

''

.... ....

' ',

----~

''

A;:

A

Figure 1.17 R = R) + R,j = (A. + B,. ) i + (A,. + B,, )j

,, I I

....

....

',

..y

,, ,,

/ / /

Figure l.18

A =1-li +A I J +AT k V

y

------------Ay

--

y

/

I

I

0

....

,'

/



.... ....

/

I ,' I " /

Figure l.19 Magnitudes of the components of A

8

Addition and Subtraction of Vectors

Chapter 1

9

1.6 Three-Dimensional Vectors

y

-------------------;-

--

-----

--

------

The rcsulls above can readily be extended lo three dirnensions. From Fig. 1.18, the vcclor A is the vector sun1 A = A \ + A I +A I or, in

I I

B

',

______, 1

I

I

I

I

I

I

---.J.-----'-• ·r

lenns of the unil vectors i,j, and k,

A = A, i +A, j + A,k Figure l.16 R =(A,+ JJ,)i +(A,+ 13,.)j

But, in Fig. J. 16, R can be written as R

=Rri + R>' j. Therefore,

The magnitudes associated with this vector sum arc shown in Fig. I .19. l n lcnns of (} and ¢ , we can write ~ =l~cos¢

R.~ =~+B.r

A,. = /~sin¢

R.1• = A>' + B_..

A,.= Acos8 These resu Its a rc sununarizccl in Fig. 1.17. Since R =A sin(} , the co1nponcnts in Fig. 1.19 can be written as y

---------------------

... -..,,.-

--

--

I II

______ , I I

14-- - -

I

I

I

I

I

I-

Ax

14-- - - -

~_,.I

..

Bx -

''

''

-

A-

' ',

''

',

A:

' ' ',

',,

l~x

/

Figure I .17 R =R,i + R>,j =(A,.+ B,. )i + (A>. + B.1• )j

/ /

/

/

I

I/

,,"

/

Figure 1.18 A = A) + A, j + A,k

I

------------Ay

I "

"

"

"

"

""

Figure l.19 Magnitudes of the components of A

10

Chapter 1

Addition and Subtraction of Vectors

.t\, =AsinBcos¢ A;, =A sin 8sin rjJ

The cosines of the angles a, fJ, and yin Fig. 1.20 arc called the ~Ji·ection c:osincs and arc designated by /, 111, and 11, respectively. Thus, 111 lenns of A, A" A,, and A,. ,

~ =Acos B

I

Square A.\• A,, and A,. and add the results to obtain

A.; +A~ +A; = A [sin 0 (cos rjJ +sin rjJ) + cos 2

2

2

2

2

A A

= cos a =-.!..

m =cos fl= AY

eJ

A

A.

= A 2 [ sin 2 8 + cos2 8 J =A2

n = cosr=-=A Note that 2

An alternate way of describing the vector A in three di1ncnsions is by pr~jecting the vector directly onto the x, y, and z coordinates through the angles a, fl, and y, respectively, as shown in Fig. 1.20. Thus,

=/ 1cos a

2

1 + tn + n2 = cos 2 a+ cos 2 fJ + cos 2 r

1.7 Direction Cosines

A\

A)'

= A cos fJ

A,.

= A cos r

Since, from Section 1.6, A 2 =A;+ A:+ A:2 , it follows that

12 + t11 2 + n2 = 1.

1.8 Examples

......

...... ........ ...... ....... ....

........

/

/

....··

.. .. ·· .. /

11

'•,

Example 1-1 (;ivcn the vectors A find R = A+ B .

..··•.•.

......

I I I

.......

A

...... /

/ / /

I

."

/ .:_ - - - - - - - - - - - - -I'

/

,_Y

=i -

+ 4k and B

= 3i + j -

2k,

Answer 1: The components of the given vectors arc .1-1.\ = l ' A .. = -2 ' A,.= 4, B, 3, B, = l, B,.= -2. Thus, R, =A,+ B,\ = 4, R , =A,.+ B) = - 1, R,. =A,.+ B,. = 2, so that

=

/

Figure 1.20 Definition of direction cosines

2j

R= A

+B

= 4i - j + 2k

12

Addition and Subtraction of Vectors

Answer 2: In Matlab, the vector A can be written as the following row matrix containing the components of A. A = [ 1 -2 4] Note that the components of a row vector arc separated by spaces. Similarly, the vector B can be wriucn as the following row n1atrix containing the components of B. B = r3 l -2] The su n1 or these two vectors, R, can be found by wnung R = A+ Bin Matlab as shown in Matlab Example 1- l a.

Matlab Example 1-1 b >>A= [ 1; -2; 4] A= I

-2 4

>> B B=

3 l

Matlab Example 1-la >>A=[l-24] A= I -2 4 > > B = [3 l -2] B = 3 l -2 >>R=A+B R= 4 -1 2

= (3; J; -2]

-2 >>R=A+B R=

4 -J

2 Example 1-2 Find A = IAl and B =

IBI

for the vectors in Exan1ple l-1.

Answer 1: Answer 3: In Matlab, the vector A can be written as the following colun1n matrix containing the components of A. A =[ l; -2;4] Note that the co1nponents of a column vector arc separated by semicolons. Similarly, the vector B can be written as the following column matrix containing the components of B. B = [3; 1; -2) The sum of these two vectors, R, can be found by writing R =A+ Bin Matlab as shown in Matlab Example 1-lb.

A=JA_; +A,~+A; =.Jl+4+16 =.J2i =4.5826 B = Js; + B>~ + B; =.J9+ 1+4=.Jl4.=3.7417 Answer 2:

r11

Matlab, the magnitude of the vector A can be wriuen as nor111(A) as shown in Matlab Example 1-2.

-

13

14

Chapter 1

Addition and Subtraction of Vectors

Matlab Example 1-2

Example 1-4

>>A= [1 -2 4] A= J -2 4 > > 1nagA = norn1(A) magA =

Find the direclion cosines of the vector A given in Exan1ple 1- 1.

Answer 1: I = cos a=

=

1 4.5826

r

.!:.

Answer 2: In Matlab, the direction cosines of A can be found as shown in Ma tlab Exa1nple 1-4.

3.7417 >>

Matlab Examnle 1-4

Example 1-3 Find the unit vector AA in the d irecLion of the vector A given in

>>A=( l -2 4] A=

Example 1-1.

J

Answer 1: /... =A= l i - 2 ·+ 4 k A A J2i AA = 0.2 l 82i - 0.4364 j + 0.8729k

51 51J

-2

4

> > I = A(J )/norm(A) I= 0.2182 > > m = A(2)/nonn(A)

Answer 2: In Matlab, the unit vector in the direction of A can be (ound as shown in Matlab Example L-3.

-0.4364

n=

0.8729

A=

1 -2 4 > > lambdaA = Nnorm(A)

=

0.2182 -0.4364

m=

> > n = A(3)/norm(A)

Matlab Example 1-3 >>A= [l -2 4]

lambdaA

=0.2182

A A 1• -2 m=cos fJ = · ==-0.4364 A 4.5826 A. n =cos = = - 4 = O.8729 A 4.5826

4. 5826 >> B =[3 J-2] B = 3 L -2 > > magB = norm(B) n1agB =

A~

15

0.8729

16

Chapter 1

The Scalar or Dot Product

Problems

17

Chapter 2

Use Matlab to find the answers to the followi ng problen1s. 1-1 (;ivcn the vectors A = 2i

+ 6j · 3k and B = 3i - 3j + 2k , find

(a) A and IJ

(c) 3A - 4B

(b) A+ B

(cl)

IA-B l

l-2 Repeat Problc1n 1-1 fr>r A = 5i 1-3 Given the vectors A = 2i C = i + 2j - 3k, fi nd (a) A+ B + C (b) A+ B-C

+ 2j

· 7k and B = -2i - 3j

+ 4k

+ 3j - k , B = 4i - 3j + 2k, and (c) (d)

The 1nultiplication of a vector by a scalar v.1as discussed in Chapter I . When we n1ultiply a vector by another vector, we n1ust define precisely what we 111ean. One type of vector product is called the sc;i/;1r 01 dot product and is covered in this chapter. A second type of vector product is called the l'CCtor or cross product and is covered in Chapter '\.

2.1 Definition of the Dot Product

IAI I A+ B + c I

1-4 Find the direction cosines and Lhc direction angles

The Scalar or Dot Product

a, /3,

The sc;ll;11· or dol product is written as A • I he dot product is defined by the relation and

y of the vector A = 2i + 5j - 3k. 1-5 Repeat Problcn1 1-4 for A = 6i - 5k.

B and read "A dot B".

A •B =AB cos¢ 11

l1crc ¢ is the angle between A and B.

(2. J)

Since the dot product

l!Jcos¢ has only a 111agnitudc and not a direction, then A • B 1s a

1-6 Find the unit vector A.A in the d irection of the vector A = 5i. 5j

+ 1Ok.

Express AA in terms of i, j, and k.

'' ,i/;1r quantity. ·rhe dot product

A • B =AB cos¢

can

be

written

as

\ • B = (A cos¢) B where A cos¢ is the magnitude of the projection of \ 011

Bas shown in Fig. 2.1.

A cos¢

Fig111(' 2.1

A • B =( Acos¢)B

18

Chapter 2

The Scalar or Dot Product

The doL product can also be wriLLen as A •B =A(Bcos¢)where B cos¢ is the magnitude of Lhc projection of B on A as shown in Fig. 2.2.

19

In Fig. 2.3, we can write A • (B +C)=A •D

=AD cos(B-¢) = AD(cosBcos¢+sinBsin¢) But, since B = Dcos¢ and (' = Dsin ¢,

A • ( B + C) =AB cos 8 + AC sin 8 =A •B +A • C B Figure 2.2 A • B =A ( B cos¢)

From the delinition of the doL product, A •B =AB cos¢ and B • A =BA cos¢. lt is therefore clea r that A • B = 8 • A and the comn1utative law holds for the sca lar product. The distributive law A • (B + C) =A • B +A • C also holds and 1s illustrated for the special case shown in Fig. 2.3 where D = B + C.

'"ice the angle between A anc.1 C is ;

-8 and sin B=cos (; - B).

; .2 Dot Product and Vector Components .·rhe forn1 of th~ dot product can be wriLten conveniently in tcrn1s 11 1 11s components 111 a 1·cclangular coordinate syste1n. Consider the '''o cli1nensional case shown in Fig. 2.4. y

I I __ 1'I _______ _

c

I -~-

j

B

i

B

Figure 2.4 Dot product in a rectangular coordinate system Figurc2.3 A • (B+C)=A •B +A • C

\'('Ctors A and B can be written in the component form l,i I A1 j and 8 = Bxi + B.1.j . Then

I lie

\

20

Chapter 2

The Scalar or Dot Product

21

Answer 1:

A • B = (A)+ A1 j)• (B.\ i + B.1,j)

A . B =Ar Br+ Al.Bl'+ A:B:

= (1)(3) + (-2)(1) + (4)(-2) = :3-2-8 =-7

=A.rB i • i + A)'B. j • i + A.\Byi • j + AYBY j • j 1

1

Since the unit vectors i and j arc orthogonal (i.e., perpendicular), then from the definition of the S('alar p roduct i • i = j • j = 1 and i • j j • i 0. "fhus, the scalar product can be written as

=

=

Answer 2: I n Matlab, the dot product of vectors A and B rttn be wr itten as dot(A,B) as shown in Matlab Exa111plc 2-1.

(2.2)

Matlab Examole 2-1 >>A= (l -2 4]

Note that the dot product A • B must always involve the product of two vectors, and, since the result is a sc;i/;ir, then an expression such as A• (B• C) has no n1caning. On the other hand, the expression

A= -2 > > 13 = (3

A (B • C) docs have a n1eaning.

4 J

-2)

B= 3

l

-2

2.3 Dot Product Properties Consider the vector A

= Axi + A>,j + A:k .

> > AdotB = dot(A,B) AdotB = -7

From the orthogonality of

the unit vectors described in Section 2.2, it follows that A •i = A,\

Example 2-2

A • j = Ar

Find the angle between the vectors A and Bin Exan1ple 2-1.

A •k =A: Consider the definition of the dot product A • B =AB cos¢. 2

B =A, then A • A= A

.

2.4 Examples Example 2-1 Given the vectors A= i - 2 j + 4k and B = 3i + j - 2k find A • B .

Answer 1: If

A • B =A B cos¢ =-7

A=.fii cos >A= [l -2 4J A= 1 -2 4 >>B=[31-2J

2-1 (;ivcnthcvectors A=3i -4j - 2k and B=2i +j-5k , find (a) A • B and B • A. (b) the s111aller angle between A and B. (c) the con1ponent of A in the direction of B? (cl) the con1pone11t of Bin the direction of A?

B= 3

2-2

l

-2

> > phi = (acos(dot(A,B)/(nor1n(A)*nonn(B))))* 180/pi phi= 114.0948 Note carefully the need to use paren theses in the equation for phi. The Matlab function ;icos for the arc cosine gives the answer in radians. Thus, that result must be 1nultiplied by 180/ .1l' to give the answer in degrees.

23

' ) •1

~ -;J

I f A= I Oi + 5j -2k, detenninc A 2 . (;ivcn the vectors A= 3i -2j + 5k and B = 2i + 8j + 2k, show that A and B arc perpendicular to each other.

~-4

A • i = 3, A • j = 5, and A • k = -2 . Find A.

....r>

I f A= i +3j -2k and B=4i - j +2k , find (2A+B) • (A-2 B).

~1

. () )

For what values of aare vectors A = a i -2j + k and B = 2ai + a j -4k perpendicular?

24

Chapter 3

The Vector or Cross Product

25

Chapter 3 B

The Vector or Cross Product

A

Figure :L l Ax 8 = C We saw in Chapter 2 that th e doL product of two vectors is a scalar q uanlily that is a tnaxi 1nu1n when lhe two vectors arc parallel and is zero if' lhc two vectors arc normal or perpendicular to each other. Vl/c now discuss another kind of vector 111ultiplication cal le d the 11cctor or cross product, which is a vector quantity that is a inaxi111u111 when the two vectors arc norn1al Lo each other and is zero if they arc pa rallel.

.111d the co1nmutative law does not hold for the cross product.

3.2 Distributive Law for the Cross Product The distributive la'v

3.1 Definition of the Cross Product The vector, or cross product, of two vectors is wr itten as Ax B and reads "A cross B." It is defined Lo be a th ird vector C such that Ax B = C, where the magn itude ore is C=ICl=ABsin¢

Bx A has a magnitude BA sin¢

but its direction, fou nd by rotating B into A through ¢, is opposite to th at of C. Therefore,

Bx A =-C =-(Ax B)

holds,

(3.2)

in

g1·11cral, Lor the cross product and is illustrated for the special case ' ltown in Fig. 3.2 where A, B , and C all lie in the x-y plane and I> - B + C. The +k direction is out or the paper, so from the rightlt.111cl rule, Ax D is into the paper or in the - k direction. Si1nilarly, AxC is in the +k direction and Ax B is in the - k direction. '"'e 1.111 then write

(3.1)

and the direction of C is perpen d icu lar Lo both A and B in a righthandcd sense as shown in Fig. 3 .1. ¢ is the smaller angle between A and B and the direction of' C is found by the following rule. Exten d th e fingers of your right hand a long A and then curl then1 toward B as if you were rotating A through ¢ . Your thumb will then point in the direction of C. The vector product

Ax( B+C)=(Ax B)+(AxC)

Ax( B+C)= Ax D = -kADsin(8-¢) = -kAD(sin 8cos¢-cos8sin ¢) 1\111,since B = Dcos¢ and C=Dsin¢,

Ax( B +C) = -kABsin 8+ kAC cos8 =(Ax B)+(AxC) """ cos8 =sin (;

-8)

and the angle between A and C is (; -8}

26

Chapter 3

The Vector or Cross Product

27

z

c y

..,x B Figurc3.2 Ax(B +C)=( Ax B) + (AxC) figure 3.'.~ C

=Ax B

3.3 Cross Product and Vector Components Let us write the cross product

We now wish to find the co1nponents of C = Ax B in the rectangu lar coord inate system shown in Fig. ~~.;3, if we know the con1poncnts o f A and B. Fron1 the definition of the cross product, if two vectors arc parallel, then r/J = 0, sin= 0, and their cross product is zero. In particular, the cross product of a vector with itse lf is always :Gero. Therefore, ix i = j x j = k x k = O.

=

j x i =-k jxk = i

=(Ari + A_j + A:k )x ( B, i + Bvj + B:k ) 1

= ( ArB)x i) + ( A1 B,.ix j) + ( ArB: ix k )

+( AYB jx i)+ ( ArBy j x j) + ( A.1B: j x k )

=

If two vectors arc perpendicular, then '

29

'

= A:B.• - A.B: •

(.,':=A.By - AyBx

c

A

A useful way Lo rc1ncmbcr the co1nponcnls of C = AxB is lo recognize Lhal C can be wriLLcn as the dctern1inanL

i



J

-

B -

k

C = AX B = A.• A,. A: B, BY B:

Figure 3.4

(3.3)

If you evaluate this detcrn1inant, you obtain the sa1ne result

Ax(BxC) ;e (AxB)xC

3.5 Cross Product Geometric Properties Consider the parallelogra1n with its sides fonncd by the veclors A .111cl B as shown in Fig. 3.5. ~fhe area of Lhe parallelogra111 is hlAI where h = sin¢. Recall thal the 1nagnilude of the cross product is given by

IBI

jAxBj = jAjjBjsinr/J

3.4 Associative Law The associative law docs not in general hold for the vector product. Thus,

Therefore, in lern1s of A and B, lhe area of Lhc parallelogram is j.\iV(' l1

Ax(BxC) ;e (AxB)xC

by

IA x Bl.

as can be seen by the simple example shown in Fig. 3.4. Since A and B arc parallel, (Ax B) x C = 0 . (Bx C) is a vector directed along the + z axis (oul oft.he page), however, so lhat directed along lhe -y axis.

Ax(BxC) is a nonzero veclor

A

Figure 3 .5 The area of the parallclogratn is

jAx Bl

'

D= A:

B.•

(3.5)

jA x Bj= .JI96+49

=J245 =15.7

Answer 2: In Matlab, the cross product of vectors A and B can be written as cros.~\A,B ) as shown in Matlab Exan1ple 3-1.

Matlab Example 3-1 >>A=[l-24)

A= l -2 4 >> B = [3 l -2) B= 3 1 -2 > > C cross(A,B)

=

C= 0 14 7 > > 1nagC = norm(C) rnagC -

..

).) ;) I ,r.). ('"')"

32

Chapter 3

Example 3-2 Use x B j =A B sin¢ to find the angle ¢ between A and B 1n

IA

Example 3-J, and co111pare with the resu lt of Exa1nplc 2-2. Answer 1:

I A. Ylll

sin ¢ = r:::..:::1 AB

= ../245 =0.915 J2i./14 ¢

= 180° -66° = 114°

Answer 2: In Matlab the solu tion can be found by wnung the· single Matlab equation shown in Matlab Example 3-2. Note carefu lly the need to use parentheses in the equation fo r phi The Matlab function flSin for the arc sine gives the answer in radians. Thus, that result 111ust be multiplied by 180/1f to give the an swer in degrees. Also note that the angle phi is greater than 90 degrees (as can be determined by plotting the vectors) and therefore the arc sine resu lt n1usL be subtracted fron1 L80 degrees.

The Vector or Cross Product

Matlab Example 3-2 >> A - [ I -2 4] A= l -2 4 > > B = [3 l -2J B= 3 l -2 >>phi = 180 - (asin(nonn(cross(A,B))/(norm(A)*norrn(B))))* 180/ pi phi= 114.0918

33

Chapter 3

34

Matrices

35

Chapter 4

Problems Where appropriate, use Matlab to find the answ > M = [2 3;4 5] Tvf

=

2 3 4 5 >> z = M"'y z= 13 2:~

(4.27)

42

Chapter 4

Matlab Example 4-1 (cont.)

>> w

= y•M

??? Error using = = > nni1nes I nner n1alrix di111ensions 1nusl agree.

>>yr = y'

Matrices

43

4.3 Matrix Inverse We return now to Eqs. (4.21) and (4.22) where we arc trying lo ~olvc for the 1hrce unknown values of x in terms of the known coefficients A and the known constants c. 'vVc have the 111atrix equaLion

yr =

2

3

>> w = yr*M

w= 16

21

Ax=c

the question is how can we solve for x. \Ve would like to just divide c by A but what docs this 111can? \Ve only kno"'' ho\.v Lo do 1natrix n1ulLiplicaLion. We begin by defining the identity 1natrix as .111d

>> v = y'•M'

I 0 0

v=

13

(4.28)

I= 0

23

0

I

(4.29)

0 0 1 >>A=[ l2;34;56] A= I

2

3 5

4 6

>> B

= [2 4]'

It is clear by doing the matrix nutltiplication thal Ix = x We will define the n1atrix inverse A 1 by the equation

B=

1

A A= I

2 4

>> C = A•B

C=

(4.30)

(4.31)

"fhus, if we pre-multiply a matrix by its inverse, we get the identity 111.11 rix. This will only work if A is a square niatrix. If we then pre1111d1 iply

1

Eq. (4.28) by A - and use Eqs. (4.31) and (4.30), we obt.ain

10

22

1

A Ax=A 1c

34

Ix = A-1c x=A 1c

(4.32)

Chapter 4

44

Matrices

Therefore, if we know A

1 ,

we can find x fro1n Eq. (4 .32). I l ow can

1

we find A- ? We found lhe solutions by Cra1ncr's rule in Eqs. (4.9) (4. 11) to be

·rhus, if we know the 1nalrix A, we can find its inverse A p1·1 forn1ing the following lhrec steps. I.

45 1

by

Evaluate the delenninant of A, denoted by L\, and niultiply

the new tnatrix (lo be A 1) by l/L\. 2. Insert minus signs in a checkerboard array starting in the 12 and 2 1 positions.

:L

1 x =- a2 1

cI

'11 3

C2

023

03 1

c3

Cl33

"11

2

L\

Ci

C2

1

= L\ ( -c1µ 12 + c2µi2

- c3µ32)

1 requires division by L\, the = 0, then A has no inverse and the 111atrix A is

Note that the evaluation of A

l = L\ ( c1µ13

- c2µ2,

+ C3µ33)

(4.35)

Writing Eqs. (4.33) - (4.34) in rnatrix form, we obtain

--L\

position of a 13 ; etc.

(4.34)

C3

l

For the various entries of A- 1 , insert the rninors of the corresponding entries in the 1r,111spose of A. Thus, for exa111ple, µ 12 is entered in the position of a 21 ; µ 31 in the

µII

-µ21

µ 31

C1

-µ1 2

µ 22

-µ32

C2

'11 1t·11ni11ant of A. If t:. 1111 to be s1i18·til!lr. It is easy to solve linear si1nultancous equations in Matlab. You , 111dcl use the Matlab function dct(A) that co1nputcs the detern1inant 111 ,, square 111atrix A to help cornputc the Cramer's rule solutions t '"'" in Eqs. (4.33) - (4.35). l lowcver, the Matlab function J/11'(11) will l111d t IH· inverse of a square matrix A, so that you can solve Eq. (4.32) 1,, fl l';t writing the Matlab staten1cnt

x = inv(A)*c

(4.36)

(4.38)

µ1 3

> x x=

= inv(A)*c

-5.2619

1.2302

".8571

(4.46)

48

Chapter 4

Matrices

Matlab Example 4-2 (cont.) >> x = A\c x=

This solution is shown in Fig. 4. I where we have ploued the three lines corresponding Lo the three equations in Eqs. (4.47). Note that the solution is a "best guess" average of the three solutions corresponding to the intersections of any two lines.

-5.2619

I .2302 4.8571

Example 4-3 Solve the following sin1u ltaneous equations for x, and x 2•

x1 +Ox2 =3 Ox1 + x2 = 6 x1 -x2 = 0

x1 =3

X2

x1 =x2

6

X2

=6

5 4

(4 .4 7)

(x1 =4,x2 =5)

3 2 1

Answer:

0

We can write the equations in n1atrix {()rm as

0

1

2

3

4

5

6

Xi

Figure 4.1 Solution of Exa1nple 4.3

(4.48)

Matlab Example 4-3 > > A = [I O; 0 J; l - 1]

A= l

which is of the form

Ax=c

49

0

0

(4.49)

But in this case, the n1atrix A is not square and therefore has no inverse. However, we can use the left divide operator \ in Matlab to compute a pseudo-inverse and the result is given in Matlab Example 4-3 as

l 1 -1 > > c = [~~ 6 O]'

c= 3 6 0 >> x = A\c x .....

(4.50)

4.0000 5.0000

bO

Chapter 4

Cartesian Tensors

Problems

51

Part 2

Use Matlab to solve the lollowing proble1ns. 4-1

Solve the followjng simullancous equations Jor x,, X2, and x:11.

Cartesian Tensors 2xi -7x2 + 10x3 = 4 - 4x1 + 2x2 - 3x3 = 12 Xi +6x2 +3x3 =-5 4-2 Solve the following sin1ultaneous equations for

X i, X2,

and

X 3.

3xi -2x2 + 7x3 =8 9xi + 4x2 - 7x3 = 14 - lx 1 +3x2 -2x3 =-2 4-3

Use the Matlab left divide operator Lo solve the following three simu ltaneous equations for x 1 and x2 • Plot the th~·ee lines corrcspondjng to the three equations and plot your solution. 2x1 -x2 =2 X1

+X2 = 3

Xi

-x2 = 0

In Chapter I , vectors were in trod uccd i11 tcnns of d irccted line ,1•g1nents. The use of a coordinate systen1 for defining co1nponcnts of .1 vector was a convenience; but the vector itself exists quite i11dependenliy of any particular coordinate sysletn. Many different • nordinate systc1ns can be used to describe the sa1nc vector. rfhc nlost 1111portant is the rectangular or Cartesian coordinate systcn1 used in 1 c 'li,1ptcr 1. Other con1n1011 coordinate systen1s arc the cylindrical and 1he· spherical, which arc described in Part 3. For a great n1any applications of vector analysis, including the d1·1 ivation of important vector equations in engineering and science, tlll' Cartesian coordinate systcn1 is entirely adequate. The introduction 111 .111 index notation to describe the Cartesian components of a vector 1111plifies n1any expressions, 1nakes clear the meaning of others, allows 111u· 10 proceed through vector derivations with greater case, and lead s '' 1 ,1 straightforward generalization to higher order Cartesian tensors. 1 lw basic elen1ents of the index notation arc described in Chapter 5. \11('1 con1pleting Chapter 5, you shou ld be able to write any algebraic • 11or cquatjon in either the symbolic vector notation or the index 11111,11ion and shou ld easily be able to prove any vector identity 111,nlving dot or cross products. In Chapter 6, you will see how to I \ =(0,0, !)

1h

= A1u11J + A2u 12> + A3up1

(5.4)

I he final form of the index notation docs not contain the unit

xyFigure 5.2 The Cartesian components of the vector A

\, 1

tors

Uui·

notation of Part 1 to the index notation. In its final form, 1111 index notation contains only quantities such as A,, which arc the

1111 .,, 1nbolic

The three components are 111111111 '»' letting itake on independently the values 1, 2, and 3. Thus, I !ll.111ds for the three scah1rcomponcnts (A" A2 , andA 3 ). As such, 11 tt•.t;1';111

Jn writing the expression

We arc only using then1 as a stepping stone to get fron1

I

co1nponc11ts of the vector A.

" strictly a scalar quantity and we can move it around in an

11p1.11io11, at will, like any other scalar. It is this p roperty that makes 1111 111d

= A1unl the unrepeated subscripts of the t\\ 0 alternating unit f( ' 11sors. "rhcy are, respectively, 1

66

Chapter 5

The Index Notation

1. both second subscripts 2. both third subscripts 3. one second and one third subscript 4. the other second and the other third subscript As

As

Again, we just write (Ax B) x C in the index notation as

eriseuk A, BkCs =e1sreuk A, BkCf

=(8SJ 8rk -8sk 8ry) A1 BkCs = A B,Cs - A,BsCs

an example, eku e1pq -& - 1Jk e 1pq -8 - JP 8kq -8Jq 8kp

5

= B,ASCS -A,BSCS

another example, e mnp e rps =epmn e psr =8ms 8nr -8mr 8ns

As an example of the use of Eq. (5.22), consider the proof of the vector identity

\vhich proves the identity in Eq. (5.25). An important property of the alternating unit tensor is that if it 1nultiplies an expression that is symmetric in two of its subscripts, the result is zero. For example, in the expression euk A, Ak the quantity /11 Ak

Ax(BxC) = (C • A)B-(B • A)C

(5.23)

= AkA,

and is symmetric with respect to the subscripts j and k.

"rherefore, euk A, Ak

= 0.

To prove this result, note that) and k are both

dummy subscripts and therefore can be renamed. 1ename the j with a k and rename the k with a j Thus

Begin by \vriting Ax (Bx C) in the index notation as

e,S, ASeljk B, Ck

67

In particular,

= elrSeljk B,CkAs

=(8ry8sk -8,k8Sj ) B,CkAs = B,CsAs -B C,A 9

Now let AkA,

= A, Ak

on the right side of Eq. (5.26), and write

5

= CSASB, -BSASC,

(5.24)

which proves the identity in Eq. (5.23). As a second example, prove the vector identity

(AxB)xC = B(A • C)-A(B• C)

(5.27)

Now interchange k and j in euk A1 A* on the right side of Eq. (5.27). I his introduces a minus sign so that (5.25) (5.28)

and thus verify (by comparing with Eq. (5.23) that

(AxB)xC :t:- Ax(BxC)

But this result is identically zero, since this is the only condition 1111dcr which an expression can be equal to the negative of itself Thus, '''" conclude that euk A, Ak 0. This expression can be written in " 'ntbolic notation as Ax A 0, which agrees with the definition of the 11oss f)roductin Eq. (3.1).

= =

68

Chapter 5

The Index Notation

Proof of Eq. (5.22)

Transformation of Vector Components

To prove the relationship

Two different Cartesian coordinate systems (xx x ) and (x - - ) '

recall that in this expression each of the four unrepeated, or floating subscripts (j, k, r, s) takes on the values l, 2, and 3 independently. Thus, Eq. (5.29) represents 3x3x3x3 =81 separate equations. For each of the 81 cases the value of each side of Eq. (5.28) is +I, -1, or 0. The 81 cases can be broken down into the six groups shown in Table 5.1. You should be able to verify that Table 5.1 proves the identity in Eq. (5.29). T a ble 5 .1 Brea kd ownof81 cases to prove E.q. (~::.>. 28) Condition No. of Cases Group Value of both sides of Eq. (5.29) 27 1 j=k 0 3 4

5 6

r=s . 1=r . j=S j;t;r r:tk

j :t k k=s r=k j;t;s s :t k Total

18

6 6 12 12 81

0 +l

1X2X 3 ,

I 2 3

are shown in Fig. 5.4. Let llJ represent the cosine of the angle between the axes x, and x1 • That is,

(5.29)

2

69

1,1

/IJ

=COS ( X

1

,

X ) 1

= /21

(5.30)

Thus, for example, /11 is the cosine of the angle between the x, axis and the x, axis. Similarly, /32 is the cosine of the angle between the x . d 3 axis an the x 2 axis. Note that the first subscript in !IJ always refers to one of the three barred axes. We can now write the vectors u 0 >, u, and ii sho\vn in Fig. 5.4 in terms of their components in the non-barred system. Thus, .

u =

-1 0 0

/11 ll c1> + l,2 u c2>

+ l1 3D

U (2)

=/ 21 U (I) + /220 (2) + /230 (3)

ii(3)

= f31 U ( I) + / 32 0 (2) + / 33 0 (3)

,,•hich can be written in matrix form as

5. 7 Transformation Properties of Vectors and Cartesian Tensors In this section, we want to find out how the components of a vector in one Cartesian coordinate system are related to the components of the same vector when referred to a different Cartesian coordinate system. We shall extend our results to determine the transformation properties of higher-order Cartesian tensors. Thus, in this section, we are concerned with vectors and tensors referred to Cartesian coordinate systems. We will see in Chapter 10 how vectors and tensors are transformed in generalized, curvilinear coordinate systems.

/11

/1 2

/1 3

U ( J)

/21

/ 22

/ 23

0 (2)

131

132

133

0 (3)

(5 .31)

or

u = Lu

(5.32)

"'here L is the matrix !IJ. and is called the rotation matrix. Eq. (5.32) can be "''ritten in the index notation as

70

Chapter 5

The Index Notation

71

Since Eq. (5.36) must be valid for each of the independent unit vectors u , the expression in parentheses must be zero. Therefore, \ve can write

xl I I I I I I

I I

-'

(5.37)

(3)

U 2

Eq. (5.37) gives us the components of A in the non-barred system in terms of the components in the barred system. If we write the components A, and A1 as column matrices A and A, then Eq. (5.37) can be written as Figure 5.4 Coordinate system (x 1x 2 x 3 ) is rotated with

A=LA

respect to coordinate system (x 1x 2 x 3 )

(5.38)

Eq. (5.38) can be written in terms of the row matrices A' and A' as (5.33) (5.39) Now our objective is to represent any vector A in each coordinate system and to sec how the corresponding components are related. In the non-barred system we can write (5.34)

Eqs. (5.38) and (5.39) give the matrices A and A' in terms of A and A . We \vould like to obtain the matrix A (or A') in terms of

-.

.J\ (or A').

One obvious approach is to use the inverse matrix L- 1•

I hus, if we postmultiply Eq. (5.39) by

. -. 111atrices A and A

and in the barred system

L- 1, then in terms of the row

we can write

(5.35)

(5.40)

'fhere is another way, however, of obtaining A (or A') in terms of

Combining Eqs. (5.33) - (5.35), we can write



(or A) without using the inverse matrix L- 1• To see what this other 11u ·1hod is, note from Eq. (5.30) that we can write

from which (5.36)

-u ( 1) • -0 o > =1 =1112 + 1122 + 1132 -0 = 0 =Z21l31+ Z22l32 + l23l33

Eqs. (5.45) and (5.46) are the inverse of each other and should be carefully compared.

Using the results shown in Eqs. (5.41), we can write

l I) llg =LL=

/11

112

113 /11

121 /31

12 1

122

/23

/12

122

132

/31 132

l33

113 /23

!33

73

1 0 0 0 1 0 0 0 1

Eq. (5.45) can be written in terms of the column matrices A and A as (5.42)

A=LA

(5.47)

-. . In terms of the row matrices A and A Eq. (5.45) can be written as (5.48)

Eq. (5.42) can be written as Compare this result with Eq. (5.39). (5.43)

It is also true (as you can readily verify) that l 1,l 1k

=8,k.

Study these

resu 1ts carefull y. Note that the repeated subscript is either the second . on · t on b o th l's or the first subscript on both. The subscripts su b scrip . the Kronecker delta must be the same as the floating subscripts on the l's. Thus, for example, l pqlrq = '5pr and ls,lsr ='5,r ·

Note from Eq. (5.42) that LL'= I. You can also verify that L'L =I. l3ut this is just the definition of the inverse matrix L- 1• It is therefore clear that

(5.49)

.\ 1natrix \vi th this property is called orthogonal

Now recall from Eq. (5.37) (5.44) If we premultiply both sides of Eq. (5.44) by

lkf'

we obtain

··r ·ransformation of Cartesian Tensor Components Consider the two vectors A= A,u and B = B u< » Noiv form the 1 1 pt oduct (5.50)

so that (5.45)

which was the result we were seeking. We can rename the subscripts i11 Eq. (5.44) as

'" l 1ic}1 can be written as a matrix equation in the form

74

Chapter 5

The Index Notation

A1B1 AB= [ o 0(2)

0(3)

J A2BI A3BI

A1B2 A1B3

o = 2 ° >e AI) e< )

(5.86)

AI) e = ,1, e )

(5.87)

I

I

e(I) I

e(I) 2 2> e L= e< I 2

e

e I

e 3

e 2

e(I) 3

(5.90)

3

Now multiply Eq. (5.86) by e~ 2 > and Eq. (5.87) by e,e,c2> -Alj ee e JI

el

/

=(A-c1>-

Ac2>) e e I

I

,x1 ) as

I

I I (2)

e

(5.89)

Figure 5.5 Coordinate system (x1x 2 x3 ) uses the three eigenvectors as unit vectors

84

Chapter 5 ~~~~~~~~~~~~~~~

.

.

The matrix A (with elements Alj such as given in Eq. (5. 74) is referred to the original (x1x 2x3) coordinate system. We would like to determine what the form of this matrix is when referred to the new coordinate system defined by the eigenvectors of A. From Eq. (5.60) we know that this new matrix A is given in terms of A and the rotation matrix L by the equation (5. 91)

A=LAL

Using Eq. (5.90) in Eq. (5.91), v,re can write Eq. (5.91) in matrix form as e(I) I

A= e I e I

e(I) e(I) 2 3 e e 2 3 e e 2 3

A, I

A12 A,3

A11 A12

A31

~2

A23 A33

e, e, and e (3) are 1 1 1 2 perpendicular to each other so that eO>e< >= e(l>e + e(l>e + _ 1 1 1 1 2 2 e3 e3 - 0 3 and e(l> e< > - O Also note th at since · · e(a) are unit vectors - e1 e1 . 1 1 1 ' e entaining the eigenvalues of the matrix A.

The statement

89

90

Chapter 5

[V, D] = eig (A)

The Index Notation

computes

the

eigenvectors

and

stores

the

eigenvalues in a diagonal matrix. Use Matlab to find the eigenvalues and eigenvectors for the matrix

1 1 0

Ay=

1 2

1

0 1 1 from Eq. (5.74) and compare your results with Eq. (5.84).

Example 5-10 The state of stress in an elastic body is described by the stress tensor alJ . Each of the nine elements in this tensor represents the force per unit area in the x1 direction acting on a small surface element whose unit normal is directed along the x, axis. It can be shown that under most conditions the stress tensor is symmetric. It is therefore possible to find the three eigenvalues of the stress tensor. These three eigenvalues are called the principal stresses 2 a (J>, a < >, and a C3>. The three eigenvectors e e and e I

Answer: Matlab Example 5-9 > > A = [1 1 O; 1 2 1; 0 1 1] A= 1

1

> > [V,D]=eig(A) V= 0.5774 -0.7071 0.4082 -0.5774 -0.0000 0.8165 0.5774 0.7071 0.4082 D= 0.0000 0 0 0 1.0000 0 0 0 3.0000

)

I

'

I

associated with the principal stresses define the three directions of principal stress. Find the three principal stresses and the three directions of principal stress for the stress tensor

2 2 0

0

1 2 1 0 1 1 > > lamda = eig(A) lamda = 0.0000 1.0000 3.0000

91

( jlj

=

2 2 0 0 0

1

Answer:

-1 (I ) e1 -

1

J2.

1

0 0

e = 0 1 1

1 0"(3)

=4

(3) e1 -

1 1 J2. 0

92

Chapter 5

The Index Notation --~~~~~~~~~~~~~~-

93

Problems 5-1

5-2

Remove the Kronecker deltas from the following expressions. (a)

A,0,P

(b)

R1kS pq8p1

(c)

(d)

Cl)k,811

(e)

Al) Bq8' is referred to the (x1x2 )

2

Show that the eigenvectors are not mutually perpendicular.

= c(A•(BxD))-D( A•(Bxc)) 5-5

1 -2

11 =A

II

/ 2,

and 13 in Eq. (5.73) can be written in the form

94

Vector Calculus

Chapter 5

A,2

A,3

A12

A13 = £ukA1tA21 A3k

A32

A33

95

Chapter 6 Vector Calculus In this chapter, \ve begin ot1r discussion of vector calculus. A prerequisite for this chapter is kno\vledge of differential and integral < alculus as is generally obtained in the first two college-level calculus < ourses. Differentiation of a vector \vith respect to time is treated in Section 6.1. The rest of the chapter deals 'vith the problem of differentiation of vectors \Vith respect to the spatial coordinates. The g1 adient, divergence, and curl operations arc defined and the forms of 1ltese operations in rectangular coordinates are developed. You \\·ill I ·flrn hov.' to \vrite these vector operations in both the symbolic and the index notations. Final! y, the method of proving any vector calculus identity using the index notation is described. Some of the material in this chapter, particularly the gradient and 1Iin1ponents representation of one vector is given by oqJ/ox,, while the crpendicular to the coordinate surface (half plane) ¢J =Constant. A vector A(r,8,(J) located at point P(r.8,(J) can be resolved into

x = r sin 8 cos¢ y = r sin 8sin ¢J z = rcos 8

(7.5)

01nponents A, , A8 , and A¢ along the unit vectors u,, u 8 , and u¢ 1 cspectively. Thus, A can be \vritten as

1

(7.7)

z P(r,8,¢)

u,

z 8 y

, ,,

,' ' '

y

,,/ ,/

" x Figure 7.9 Defining unit vectors U ,. , U 0 and

u~

To define a differential volume element in spherical coordinates, ) 1>11 define ne"'' surfaces of constant coordinate variables formed by 111< rcasing each coordinate variable by a differential amount. Thus, the ~11 1rface r =Constant is moved in the direction of increasing r by an 1111ount dr to form the new surface r + dr =Constant as shown in Fig. 7 I 0. Similarly, the surface B =Constant is shifted to fl f. > z = 10; > > [X,Y,Z] = pol2cart(THETA,RHO,Z) X= -3.5355 Y= 3.5355 Z= 10

Example 7-2 Find the rectangular coordinates of the point 'vhose spherical coordinates are r = 5, () = 120°. ¢ = 60° •

Answer 1: Using the results in Eq. (7.5) x = r sin 8 cos¢= 5sin120° cos 60° = 5 ( 0.866) ( 0.5) = 2.165 y = r sin 8 sin¢= 5sin120° sin 60° = 5 ( 0.866) ( 0.866) = 3 .75 z = rcosfJ = 5cosl20° = 5(-0 .5) = -2.5

y = psin¢ = 5sin 135° = (5)(0.707) = 3.536

z = z =10

1\11swer 2: In Matlab, the function sph2carl(_ THETA,PHI,Z) can be used to r11\'ert spherical coordinates to rectangular (Cartesian)

148

Orthogonal Curvilinear Coordinate Systems

Chapter 7

coordinates as shown in Matlab Example 7-2. In this function, the angle THETA corresponds to the angle >THETA= 60*pi/180; > > PHI = (90-120)*pi/180; >> R = 5; > > [X,Y,Z]=sph2cart(THETA,PHI,R) X= 2.1651 Y= 3.7500 Z= -2.5000

Example 7-3 Find the cylindrical coordinates of the point whose rectangula1 coordinates are x = 4, y = 3, z = 5 Answer 1: Using the results in Eq. (7.3)

p = ~ x 2 + y 2 = .J4 2 + 3i = J25 = 5 " and u=. This leads to the following matrix equation.

OP (the line from the origin to P) and the x-y plane, rather than the angle between OP and the z-axis. Both angles can be converted to degrees as shown. Matlab Example 7-4 >> x = 5; >> y = 6; > > z = -7; > > [THETA,PHI,R]= cart2sph(X,Y,Z) THETA= 0.8761 PHI= -0.7307 R= 10.4881 >>phi= THETA*l80/pi phi= 50.1944 > > theta= ((pi/2)-PHI)*l80/pi theta= 131.8685

151

cos¢ sin¢ 0 -sin¢ cos¢ 0 0 0 1

(7.9) u~ •

which we can write as Uc = LcRUR

(7 .10)

cos¢ sin¢ 0 -sin¢ cos¢ 0 0 0 1

(7 .11)

where

LCR =

is a transformation matrix that transforms u R into Uc .

The

capital letter subscripts on uc., u R, and LcR are for identification purposes only and are not to be treated as Cartesian component indices. Example 7-6 \Vrite the three unit vectors ux, u>" and uz shown in Fig. 7.3 in l111ponents in both the q' and q ' coordinate systems. That is,

Answer: From Eq. (10.35) g I)

ar ar = aq' • aq' =e' •e'

Using the results from Example 10-4

ar =A' ar

A= A'

'dq'

(10.63)

aq '

l(1 ·call from Eq. (10.47) that when \Ve dot A with Vq 1 \ve recover the

1111travariant component A 1 • Therefore, if \Ve dot A in Eq. (10.63) 1 \\ 11 Ii Vq and use Eq. (10.62), we obtain


> v = 5*exp(i*3*pi/4) as shown in Matlab Example 12-1. Note that Matlab returns the value v= -3.5355 + 3.5355i in rectangular coordinates so that you don't have to type

> > mz = sqrt(4"' 2 + 3 "' 2) > > x = 5*cos(3*pi/4) which \·vould work. Ho\vever, it is easier to use the Matlab ab1t function and write > > mz = abs(z)

which will also give you a value of -3.5355.

If you have a

phasor value such as I= 8e' 60 = 8L60° with the angle in degrees, then in Matlab you would need to type

266

Chapter 12

Complex Numbers and Phasers

267

and

> > i = 8*exp(i*60*pi/l 80)

B =3 + i5 =5.83 Ie" 030 which will return the value \Ve could write

.

i=

4.0000 + 6.9282i

C =A* B = (6.3246e'0.322 ) ( 5.83 le'1.o3o)

as shown in Matlab Example 12-1. If you \Vant to find the real part of this value using the cos function, you must use the coscl function if the angle is in degrees. Thus,

>> x

= 8*cosd(60)

will return 4.0000 without having to multiply the 60 by pi/180.

Example 12-2 - Complex Number Arithmetic Given the two complex numbers A= 6 + i2 and B = 3 + i5 , find th