20095ee103_1_hw3_sols

# 20095ee103_1_hw3_sols - L. Vandenberghe 10/15/09 EE103...

This preview shows pages 1–4. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: L. Vandenberghe 10/15/09 EE103 Homework 3 solutions 1. Exercise 4.5. We can write f ( u 1 , u 2 ) as f ( u 1 , u 2 ) = u 2 1 p 11 + 2 u 1 u 2 p 12 + u 2 2 p 22 + u 1 q 1 + u 2 q 2 + r. For given u 1 and u 2 , this is a linear function of the unknowns p 11 , p 12 , p 22 , q 1 , q 2 , r . For example, f (0 , 1) = 6 means p 22 + q 2 + r = 6 . We therefore obtain the following set of equations: 0 0 1 1 1 1 0 0 1 0 1 1 2 1 1 1 1 1 2 1 1 1 1 1 4 4 1 2 1 4 4 1 2 1 1 p 11 p 12 p 22 q 1 q 2 r = 6 6 3 7 2 6 . &gt;&gt; A = [0 1 1 1; 1 1 1; 1 2 1 1 1 1; 1 2 1 -1 -1 1; 1 4 4 1 2 1; 4 4 1 2 1 1] &gt;&gt; b = [6; 6; 3; 7; 2; 6 ]; &gt;&gt; x = A\b x = 3.0000-2.0000 1.0000-2.0000 0.0000 5.0000 We can check the answer as follows. 1 &gt;&gt; P = [x(1), x(2); x(2), x(3)]; &gt;&gt; q = [x(4); x(5)]; &gt;&gt; r = x(6); &gt;&gt; u = [0;1]; u*P*u + q*u + r ans = 6 &gt;&gt; u = [1;0]; u*P*u + q*u + r ans = 6.0000 &gt;&gt; u = [1;1]; u*P*u + q*u + r ans = 3.0000 &gt;&gt; u = [-1;-1]; u*P*u + q*u + r ans = 7.0000 &gt;&gt; u = [1;2]; u*P*u + q*u + r ans = 2 &gt;&gt; u = [2;1]; u*P*u + q*u + r ans = 6 2. Exercise 4.7. (a) We have integraltext 1 t k dt = 1 / ( k + 1), so the conditions on w are n summationdisplay i =1 w i t k i = 1 k + 1 , k = 0 , 1 , . . . , n 1 . This is a set of linear equations with variables w i : 1 1 1 t 1 t 2 t n t 2 1 t 2 2 t 2 n . . . . . . . . . t n- 1 1 t n- 1 2 t n- 1 n w 1 w 2 . . . w n = 1 1 / 2 1 / 3 . . . 1 /n . (b) This follows from linearity of integration and of the integration rule. If the integration rule is exact for all powers of t up to t n- 1 , then applying it to the function f ( t ) = a + a 1 t + + a n- 1 t n- 1 , gives integraldisplay 1 f ( t ) dt = integraldisplay 1 ( a + a 1 t + + a n- 1 t n- 1 ) dt = a + a 1 integraldisplay 1 t dt + a 2 integraldisplay 1 t 2 dt + + a n- 1 integraldisplay 1 t n- 1 dt 2 = a parenleftBigg summationdisplay i w i parenrightBigg + a 1 parenleftBigg summationdisplay i w i t i parenrightBigg + a 2 parenleftBigg summationdisplay i w i t 2 i parenrightBigg + + a n- 1 parenleftBigg summationdisplay i w i t n- 1 i parenrightBigg = n summationdisplay i =1 w i ( a + a 1 t i + a 2 t 2 i +...
View Full Document

## This note was uploaded on 05/10/2010 for the course EE EE103 taught by Professor Jacobson during the Spring '09 term at UCLA.

### Page1 / 8

20095ee103_1_hw3_sols - L. Vandenberghe 10/15/09 EE103...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online