MATH383: A first course in differential equationsFebruary 14, 2020

Homework 6 Solution

Due date: Feb 20, 2020, 11:55PM.

Bibliography: Lesson09.pdf Lesson10.pdf. The first exercise in each problem set is solved for you to use as a model.

  1. Consider 𝒱=n, 𝒮=. Determine whether the column vectors of 𝑨 form a basis for n.

    Ex 1

    n=3,

    𝑨=( -1 1 1 2 0 1 1 1 1 ).

    Solution. Reduce 𝑨 to row-echelon form

    𝑨( -1 1 1 0 2 3 0 2 2 )( -1 1 1 0 2 3 0 0 -1 )( 1 -1 -1 0 1 32 0 0 1 )

    Since the row-echelon form does not contain a row of zeros, the columns of 𝑨 form a basis for 3. Check in Maxima

    (%i1) 

    A: matrix([-1, 1, 1],[2, 0, 1],[1, 1, 1]);

    (%o1) ( -1 1 1 2 0 1 1 1 1 )

    (%i2) 

    echelon(A);

    (%o2) ( 1 0 12 0 1 32 0 0 1 )

    (%i3) 

    
                            

    Note: multiple row-echelon forms are possible (differing by, say, permutation of rows), but the same conclusion on the independence is reached, i.e., no zero rows implies linear independence.

    Ex 2

    n=3,

    𝑨=( 2 5 3 -2 1 1 1 2 1 ).

    Solution. Reduce 𝑨 to row-echelon form

    𝑨( 2 5 3 0 6 4 0 -1 -1 )( 2 5 3 0 3 2 0 0 -1 )( 1 52 32 0 1 23 0 0 1 )

    Since the row-echelon form does not contain a row of zeros, the columns of 𝑨 form a basis for 3. Check in Maxima

    (%i39) 

    A: matrix([2, 5, 3],[-2, 1, 1],[1, 2, 1]);

    (%o39) ( 2 5 3 -2 1 1 1 2 1 )

    (%i40) 

    echelon(A);

    (%o40) ( 1 52 32 0 1 23 0 0 1 )

    (%i41) 

    
                            

    Ex 3

    n=4,

    𝑨=( 1 2 2 -1 1 1 4 2 -1 3 2 0 1 1 5 3 ).

    Solution. Reduce 𝑨 to row-echelon form

    𝑨( 1 2 2 -1 0 -1 2 3 0 5 4 -1 0 -1 3 4 )( 1 2 2 -1 0 1 -2 -3 0 0 14 14 0 0 1 1 )( 1 2 2 -1 0 1 -2 -3 0 0 1 1 0 0 0 0 )

    The row-echelon form does contain a row of zeros, the columns of 𝑨 do not form a basis for 4. Check in Maxima

    (%i41) 

    A: matrix([1, 2, 2, -1],[1, 1, 4, 2],[-1, 3, 2, 0],[1, 1, 5, 3]);

    (%o41) ( 1 2 2 -1 1 1 4 2 -1 3 2 0 1 1 5 3 )

    (%i42) 

    echelon(A);

    (%o42) ( 1 -3 -2 0 0 1 32 12 0 0 1 1 0 0 0 0 )

    (%i43) 

    
                            

    Ex 4

    n=4,

    𝑨=( -1 2 1 2 1 1 3 1 0 -1 1 1 1 2 -1 2 ).

    Solution. Having understood the procedure of using row operations to obtain the reduced row-echelon form, resort not to automated computation and obtain in Maxima

    (%i43) 

    A: matrix([-1, 2, 1, 2],[1, 1, 3, 1],[0, -1, 1, 1],[1, 2, -1, 2]);

    (%o43) ( -1 2 1 2 1 1 3 1 0 -1 1 1 1 2 -1 2 )

    (%i44) 

    echelon(A);

    (%o44) ( 1 -2 -1 -2 0 1 0 1 0 0 1 0 0 0 0 1 )

    (%i45) 

    
                            

    The row-echelon form does not contain any row of zeros, the columns of 𝑨 form a basis for 4.

  2. Determine whether the following column vectors of 𝑩 form a basis for (𝒱,+,,)

    Ex 1

    𝑩=( 1 2x2+x+2 -x2+x ), 𝒱=𝒫2

    Solution. Consider an arbitrary 𝒑𝒱=𝒫2

    𝒑(x)=a0+a1x+a2x2,

    and check if 𝒑 can be expressed as a linear combination of the basis vectors, 𝑩, i.e., there exists 𝒄3 such that 𝑩𝒄=𝒑

    𝑩𝒄=( 𝒃1(x) 𝒃2(x) 𝒃3(x) )( c1 c2 c3 )=c1𝒃1(x)+c2𝒃2(x)+c3𝒃3(x)=a0+a1x+a2x2=𝒑(x).

    Identify powers of x

    c1𝒃1(x)+c2𝒃2(x)+c3𝒃3(x)=c1+c2(2x2+x+2)+c3(-x2+x)=(c1+2c2)1+(c1+c2)x+(2c2-c3)x2

    to obtain system 𝑴𝒄=𝒂

    ( 1 2 0 1 1 0 0 2 -1 )( c1 c2 c3 )=( a0 a1 a2 ),

    Reduce matrix 𝑴 to row-echelon form.

    𝑴=( 1 2 0 1 1 0 0 2 -1 )( 1 2 0 0 -1 0 0 2 -1 )( 1 2 0 0 -1 0 0 0 -1 )( 1 2 0 0 1 0 0 0 1 ).

    Since the row-echelon form of 𝑴 does not have any zero rows, a unique solution of 𝑴𝒄=𝒂 is found, and 𝑩 is a basis for 𝒫3. Check in Maxima

    (%i3) 

    M: matrix([1, 2, 0],[1, 1, 0],[0, 2, -1]);

    (%o3) ( 1 2 0 1 1 0 0 2 -1 )

    (%i4) 

    echelon(M);

    (%o4) ( 1 2 0 0 1 0 0 0 1 )

    (%i5) 

    
                            

    Ex 2

    𝒱=2×2 the space of real-valued two-by-two matrices,

    𝑩=( ( 1 0 0 0 ) ( 1 1 0 0 ) ( -2 1 1 1 ) ( 0 0 0 2 ) )

    Solution. Here are two approaches:

    1. The basis can be reorganized as a set of 4 vectors

      ( 1 0 0 0 )( 1 0 0 0 ),etc.;𝑩=( 1 1 -2 0 0 0 1 0 0 1 1 0 0 0 1 2 )

      Reduce 𝑩 to row echelon form

      (%i45) 

      B: matrix([1, 1, -2, 0],[0, 0, 1, 0],[0, 1, 1, 0],[0, 0, 1, 2]);

      (%o45) ( 1 1 -2 0 0 0 1 0 0 1 1 0 0 0 1 2 )

      (%i47) 

      echelon(B);

      (%o47) ( 1 1 -2 0 0 1 1 0 0 0 1 0 0 0 0 1 )

      (%i48) 

      
                                  

      Since the reduced row echelon form has no row of zeros 𝑩 is a basis

    2. Denote 𝑩=(𝑩1,𝑩2,𝑩3,𝑩4), and consider whether some general

      𝑨=( a11 a12 a21 a22 )2×2

      can be expressed as a linear combination 𝑨=c1𝑩1+c2𝑩2+c3𝑩3+c4𝑩4

      ( a11 a12 a21 a22 )=c1( 1 0 0 0 )+c2( 1 1 0 0 )+c3( -2 1 1 1 )+c4( 0 0 0 2 ).

      Indentify each component to obtain the system

      { c1+c2-2c3 = a11 c2+c3 = a12 c3 = a21 c3+2c4 = a22 .( 1 1 -2 0 0 1 1 0 0 0 1 0 0 0 1 2 )( c1 c2 c3 c4 )=( a11 a12 a21 a22 ).

      Apart from a permutation of two rows, this is the same as matrix in solution procedure 1, and 𝑩 does form a basis

    Ex 3

    𝒱 is the set of symmetric matrices, 𝑨𝒱 𝑨T=𝑨.

    𝑩=( ( 1 0 0 0 ) ( 0 0 0 1 ) ( 0 1 0 0 ) )

    Solution. Since

    𝑨=( 0 0 1 0 )

    cannot be expressed as a linear combination of elements in 𝑩, the system is not a basis. This is verified if we form the matrix

    𝑩=( 1 0 0 0 0 0 0 0 1 0 1 0 )

    which has a row of zeros.

  3. Find a basis for the subspace 𝒮 of vector space 𝒱. Specify the dimension of 𝒮.

    Ex 1
    𝒮={( s+2t -s+t t )|s,t.},𝒱=3

    Solution. Recognize that the specification of 𝒮 gives a linear combination with scalar coefficients s,t, and rewrite

    ( s+2t -s+t t )=s( 1 -1 0 )+t( 2 1 1 ).

    Construct

    𝑩=( 𝒃1 𝒃2 )=( 1 2 -1 1 0 1 ).

    Check if columns of 𝑩 are linearly independent,

    s𝒃1+t𝒃2=𝟎( s+2t -s+t t )=( 0 0 0 ),

    and since s=t=0 is the only solution, columns of 𝑩 are linearly independent and span the subspace, hence are a basis for 𝒮.

    Ex 2
    𝒮={( a a+d a+d d )|a,d.},𝒱=2×2

    Solution. Since

    ( a a+d a+d d )=a( 1 1 1 0 )+d( 0 1 1 1 )
    𝑩=( ( 1 1 1 0 ) ( 0 1 1 1 ) )

    is a basis.

    Ex 3

    𝒮 is the space of skew-symmetric matrices (𝑨𝒮𝑨T=-𝑨), 𝒱=2×2Solution. Since

    ( 0 a -a 0 )=a( 0 1 -1 0 )
    𝑩=( ( 0 1 -1 0 ) )

    is a basis.

    Ex 4

    𝒮={.p(x)|p(0)=0}, 𝒱=𝒫2.

    Solution. Since 𝒑𝒮𝒑=ax2+bx, 𝑩={x,x2} is a basis.

    Ex 5

    𝒮={.p(x)|p(0)=0,p(1)=0}, 𝒱=𝒫3.

    Solution. Since 𝒑𝒮𝒑=ax3+bx2+cx, with 𝒑(1)=a+b+c=0c=-(a+b), hence

    𝒑=ax3+bx2-(a+b)x=a(x3-x)+b(x2-x),

    such that 𝑩={x3-x,x2-x} is a basis.

  4. Find the coordinates of the vector 𝒗 in the basis 𝑩.

    Ex 1
    𝑩=( 3 -2 1 2 ),𝒗=( 8 0 ),𝒱=2

    Solution. If 𝑩 is a basis for 𝒱=2, then the vector 𝒗 can be expressed as a linear combination of the basis vectors and that scalar coefficients are the coordinates of 𝒗 in basis 𝑩

    𝒗=x1𝒃1+x2𝒃2=𝑩( x1 x2 )Solve( 3 -2 1 2 )( x1 x2 )=( 8 0 )

    to find the coordinates x1=2, x2=-1. Check in Maxima.

    (%i5) 

    B:matrix([3,-2],[1,2]);

    (%o5) ( 3 -2 1 2 )

    (%i6) 

    v:matrix([8],[0]);

    (%o6) ( 8 0 )

    (%i7) 

    linsolve_by_lu(B,v);

    0 errors, 0 warnings

    (%o7) [( 2 -1 ),false]

    (%i8) 

    x: first(%);

    (%o8) ( 2 -1 )

    (%i9) 

    B.x

    (%o9) ( 8 0 )

    (%i10) 

    
                          

    Ex 2
    𝑩=( -2 -1 4 1 ),𝒗=( -2 1 ),𝒱=2

    Solution. Solve by Gauss elimination (row reduction operations on the extended matrix)

    ( -2 -1 -2 4 1 1 )( -2 -1 -2 0 -1 -3 )( -2 0 1 0 1 3 )( 1 0 -12 0 1 3 )

    and the coordinates are (-12,3). Check in Maxima

    (%i48) 

    B:matrix([-2,-1],[4,1]);

    (%o48) ( -2 -1 4 1 )

    (%i49) 

    v:matrix([-2],[1]);

    (%o49) ( -2 1 )

    (%i50) 

    linsolve_by_lu(B,v);

    0 errors, 0 warnings

    (%o50) [( -12 3 ),false]

    Ex 3
    𝑩=( 1 3 1 -1 -1 0 2 1 2 ),𝒗=( 1 0 2 ),𝒱=3

    Solution. Since 𝑩=( 𝒃1 𝒃2 𝒃3 ), and 𝒗=𝒃3 the coordinates are (0,0,1).

    Ex 4
    𝑩=( 2 1 0 2 0 0 1 2 1 ),𝒗=( 0 1 12 ),𝒱=3

    Solution. With 𝑩=( 𝒃1 𝒃2 𝒃3 ), from

    𝒗=c1𝒃1+c2𝒃2+c3𝒃3

    observe from second row that c1=12. Then

    12( 2 2 1 )+c2( 1 0 2 )+c3( 0 0 1 )=( 1+c2 1 12+2c2+c3 )=( 0 1 12 )

    and the other coordinates are c2=-1, c3=2. Verify in Maxima

    (%i51) 

    B:matrix([2,1,0],[2,0,0],[1,2,1]);

    (%o51) ( 2 1 0 2 0 0 1 2 1 )

    (%i52) 

    v:matrix([0],[1],[1/2]);

    (%o52) ( 0 1 12 )

    (%i53) 

    linsolve_by_lu(B,v);

    (%o53) [( 12 -1 2 ),false]

    (%i54) 

    
                          

    Ex 5
    𝑩=( 1 x-1 x2 ),𝒗=-2x2+2x+3,𝒱=𝒫2

    Solution. With 𝑩=( 𝒃1 𝒃2 𝒃3 ) write

    𝒗=-2𝒃3+2𝒃2+5𝒃1=-2(x2)+2(x-1)+5(1)=-2x2+2x-2+5=-2x2+2x+3,

    and the coordinates are (5,2,-2).