TTK4135 - Optimalisering og regulering
Problem 1 (25%) Definitions
a)
Gradient It points in the direction of the greatest rate of increase of the function, and its magnitude gives the rate of increase in that direction.
The gradient is a vector composed of the partial derivatives of the function with respect to each of its variables, where f : R n → R .
∇ f ( x ) = [ ∂ x ∂ f ] T = [ ∂ x 1 ∂ f … ∂ x n ∂ f ]
Link to original
b)
Jacobian The Jacobian is a generalization of the Gradient where we look at a continuously differentiable function f : R n → R m .
∂ x ∂ f = ∂ x 1 ∂ f 1 ⋮ ∂ x 1 ∂ f m ⋯ ⋱ ⋯ ∂ x n ∂ f 1 ⋮ ∂ x n ∂ f m
Link to original
c)
The resulting gradient will be 1 × n
∇ f ( x ) = ∂ x ∂ f = [ ∂ x 1 ∂ f … ∂ x n ∂ f ]
d)
The resulting jacobian will be m × n
∂ x ∂ f = ∂ x 1 ∂ f 1 ⋮ ∂ x 1 ∂ f m ⋯ ⋱ ⋯ ∂ x n ∂ f 1 ⋮ ∂ x n ∂ f m
Problem 2 (25%) Linear
Let f ( x ) = A x , where
A = [ a 11 a 21 a 12 a 22 ] , x = [ x 1 x 2 ]
a)
∂ x ∂ f ( x ) ∂ x ∂ f ( x ) ∂ x ∂ f ( x ) ∂ x ∂ f ( x ) ∂ x ∂ f ( x ) = ∂ x ∂ A x = ∂ x ∂ [ a 11 x 1 + a 12 x 2 a 21 x 1 + a 22 x 2 ] = [ f 1 f 2 ] = [ ∂ x 1 ∂ f 1 ∂ x 1 ∂ f 2 ∂ x 2 ∂ f 2 ∂ x 2 ∂ f 2 ] = [ a 11 a 21 a 12 a 22 ] = A
This is the jacobian of x , since f ( x ) is a vector with two elements.
b)
∂ x ∂ A x = A
When x : n × 1 and f : m × n .
Problem 3 (25%) Nonlinear
Let f ( x , y ) = x T G y , where
x = [ x 1 x 2 ] , G = [ g 11 g 21 g 12 g 22 g 13 g 23 ] , y = y 1 y 2 y 3
a) Gradient With Respect to a Variable
The dimensions of f ( x , y ) is 1 × 2 ∗ 2 × 3 ∗ 3 × 1 = 1 × 1
∂ x ∂ f ( x , y ) will have dimensions m × n = 1 × 2 , while ∇ x f ( x , y ) will have dimensions 2 × 1 . They are therefore a transpose different.
b)
Method 1
∇ x f ( x , y ) ∇ x f ( x , y ) ∇ x f ( x , y ) = G y = [ g 11 g 21 g 12 g 22 g 13 g 23 ] y 1 y 2 y 3 = [ g 11 y 1 + g 12 y 2 + g 13 y 3 g 21 y 1 + g 22 y 2 + g 23 y 3 ]
Method 2
∇ x f ( x , y ) ∇ x f ( x , y ) ∇ x f ( x , y ) ∇ x f ( x , y ) = ∇ x ( x T G y ) = ∇ x ( x 1 y 1 g 11 + x 2 y 1 g 21 + x 1 y 2 g 12 + x 2 y 2 g 22 + x 1 y 3 g 13 + x 2 y 3 g 23 ) = [ ∂ x 1 ∂ f x 2 ∂ f ] = [ g 11 y 1 + g 12 y 2 + g 13 y 3 g 21 y 1 + g 22 y 2 + g 23 y 3 ]
c)
We have f ( x , y ) = x 1 y 1 g 11 + x 2 y 1 g 21 + x 1 y 2 g 12 + x 2 y 2 g 22 + x 1 y 3 g 13 + x 2 y 3 g 23 , and calculate
∇ y f ( x , y ) ∇ y f ( x , y ) = ∂ y 1 ∂ f ∂ y 2 ∂ f ∂ y 3 ∂ f = x 1 g 11 + x 2 g 21 x 1 g 12 + x 2 g 22 x 1 g 13 + x 2 g 23
d)
Using a variant of the product rule, we first differentiate with respect to the “first x”, and then with respect to the “second x” similar to how we did in a) and b)
∇ f ( x ) = G x + G T x
Since G is symmetric, G = G T , we get
∇ f ( x ) = 2 G x
Problem 4 (25%) Common case
Given this scalar operator
L ( x , λ , μ ) = x T G x + λ T ( C x − d ) + μ T ( E x − h )
Find
a) ∇ x L ( x , λ , μ )
∇ x L ( x , λ , μ ) = ( G x + G T x ) + C T λ + E T μ
b) ∇ λ L ( x , λ , μ )
∇ λ L ( x , λ , μ ) = C x − d
c) ∇ μ L ( x , λ , μ )
∇ μ L ( x , λ , μ ) = E x − h