0% found this document useful (0 votes)
114 views

Practice Final Solutions

1. The document provides solutions to problems on a practice final for Math 54. It finds particular and general solutions to a differential equation, and verifies the eigenvalues, eigenvectors, and SVD decomposition provided by ChatGPT for a given matrix are incorrect. 2. It provides solutions to additional linear algebra problems: finding a matrix with a given rank and nullity, a matrix such that A^2 is non-zero but A^3 is zero, a non-invertible matrix with one eigenvalue, and the matrix representation of a given linear transformation. 3. It proves statements about properties of matrices and linear transformations to be true or false, justifying the answers.

Uploaded by

Brad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views

Practice Final Solutions

1. The document provides solutions to problems on a practice final for Math 54. It finds particular and general solutions to a differential equation, and verifies the eigenvalues, eigenvectors, and SVD decomposition provided by ChatGPT for a given matrix are incorrect. 2. It provides solutions to additional linear algebra problems: finding a matrix with a given rank and nullity, a matrix such that A^2 is non-zero but A^3 is zero, a non-invertible matrix with one eigenvalue, and the matrix representation of a given linear transformation. 3. It proves statements about properties of matrices and linear transformations to be true or false, justifying the answers.

Uploaded by

Brad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Math 54 Practice Final Solutions

May 7, 2023

1. Find the particular and general solutions for the differential equation
y ′′ + 2y ′ + y = 4e−t + 2t2 sin t.

SOLUTION: The auxiliary equation is


r2 + 2r + 1 = (r + 1)2 = 0,
so a general solution to the corresponding homogeneous equation is
c1 e−t + c2 te−t .

To find a solution to the nonhomogeneous equation, we consider each term separately. First note that
4e−t = 4t0 e−t . Since r = −1 is a double root of the auxiliary equation, our particular solution must
lie in
W = span{e−t , te−t , t2 e−t }
(the double root means we go up to t0+2 = t2 ). We have T (e−t ) = 0, T (te−t ) = 0, and T (t2 e−t ) = 2e−t .
Thus T (c1 e−t + c2 te−t + c3 t2 e−t ) = 4e−t can be solved by solving the linear system with augmented
matrix  
0 0 2 4
0 0 0 0 .
0 0 0 0
Solving this gives the first term in our nonhomogeneous solution as 2t2 e−t .
For the other terms, we note that t2 sin t = t2 e0t sin t. As 0 ± i is not a root of the auxiliary equation,
our corresponding solution will lie in
W = span{sin t, cos t, t sin t, t cos t, t2 sin t, t2 cos t}.
We can compute
T (sin t) = 2 cos t
T (cos t) = −2 sin t
T (t sin t) = 2 sin t + 2 cos t + 2t cos t
T (t cos t) = −2 sin t + 2 cos t − 2t sin t
T (t2 sin t) = 2 sin t + 4t sin t + 4t cos t + 2t2 cos t
T (t2 cos t) = 2 cos t − 4t sin t + 4t cos t + 2t2 sin t.

Thus we can solve T (yp ) = t2 sin t by solving the system with augmented matrix
 
0 −2 2 −2 2 0 0
2 0 2 2 0 2 0
 
0 0 0 −2 4 −4 0
 .
0 0 2 0 4 4 0
 
0 0 0 0 0 −2 2
0 0 0 0 2 0 0

1
This gives the particular solution

−3 sin t + 2t sin t + 2t cos t − t2 cos t.

Combining these solutions gives the total particular solution

yp = 2t2 e−t − 3 sin t + 2t sin t + 2t cos t − t2 cos t,

so that any solution to our ODE can be written as

y = c1 e−t + c2 te−t + 2t2 e−t − 3 sin t + 2t sin t + 2t cos t − t2 cos t.


 
25 −15
2. ChatGPT tells us that the SVD of A = by finding the eigenvalues and eigenvectors of
−15 25
AT A and using those to compute U and V matrices.
(a) ChatGPT tells us that the eigenvalues are 700 and 100. Is this correct? If not, what is / are the
correct eigenvalue(s)?
√   √ 
2/2 − 2/2
(b) ChatGPT tells us that the eigenvectors are √ and √ . Is this correct? If not, what
2/2 2/2
is / are the correct eigenvector(s)?
(c) ChatGPT tells us that
√ √  √ √ 
2/2 −√ 2/2 2/2 −√ 2/2
U= √ and V = √ .
2/2 2/2 2/2 2/2

Is this correct? If not, what is / are the correct U and V?


SOLUTION: ChatGPT is not correct on any of these points. To see this, we compute the SVD of A.
Note that A = AT , and we have  
850 −750
AT A = .
−750 850
We can compute det(AT A −λI) = (λ − 1600)(λ − 100), so the eigenvalues are λ1 = 1600 and λ2 = 100.
−1
For λ1 = 1600, we see that is an eigenvector of AT A with eigenvalue λ1 . For λ2 = 100, we see
1

 
1
that is an eigenvector of AT A with eigenvalue λ2 . Computing the singular values (σi = λi ) and
1
normalizing the eigenvectors, we get
   √ √ 
40 0 −√ 2/2 √2/2
Σ= and V = .
0 10 2/2 2/2

Note that ChatGPT reverses the columns of V (which is wrong!). For the matrix U, we have
 √   √  √  √ 
1 − 2/2 − 2/2 1 2/2 2/2
⃗u1 = A √ = √ and ⃗u2 = A √ = √ ,
40 2/2 2/2 10 2/2 2/2
so that  √ √ 
− 2/2 √2/2 .
U= √
2/2 2/2

3. (a) Find a 5 × 6 matrix with rank 2 and nullity 4.


SOLUTION: We can take  
1 0 0 0 0 0
0 1 0 0 0 0
 
0 0 0 0 0 0
 .
0 0 0 0 0 0
0 0 0 0 0 0

2
(b) Find a nonzero matrix A such that A2 ̸= 0 and A3 = 0.
SOLUTION: We can take  
0 1 0
0 0 2 ,
0 0 0
the matrix of the differentiation map D : P2 (R) → P2 (R).

(c) Find a non-invertible matrix with only one eigenvalue.


SOLUTION: The zero matrix is one such matrix.

(d) Find the matrix representation


    (in
 terms of the standard basis) of the linear transformation
1 3 2 −4
R2 → R2 sending to and to .
1 8 3 −1
SOLUTION: Note that
           
1 1 2 0 2 1
=3 − and = −2 .
0 1 3 1 3 1

Thus                 
1 1 2 1 2 3 −4 13
T =T 3 − = 3T −T =3 − = .
0 1 3 1 3 8 −1 25
Similarly                
1 2 1 2 1 −4 3 −10
T =T −2 =T − 2T = −2 = .
0 3 1 3 1 −1 8 −17
We obtain  
13 −10
T= .
25 −17

4. True / False. Justify your answer.


(a) A matrix A and its transpose AT have the same eigenvalues.
SOLUTION: True. The characteristic polynomial of AT is

det(AT − λI) = det(AT − λIT ) = det((A − λI)T ) = det(A − λI),

which is the characteristic polynomial of A. Since A and AT have the same characteristic poly-
nomial, they must also have the same eigenvalues.

(b) If the matrix A2 is invertible, then the matrix A3 is invertible.


SOLUTION: True. Write B for the inverse of A2 . Then

A3 (A3 B3 ) = A2 A2 A2 BBB = A2 A2 IBB = A2 IB = I,

so A3 B3 is the inverse of A3 , and in particular A3 is invertible.

(c) If U and W are subspaces of a vector space V, and we let

U + W = {⃗u + w
⃗ | ⃗u ∈ U, w
⃗ ∈ W}

(this is a subspace of V), then

dim(U + W) = dim U + dim W.

SOLUTION: False. For example, if U = W = V = R1 , then U + W = R1 , so dim(U + W) = 1


and dim U + dim W = 2.

3
(d) The set {1, sin x, cos x, sin2 x, cos2 x} is linearly independent.
SOLUTION: False. We have the linear relation cos2 x + sin2 x = 1.

(e) If a matrix A has zero as one of its eigenvalues, then the dimension of the null space of A is at
least 1.
SOLUTION: True. If λ = 0 and A⃗v = λ⃗v = 0 (with ⃗v ̸= 0), then ⃗v is in the null space of A, so
dim Nul A ⩾ 1.
 
  3 −12 4 0
3 −12 4 −1 0 −2 0
5. Suppose A = −1 0 −2 and B =  .
−1 5 −1 0
−1 5 −1
0 0 0 0
(a) How do the characteristic equations of A and B differ?
SOLUTION: The characteristic polynomial of B is −λ times the characteristic polynomial of A.

(b) How do the rank and nullity of A and B differ?


SOLUTION: We have rank A = rank B and dim Nul A + 1 = dim Nul B.

(c) Find all the eigenvalues of A5 . (Hint: the eigenvalues of A are integers.)
SOLUTION: We can compute
dim(A − λI) = −λ3 + 2λ2 + 8λ − 2 = −(λ − 2)(λ − 1)(λ − 1)
by guessing and checking, so λ = ±1, 2. If we diagonalize A, say A = PDP−1 , then A5 = PD5 P−1 ,
and the eigenvalues of A5 are 15 = 1, (−1)5 = −1, and 25 = 32.

(d) What are the eigenvalues of A−1 ?


SOLUTION: If λ is an eigenvalue of A, then A⃗v = λ⃗v gives ⃗v = A−1 A⃗v = λA−1⃗v, hence A−1⃗v =
1
λ⃗v. The eigenvalues of A−1 are therefore the multiplicative inverses of those of A, namely 1, −1,
and 1/2.
6. Let V be the vector space of 2 × 2 matrices. Consider the map
   
2 3 2 3
T (A) = A−A .
5 7 5 7
(a) Show that A is a linear transformation.
SOLUTION: We have
   
2 3 2 3
T (αA + βB) = (αA + βB) − (αA + βB)
5 7 5 7
       
2 3 2 3 2 3 2 3
=α A−A +β B−B
5 7 5 7 5 7 5 7
= αT (A) + βT (B).
(b) Show that a linear transformation S is injective if and only if the null space of S is the zero vector
space.
SOLUTION: If ⃗u is injective, let ⃗u ∈ Nul S. Then T (⃗u) = T (⃗0) = ⃗0 forces ⃗u = ⃗0.
Conversely, suppose Nul S = ⃗0. If T (⃗u) = T (⃗v), then T (⃗u −⃗v) = ⃗0, hence ⃗u −⃗v = ⃗0, and finally we
see ⃗u = ⃗v.
(c) Is T injective?
SOLUTION: No. For example, we have
           
2 3 1 0 1 0 2 3 2 3 2 3 0 0
T (I) = − = − = .
5 7 0 1 0 1 5 7 5 7 5 7 0 0
Thus I ∈ Nul T , so Nul T ̸= {⃗0} and T cannot be injective.

4
(d) Is T bijective?
SOLUTION: No, because T is not injective.
7. (a) Find the Fourier series of f(x) = ex on the interval [−π, π].
SOLUTION: We can compute
Z
1 π x eπ − e−π
a0 = e dx =
π −π π
and
Z
1 π x
an = e cos(nx)dx
π −π
1 ex
= [cos(nx) − n sin(nx)]π
−π
π 1 + n2
1 (−1)n (eπ − e−π )
= 2
(eπ (−1)n − e−π (−1)n ) = .
π(1 + n ) π(1 + n2 )
Similarly
Z
1 π x
bn = e sin(nx)dx
π −π
1 ex
= [sin(nx) − n cos(nx)]π −π
π 1 + n2
1 π n −π n −n(−1)n (eπ − e−π )
= (e (−n)(−1) − e (−n)(−1) ) = .
π(1 + n2 ) π(1 + n2 )
Thus our Fourier series on [−π, π] is
∞ 
eπ − e−π X (−1)n (eπ − e−π ) −n(−1)n (eπ − e−π )

ex = + cos(nx) + sin(nx) .
2π n=1
π(1 + n2 ) π(1 + n2 )

(b) Sketch the 2π-periodic even extension of f(x) = ex . Find the Fourier cosine series of f(x) = ex on
the interval (0, π).
SOLUTION: A sketch is provided in Fig. 1.

Figure 1: Sketch of the even extension of f(x) = ex .

For the Fourier cosine series, we compute



2 2(eπ − 1)
a0 = ex dx =
π 0 π
and

2 2 2
ex cos(nx)dx = eπ cos(nπ) − e0 cos 0 = (eπ (−1)n − 1).

an =
π 0 π(n2+ 1) 2
π(n + 1)
Thus our Fourier cosine series is
X∞
!
eπ − 1 2 eπ (−1)n − 1
+ cos(nx) .
π π n=1
n2 + 1

5
(c) Sketch the 2π-periodic odd extension of f(x) = ex . Find the Fourier sine series of f(x) = ex on
the interval (0, π).
SOLUTION: A sketch is provided in Fig. 2.

Figure 2: Sketch of the odd extension of f(x) = ex .

For the Fourier sine series, we compute


Z
2 π x
bn = e sin(nx)dx
π 0
 
2 −n
= [ex cos(nx)]π
0
π n2 + 1
−2n 2n
= 2
(eπ cos(nπ) − 1) = (−eπ (−1)n + 1) .
π(n + 1) π(n2 + 1)

Thus our Fourier sine series is



2 X n
(1 − eπ (−1)n ) sin(nx).
π n=1 n2 + 1

8. (a) To find the best fit line y = β0 + β1 x given points (x1 , y1 ), (x2 , y2 ), . . . , (xn , yn ), we find the least
squares solution to the system of equations

β0 + β1 x1 = y1
β0 + β1 x2 = y2
...
β0 + β1 xn = yn .

Write this system of equations as a matrix equation. Find the best fit line given the points (1, 0),
(2, 1), (3, 1).
SOLUTION: The matrix equation is
   
1 x1 y1
1 x2     y2 
 0 β
..  β =  ..  .
  
 ..
. .  1  . 
1 xn yn

For the specific collection of points mentioned, this becomes


   
1 1   0
β
1 2 0 = 1 .
β1
1 3 1

6
To find a least-squares solution, we consider the equation
   
  1 1     0
1 1 1  β 1 1 1  
1 2 0 = 1 ,
1 2 3 β1 1 2 3
1 3 1

or equivalently     
3 6 β0 2
= .
6 14 β1 5
We can solve to get β0 = −1/3 and β1 = 1/2. Our line of best fit is then y = − 13 + 12 x.

(b) For the best fit cubic curve y = β0 +β1 x+β2 x2 +β3 x3 given points (x1 , y1 ), (x2 , y2 ), . . . , (xn , yn ),
write the system of equations as well as the matrix equation for which we seek the least squares
solution.
SOLUTION: The system of equations is

β0 + β1 x1 + β2 x21 + β3 x31 = y1
.. ..
.=.
β0 + β1 xn + β2 x2n + β3 x3n = yn .

In matrix form this is


x21 x31 β0 
   
1 x1 y1
1 x2 x22 x32     y2 
 β1   
 = . .

 .. .. .. ..  
. . . .  β2  .. 
1 xn x2n x3 β3 yn
n

(c) Find the best fit cubic curve given the points (−2, −5), (−1, 1), (0, −3), (1, 2), (2, 7).
SOLUTION: The matrix equation here is
   
1 −2 4 −8   −5
1 −1 1 −1 β0 1
1 0 0 0  β1  = −3 .
    
1 1 1 1  β 2
    
2
β3
1 2 4 8 7

We can find the cubic of best fit using least-squares as before: the solution is y = β0 + β1 x +
β2 x2 + β3 x3 , where
3 1 1 5
β0 = − , β1 = − , β2 = , β3 = .
5 3 2 6

You might also like