{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

20105ee103_1_hw8_sols

20105ee103_1_hw8_sols - L Vandenberghe EE103 Homework 8...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
L. Vandenberghe 12/2/10 EE103 Homework 8 solutions 1. Exercise 13.4 We define x = bracketleftBigg α β bracketrightBigg , A = 1 u 1 1 u 2 . . . . . . 1 u 42 , b = v 1 v 2 . . . v 42 . (a) We solve minimize bardbl Ax b bardbl 2 . The Matlab code is [u,v] = ch13ex4; m = length(u); A = [ones(m,1) u]; b = v; xa = A\b; The solution is α = 4 . 1841, β = 0 . 5755. (b) To make it easier to find the derivatives we express g as g ( x ) = h ( Ax b ) where h ( z ) = 42 summationdisplay i =1 radicalBig z 2 i + ρ, and ρ = 25. The first and second derivatives of h are given by ∂h ( z ) ∂z i = z i ( z 2 i + ρ ) 1 / 2 , 2 h ( z ) ∂z 2 i = ρ ( z 2 i + ρ ) 3 / 2 , 2 h ( z ) ∂z i ∂z j = 0 ( i negationslash = j ) . In other words, 2 h ( z ) is diagonal. To form the gradient and Hessian of g we can then use the formulas g ( x ) = A T h ( Ax b ) , 2 g ( x ) = A T h ( Ax b ) A. The Matlab code is as follows. rho = 25; x = xa; % use LS solution as starting point for k = 1:50 z = A*x - b; 1
Image of page 1

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

View Full Document Right Arrow Icon
grad = A’ * (z./sqrt(z.^2+rho)); if (norm(grad) < 1e-6); break; end; hess = A’ * diag( rho./(z.^2+rho).^(3/2) ) * A; x = x - hess\grad; end; xb = x; The solution is α = 4 . 8164, β = 0 . 8975. (c) Here we express g as g ( x ) = h ( Ax b ) where h ( z ) = 42 i =1 z 4 i . The gradient and derivatives of h are given by ∂h ( z ) ∂z i = 4 z 3 i , 2 h ( z ) ∂z 2 i = 12 z 2 i , 2 h ( z ) ∂z i ∂z j
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern