Download 1 Maths Review Questions - Set 2

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Mathematics of radio engineering wikipedia , lookup

Genetic algorithm wikipedia , lookup

Routhian mechanics wikipedia , lookup

System of polynomial equations wikipedia , lookup

Multiple-criteria decision analysis wikipedia , lookup

Mathematical optimization wikipedia , lookup

Transcript
1
Maths Review Questions - Set 2
1.1
Partial Derivatives - one more try
Take all the partial derivatives of the following functions
1. f (x, y, z) = x3 y 2 z + z 2 y + y 2 x
fx (x, y, z) = 3x2 y 2 z + y 2
fy (x, y, z) = 2x3 yz + z 2 + 2yx
fz (x, y, z) = x2 y 2 + 2zy
2. f (x, y, z) = (xy + z)(x + y)3
fx (x, y, z) = y(x + y)3 + 3(x + y)2 (xy + z)
fy (x, y, z) = x(x + y)3 + 3(x + y)2 (xy + z)
fz (x, y, z) = (x + y)3
3. f (x, y) = log xy
There are two ways to solve this. One way is to note that
f (x, y) = log xy = log x + log y
=⇒ fx (x, y) =
fy (x, y) =
1
x
1
y
Or by chain rule
1
fx (x, y) = y. yx
=
1
x
1
fy (x, y) = x. yx
=
1
y
4. f (x, y) = log xy
As above
fx (x, y) =
1
x
fy (x, y) = − y1
3
5. f (x, y) = (x2 + (xy + y 2 )) 2
1
fx (x, y) = 32 (x2 + (xy + y 2 )) 2 (2x + y)
1
fy (x, y) = 32 (x2 + (xy + y 2 )) 2 (2y + x)
1.2
Maximizing functions of one variable
For each of the following functions
• Find the critical points (i.e. the points where the function is flat)
• Categorize these points as local maxima or minima (if possible)
1
• Explain whether any of these points are global maxima or minima
Take the first derivatives of the following functions
1. f (x) = −3x2 + 9x + 8
FOC:
f 0 (x) = −6x + 9 = 0
x=
3
2
This is the only critical point
SOC:
f 00 (x) = −6 < 0
This is therefore a local maximum
As we only have one critical point, and it is a local maximum, then we
know from theorem 4 from the Prelim handout 2 that we have a global
maximum.
2. f (x) = 7x2 + 2x + 3
FOC:
f 0 (x) = 14x + 2 = 0
x = − 17
This is the only critical point
SOC:
f 00 (x) = 14 > 0
This is therefore a local minimum
As we only have one critical point, and it is a local minimum, then we
know from theorem 4 from the Prelim handout 2 that we have a global
minimum.
3. f (x) =
x3
3
FOC:
+ x2 − 8x + 10
f 0 (x) = x2 + 2x − 8 = (x + 4)(x − 2) = 0
x = −4, 2
There are two critical points
SOC:
f 00 (x) = 2x + 2
f 00 (−4) = −6 < 0
This is a local maximum
f 00 (2) = 6 > 0
2
This is therefore a local minimum
We can see that neither of these points are global extrema. The easiest
way to see this is to note that, as x gets very large, f (x) goes to +∞ and
as x gets very small, f (x) goes to −∞
1.3
Maximizing functions of two variables
For the following functions, find the critical points (i.e. the point where the
function is flat with regard to all its arguments)
1. f (x, y) = x4 + x2 − 6xy + 3y 2
FOC
fy (x, y) = −6x + 6y = 0
⇒x=y
fx (x, y) = 4x3 + 2x − 6y = 0
but as x=y
⇒ 4x3 + 2x − 6x = 0
⇒ 4x(x2 − 1) = 0
⇒ x = 0, x = 1, x = −1
So critical points lie at
(0, 0), (1, 1), (−1, −1)
2. f (x, y) = xy 2 + x3 y − xy
FOC
fx (x, y) = y 2 + 3x2 y − y = 0
⇒ y(y + 3x2 − 1) = 0
fy (x, y) = 2xy + x3 − x = 0
⇒ x(2y + x2 − 1) = 0
The FOC with respect to x tells us that either y = 0 or y + 3x2 − 1 = 0.
Similarly, the second equation tells us that either x = 0 or 2y +x2 −1 = 0 .
This gives us 4 different cases
(i) x = 0, y = 0
(ii) y = 0, 2y + x2 − 1 = 0
⇒ x2 = 1
⇒ x = 1, x = −1
(iii) y + 3x2 − 1 = 0, x = 0
⇒y=1
(iv) y + 3x2 − 1 = 0, 2y + x2 − 1 = 0
3
⇒ x2 = 1 − 2y
⇒ y + 3(1 − 2y) − 1 = 0
⇒ 5y = 2 ⇒ y =
2
5
⇒ x2 = 1 − 2. 25 =
⇒x=
√1 , x
5
=
1
5
− √15
So, collecting all the different cases, we get the following critical points
(0, 0), (−1, 1), (1, 1), (0, 1), (− √15 , 25 ), ( √15 , 25 )
1.4
Constrained optimization
In the following two problems there is only one critical point, which I shall tell
you is the maximum. Find it.
1. Maximize 3 log x + 2 log y subject to 3x + 4y = 10
(i) Form the Lagrangian
L(x, y, µ) = 3 log x + 2 log y − µ(3x + 4y − 10)
(ii) Take the first order conditions
Lx (x, y, µ) =
Ly (x, y, µ) =
3
x
2
y
− 3µ = 0 ⇒
− 4µ = 0 ⇒
3
x
2
y
= 3µ
= 4µ
Lµ (x, y, µ) = 3x + 4y − 10 = 0
(iii) Divide the x, y FOC by each other to get rid of µ
3
x
2
y
=
3µ
4µ
⇒
3y
2x
=
3
4
(iv) Get x in terms of y (or visa versa)
3y
2x
=
3
4
⇒y=
x
2
(v) Substitute into the constraint and solve
3x + 4( x2 ) = 10 ⇒ 5x = 10 ⇒ x = 2 ⇒ y = 1
2. Maximize xα y (1−α) subject to px x + py y = I.(Note that a, px , py I are
parameters for this problem your answer should be a function of x and y
in terms of these values)
See separate sheet
If you use the Lagrangian method on the following problem, you will get two
solutions. One will be a maximum and the other will be a minimum. Find them
both and decide which is which.
First, a quick apology - there are actually 4 solutions to this problem, but
as we shall see below, they come in two very similar pairs of two.
4
1. Maximize x2 + y 2 subject to x2 + xy + y 2 = 3
(i) Form the Lagrangian
L(x, y, µ) = x2 + y 2 − µ(x2 + xy + y 2 − 3)
(ii) Take the first order conditions
Lx (x, y, µ) = 2x − µ(2x + y) = 0 ⇒ 2x = µ(2x + y)
Ly (x, y, µ) = 2y − µ(2y + x) = 0 ⇒ 2y = µ(2y + x)
Lµ (x, y, µ) = x2 + xy + y 2 − 3 = 0
(iii) Divide the x, y FOC by each other to get rid of µ
2x
2y
=
µ(2x+y)
µ(2x+y)
⇒
x
y
=
(2x+y)
(2y+x)
(iv) Get x in terms of y (or visa versa)
x
y
=
(2x+y)
(2y+x)
⇒ x(2y + x) = y(2x + y) ⇒ 2xy + x2 = 2xy + y 2
⇒ x2 = y 2 ⇒ x = y or x = −y
(v) Substitute into the constraint and solve
Case 1: x = y
x2 + xy + y 2 = 3 ⇒ x2 + x2 + x2 = 3 ⇒ 3x2 = 3 ⇒ x2 = 1
Which gives 2 solutions: (1, 1) and (−1, −1)
Case 2: x = −y
x2 + xy + y 2 = 3 ⇒ x2 − x2 + x2 = 3 ⇒ x2 = 3
√ √
√
√
Which gives 2 solutions: (− 3, 3) and ( 3, − 3)
To find out which of these are the max and which are the minima, substitute the solutions back into the objective function. This tells you that
the two solutions from case 1 give you f (x, y) = x2 + y 2 = 1 + 1 = 2,
whereas the solutions from case 2 are (x, y) = x2 + y 2 = 3 + 3 = 6. The
two solutions from case 1 are therefore minima whereas the two solutions
from case 2 are maxima.
5