Tell me more ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have the following function $f(x)=\|x-a\|^2+\sum_{i=0}^{n-1}\sqrt{(x_{i+1}-x_i)^2+b}$ where $a$ is a n-vector and $b$ scalar.
I need to find the gradient and the Hessian of $f(x)$.

I am guessing that i need to expand $\|x-a\|^2=(x-a)^T(x-a)=x^Tx-x^Ta-a^Tx-a^Ta$ first. Now I want to use the property of quadratic function where if $f(x)=x^TPx+q^Tx+p => \nabla f(x)=2Px+q$ and $\nabla ^2 f(x)=2P$

I do not know if I am on the right path, but it seams like I cannot figure out what $P$ is. Maybe there is another way of finding gradient and the Hessian of f(x)?

Thanks

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.