Math 307 Spring, 2005 Hentzel Time: 10:00 to 10:50 MWF Room: 205 Carver Hall Instructor: Irvin Roy Hentzel Office 432 Carver Phone 515-294-8141 E-mail: hentzel@iastate.edu Assignment: Using Exercise 34 on page 262 (a) construct the change of basis matrix P where BC 2 3 4 5 6 B = {1, Cos[t],Cos [t],Cos [t],Cos [t],Cos [t],Cos [t]} C = {1, Cos[t],Cos[2t],Cos[3t],Cos[4t],Cos[5t],Cos[6t]} (b) Now integrate 3 4 5 6 INT 5 Cos [t] - 6 Cos [t] + 5 Cos [t] - 12 Cos [t] dt (c) Solve: x' = -2x -4y -4z y' = 2x +4y +2z z' = x +y +3z March 23 4.7 Change of Basis Main Idea: Just look at the coefficients. Key Words: Representation of a vector with respect to a basis. V P P T P B CB CB BB BC Goal: Set up the constructions symbolically before you try to do them with the actual matrices. ------------------------------------------------------------ Previous Assignment: Write the matrix of the equation 2 2 2 x + 2 y + 3 z + 2 x y + 4 x z + 6 y z = 13 Make the substitution | x | | 1/3 2/3 -2/3 | | x' | | y | = | 2/3 1/3 2/3 | | y' | | z | | -2/3 2/3 1/3 | | z' | | 1 1 2 | A = | 1 2 3 | | 2 3 3 | T | 1/3 2/3 -2/3 | | 1 1 2 | | 1/3 2/3 -2/3 | | 2/3 1/3 2/3 | | 1 1 3 | | 2/3 1/3 2/3 | | -2/3 2/3 1/3 | | 2 3 3 | | -2/3 2/3 1/3 | | 7 1 2 | | -(-) - - | | 9 9 9 | | | | 1 50 19 | | -7 1 2 | = | - -- -- | = 1/9 | 1 50 19 | | 9 9 9 | | 2 19 11 | | | | 2 19 11 | | - -- -- | | 9 9 9 | The new equation is -7 x^2 + 50 y^2 + 11 z^2 + 2 x y + 4 x z + 38 y z = 117 ---------------------------------------------------------------------------- Q = {{ 0.374358722416035891, -0.441224696873464403, 0.815583419289500293 }, { 0.577350269189625764, -0.577350269189625765, -0.577350269189625764 }, { 0.725618504186394115, 0.687013415833771123, 0.03860508835262299196}}; ans = Solve[ x^2 + 2 y^2 + 3 z^2 + 2 x y + 4 x z + 6 y z == 13,z]; a1[x_,y_] = z /. ans[[1]]; a2[x_,y_] = z /. ans[[2]]; aa = Plot3D[a1[x,y],{x,-20,20},{y,-20,20},PlotPoints->40]; ab = Plot3D[a2[x,y],{x,-20,20},{y,-20,20},PlotPoints->40]; ac = Graphics3D[ {Thickness[0.01], Line[ {-40 Transpose[Q][[1]], 40 Transpose[Q][[1]]}]}]; ad = Graphics3D[ {Thickness[0.01], Line[ {-40 Transpose[Q][[2]], 40 Transpose[Q][[2]]}]}]; ae = Graphics3D[ {Thickness[0.01], Line[ {-40 Transpose[Q][[3]], 40 Transpose[Q][[3]]}]}]; ah = Show[aa,ab,ac,ad,ae,BoxRatios->Automatic]; Display["v0.ps",ah]; ai = Show[aa,ab,ac,ad,ae,ViewPoint->-40 Transpose[Q][[1]],BoxRatios->Automatic]; Display["v1.ps",ai]; aj = Show[aa,ab,ac,ad,ae,ViewPoint->-40 Transpose[Q][[2]],BoxRatios->Automatic]; Display["v2.ps",aj]; ak = Show[aa,ab,ac,ad,ae,ViewPoint->-40 Transpose[Q][[3]],BoxRatios->Automatic]; Display["v3.ps",ak]; -------------------------------------------------------------------------------- Q = {{ 0.374358722416035891, -0.441224696873464403, 0.815583419289500293 }, { 0.577350269189625764, -0.577350269189625765, -0.577350269189625764 }, { 0.725618504186394115, 0.687013415833771123, 0.03860508835262299196}} T Q A Q = {{ 6.41883267597004, 0, 0}, { 0, -0.805602832577591, 0}, { 0, 0, 0.3867701566075492}}; The new equation is 6.41883267597004 x^2 -0.805602832577591 y^2 + 0.3867701566075492 z^2 = 13 --------------------------------------------------------------------------------------- Q = {{ 0.374358722416035891, -0.441224696873464403, 0.815583419289500293 }, { 0.577350269189625764, -0.577350269189625765, -0.577350269189625764 }, { 0.725618504186394115, 0.687013415833771123, 0.03860508835262299196}} bns = Solve[6.41883267597004 x^2 -0.805602832577591 y^2 + 0.3867701566075492 z^2 == 13,z]; b1[x_,y_] = z /. bns[[1]]; b2[x_,y_] = z /. bns[[2]]; f[y_] := Sqrt[(13+0.805602832577591*y^2)/6.41883267597004]; ba = ParametricPlot3D[ Q.{r f[y],y,b1[r f[y],y]},{y,-20,20}, {r,-0.999,0.999},PlotPoints->50]; bb = ParametricPlot3D[ Q.{r f[y],y,b2[r f[y],y]},{y,-20,20}, {r,-0.999,0.999},PlotPoints->50]; bc = Show[ba,bb,PlotLabel->" 6.41 x^2 - .8 y^2 + 3.8 z^2 using Q"]; Display["b0.ps",bc]; bd = Show[ba,bb,ViewPoint->40 Transpose[Q][[1]],BoxRatios->Automatic]; Display["b1.ps",bd]; be = Show[ba,bb, ViewPoint->40 Transpose[Q][[2]],BoxRatios->Automatic]; Display["b2.ps",be]; bf = Show[ba,bb,ViewPoint->40 Transpose[Q][[3]],BoxRatios->Automatic]; Display["b3.ps",bf]; ============================================================== New Material. The main ideas are the following. (1) If we have a Basis B = [b1 b2 ... bn] we can express something in terms of the basis by giving the coefficients of the b's. | c1 | | c2 | | c3 | v = [b1 b2 ... bn] | c4 | = c1 b1 + c2 b2 + ... + cn bn. | . | | . | | . | | cn | | c1 | | c2 | | c3 | The coefficient vector | . | is called the representation of v with | . | | . | | cn | respect to the basis [b1 b2 ... bn]. =========================================================== For example: 4 (a) Represent the polynomial x + 3 x + 2 with respect to 4 3 2 the basis [x , x , x , x , 1]. | 1 | | 0 | answer: | 0 | | 3 | | 2 | =========================================================== (b) Represent x Sin[x] + 3 Cos[x] with respect to the basis [ x Sin[x], x Cos[x], Sin[x], Cos[x] ]. | 1 | | 0 | ans: | 0 | | 3 |. ================================================================ (2) If you choose a different basis for whatever reason, you have to change the representation of the vector. This change is easily done by using a matrix called the change of basis matrix. | a11 a12 ... a1n | | a21 a22 ... a2n | [B1 B2 ... Bn] | . . . | = [C1 C2 ... Cn] | . . . | | . . . | | an1 an2 ... ann | You get this matrix column by column making C1 a linear combination of the B basis for the first column, etc. The matrix is P . BC ======================================================================= To get this straight, derive what you are doing. | a11 a12 ... a1n | | x1 | | x1 | | a21 a22 ... a2n | | x2 | | x2 | [B1 B2 ... Bn] | . . . | | . | = [C1 C2 ... Cn] | . | | . . . | | . | | . | | . . . | | . | | . | | an1 an2 ... ann | | xn | | xn | We multiply the expression by the vector X. This gives us B A X = C X On the right hand side, X is a representation of a vector in the C basis. On the left hand side AX is the representation of the vector in the B basis. So X = A X B C and A converts the two. Thus A is P BC. ===================================================================== For example. (a) Find the change of basis matrix for 2 3 3 2 [ 1 x x x ] and [ x x x 1] 2 3 | 0 0 0 1 | 3 2 [ 1 x x x ] | 0 0 1 0 | = [ x x x 1] | 0 1 0 0 | | 1 0 0 0 | ============================================================= (b) Find the change of basis matrix for x -x [ e , e ] and Sinh(x) and Cosh(x). x -x x -x e - e e + e Sinh(x) = ----------- Cosh[x] = --------------- 2 2 x -x [ e e ] | 1/2 1/2 | = [ Sinh[x] Cosh[x] ]. |-1/2 1/2 | ================================================================= (c) Find the change of basis matrix which rotates the axis sending (1,0) into (5/13, 12/13) and (0,1) into (-12/13, 5/13) | 1 0 | | 5/13 -12/13 | = | 5/13 -12/13 | | 0 1 | | 12/13 5/13 | |12/13 5/13 | B B' P BB' What does (3,5) in the B' system correspond to in the B system? | 5/13 -12/13 | | 3 | = | -45/13 | |12/13 5/13 | | 5 | | 61/13 | P v v BB' B' B =========================================================== What does the equation 2 xy = 4 become in the B' basis. [ x y ] | 0 1 | | x | = 4 | 1 0 | | y | | x | = | 5/13 -12/13 | |x'| | y | |12/13 5/13 | |y'| [x' y'| | 5/13 12/13 | | 0 1 | | 5/13 -12/13 | | x' | = 4 |-12/13 5/13 | | 1 0 | |12/13 5/13 | | y' | | 120 119 | | --- -(---) | | 169 169 | | x'| = 4 [x' y'] | | | y'| | 119 120 | | -(---) -(---) | | 169 169 | (120/169) (x')^2 -238/169 x' y' -120/169 (y')^2 = 4 ================================================================= Example: 2 Cos[2x] = 2 Cos [x]-1 3 Cos[3x] = 4 Cos [x] - 3 Cos[x] 4 2 Cos[4x] = 8 Cos [x] - 8 Cos [x] + 1 Find the change of basis matrix which converts B = {1, Cos[x], Cos[2x], Cos[3x], Cos[4x]} 2 3 4 C = {1, Cos[x], Cos [x], Cos [x],Cos [x]} {1, Cos[x], Cos[2x], Cos[3x], Cos[4x]} = <---------------B--------------------> | 1 0 -1 0 1 | 2 3 4 | 0 1 0 -3 0 | {1, Cos[x], Cos [x], Cos [x],Cos [x]} | 0 0 2 0 -8 | <-----------------C-----------------> | 0 0 0 4 0 | | 0 0 0 0 8 | P CB | 8 0 4 0 3 | | 0 8 0 6 0 | P = 1/8 | 0 0 4 0 4 | BC | 0 0 0 2 0 | | 0 0 0 0 1 | Now an application for the matrix P BC 2 3 4 INT 5 Cos [x] + 2 Cos [x] + 3 Cos [x] dx 5 2 3 | 8 0 4 0 3 | | 0 | | 29 | | 0 8 0 6 0 | | 0 | | 12 | 1/8 | 0 0 4 0 4 | | 5 | = 1/8 | 32 | | 0 0 0 2 0 | | 2 | | 4 | | 0 0 0 0 1 | | 3 | | 3 | P V V BC C B | 0 | | 29 | | 0 | | 12 | <--------C--------> | 5 | = <------------B---------> 1/8 | 32 | | 2 | | 4 | | 3 |C | 3 | 2 3 4 INT 5 Cos [x] + 2 Cos [x] + 3 Cos [x] dx = 1/8 INT 29 +12 Cos[x] +32 Cos[2x] + 4 Cos[3x] + 3 Cos[4x] dt = 1/8 ( 29x +12 Sin[x] +16 Sin[2x] +4/3 Sin[3x] +3/4 Sin[4x] ) ==================================================================== Solve: x' = -2x -4y -4z y' = 2x +4y +2z z' = x +y +3z / | x | | -2 -4 -4 | | x | | y | = | 2 4 2 | | y | | z | | 1 1 3 | | z | We have X' = AX Change the basis X = PY (PY)' = A P Y P Y' = A P Y -1 Y' = P A P Y -1 | r1 o o| Choose P such that P A P is | o r2 o| | o o r3| The new equation is u' = r1 u u = C1 e^r1t v' = r2 v v = C2 e^r2t w' = r3 w w = C3 e^r3t | C1 e ^pt | X = P Y = P | C2 e ^qt | | C3 e^ rt | |-4 -1 -1 | P = | 2 0 1 | | 1 1 0 | -1 | -1 -1 -1 | P = | 1 1 2 | | 2 3 2 |