You are on page 1of 2

CIVL 598/698 – Spring 2018

Homework 1

1. For the X and Y matrices given below, use the excel functions to determine:
a) XT
b) XTY
c) (XTX)-1
d) (XTX)-1XTY

9 15 6 511 3

[ ] []
71840
X = 2 3 1 914
8 9 4 1210
6 1 1125
−2
Y= 5
6
4

2. Solve the following set of equations on a spreadsheet by finding x = A-1b

i) 5x1 + 3x2 - x3 = 5
2x1 - 6x2 - 3x3 = 6
3x1 + 4x2 + 2x3 = 9

ii) 2x1 - 3x2 - 2x3 = 3


-4x1 + 2x2 + 3x3 = 5
2x1 - 7x2 - 3x3 = 14

3. Use Solver to solve the set of equations given in problem 2, why is there now a solution for
set ii). Also use solver for the nonlinear set of equations given below.
x12 + 2x22 - 5x1 + 7x2 = 40
3x12 - x22 + 4x1 + 2x2 = 28

4. Determine a general Taylor series approximation for cos(x) about π/4. Then let x = π/6 and
use the Taylor Series to find cos(π/6) to an error of o(∆x)6.

5. Use a spreadsheet to determine the finite difference approximations for the 1 st and 2nd
derivatives for the following tabulated function. Use central difference approximations for
the interior points, and forward and backward approximations for the respective end points.

x 0 6 12 18 24 30 36 42 48 54 60
f(x) 24 12 4 14 31 78 136 98 55 40 32

6. For f(x) = 2x3 - 3x2 + 4x + 5, create a table of x vs f(x), f’(x) and f”(x) for -10 ≤ x ≤ 10
in which the 1st and 2nd derivatives are computed by finite difference approximations. Use
central difference approximations for the interior points, and forward and backward
approximations for the respective end points. Use increments of ∆x = 2.0, 1.0, and 0.5.
Compare the finite difference approximations to the actual values of the derivatives. Which
increment gives satisfactory results? Why are the 2nd derivative approximations so accurate?

You might also like