18.085 HOMEWORK 1 SOLUTIONS (SKETCH)   4

advertisement
18.085 HOMEWORK 1 SOLUTIONS (SKETCH)



4 3 2 1
1
 3 3 2 1 

1  , T4−1 = 
1.1.1. From T3−1
 2 2 2 1  it's easy to guess the
1
1 1 1 1
−1
general pattern. The ij entry
of
T
is
n
+
1
−
max(i,
n
 j).



3 2 1
3 2 1
1.1.7. We have T3−1 =  2 2 1  , K3−1 = 41  2 4 2  so T3−1 − K3−1 =
1 2 3
1 1 1

 

9 6 3
3 1 
6 4 2  = 14  2  3 2 1 .
4
3 2 1
1
1.1.10. On one hand, H = JT J ⇒


 
3 2 1
0 0 1
1 1 1
0 0 1
H = J −1 T −1 J −1 = JT −1 J =  0 1 0   2 2 1   0 1 0  =  1 2 2
1 1 1
1 0 0
1 0 0
1 2 3
1 1 1
1 −1 0
On the other hand, H = U U T , U =  0 1 −1  ⇒ U −1 =  0 1 1  , H −1 =
0 0 1
0 
0
1




1 1 1
1 1 1
1 0 0
(U −1 )T U −1 =  1 1 0   0 1 1  =  1 2 2  .
0 0 1
1 2 3 
1 1 1

2 −1
0
−1
2 −1 0 −1
 0 3/2 −1 −1/2
 −1 2 −1 0 



→
1.1.12. Do row elimination on C4 : 
0 −1
2
−1
0 −1 2 −1 
0 −1/2 −1 3/2
−1 0 −1 2


2 −1
0
−1
 0 3/2 −1 −1/2 

 = U . The last row of U is 0, hence C4 is singular. New
 0
0
4/3 −4/3 
0
0
0
0
non-zeros appear because of the -1 in the top right corner of C4 .
2
2
1.2.3. For u = x3 , u(x+h)−u(x−h)
= ((x+h)−(x−h))((x+h)2h+(x+h)(x−h)+(x−h) ) =
2h
3x2 + h2 .
2
+(x−h)2 )
For u = x4 , u(x+h)−u(x−h)
= ((x+h)−(x−h))((x+h)+(x−h))((x+h)
= 4x3 +
2h
2h
1 000
2
2
4xh . In each case the error term is exactly 6 u (x)h 
.

1
 −1 1

 is the sum
1.2.4. One directly checks that the inverse of ∆− = 


−1
...




1
−1 1
 1 1


−1 1 


matrix U = 
, we obtain ∆0 =
. Since ∆+ = 
1 1 1
..
.
... ... ... ...

3
= 2
1
2
2
1
1

.


→

18.085 HOMEWORK 1 SOLUTIONS (SKETCH)


0
1
 −1 0

1
1 
−1
2 (∆+ + ∆− ) = 2 


2
1
0



1


1 ,
 . For n = 3, ∆0 = 21  −1

..
−1
. 1 
−1 0
which is singular since rows 1,3 sum to 0. For n = 5, ∆0 is also singular since rows
1,3,5 sum to 0.
1.2.5b. By using Taylor expansion, we have
1
1
1
1
32h5 u00000 (x) + ...
= u(x) + 2hu0 (x) + 4h2 u00 (x) + 8h3 u000 (x) + 16h4 u0000 (x) +
2
6
24
120
1
1
1
1 5 00000
u(x + h) = u(x) + hu0 (x) + h2 u00 (x) + h3 u000 (x) + h4 u0000 (x) +
h u (x) + ...
2
6
24
120
1
1
1 5 00000
1
h u (x) + ...
u(x − h) = u(x) − hu0 (x) + h2 u00 (x) − h3 u000 (x) + h4 u0000 (x) −
2
6
24
120
1
1
1
1
u(x − 2h) = u(x) − 2hu0 (x) + 4h2 u00 (x) − 8h3 u000 (x) + 16h4 u0000 (x) −
32h5 u00000 (x) + ...
2
6
24
120
u(x + 2h)
A straightforward calculation implies −u(x+2h)+8u(x+h)−8u(x−h)+u(x−2h)
= u0 (x)−
12h
+ .... Thus, b = −1/30.
2
1.2.18. The general solution to ddxu2 = x is u = 16 x3 + Bx + C . The boundary
3
conditions u(0) = u(1) = 0 imply C = 0, B = − 61 ,i.e. u(x) = x 6−x .
Hence u(0.2) = −0.032, u(0.4) = −0.056,
u(0.8) = −0.048. The

u(0.6)
 = −0.064,

1 4 00000
(x)
30 h u
u1
0.2
.   . 
nite dierence equation is: − h12 K4 
 ..  =  ..  .

u1
.
Hence 
 ..
u4
u4 
0.8

1
4 3 2
 2 


−1 1  3 6 4
−1

K4−1 
 = 125
 3  = 125 · 5  2 4 6
4
1 2 3


which match the values for the actual solution exactly.

1
1
 2
2 

3  3
4
4

−.032
  −.056 

=
  −.064 ,
−.048


Download