CS代写 Vectors and Optimization Exercisies Solutions

Vectors and Optimization Exercisies Solutions
c = (2;2) d = (0; 2)
ab=1 ac=6 bc=2
dc = 4 bd=0

Copyright By PowCoder代写 加微信 powcoder

Therefore b and d are orthogonal. When the scalar product is positive, the vectors are at an acute angle. When the scalar product is negative, as for d and c; they are at an obtuse angle.
2. c=a+b=(3;1;6);andd=ab=(1;3;0);scalarproducts
ab=9 a  c = 23 b  c = 23
3.aB=(1;0);Ba0=12;aa0=2anda0a= 1 1 1 1
4. Di§erentiate the following functions (a) f (x) = 3×2
(b) f(x)= 3 x2
(c) f (x) = aex (d) f (x) = 1ex
(e) f (x) = aln(x) (f) f(x)=h(g(x))
f0 (x) = 6x
f0 (x) = 6x3
f0 (x) = aex
f0 (x) = xex 1+ex x2
f0 (x) = h0 (g0 (x)) 1

(g) f (x; y) = 3×3 + 21 y2
The slope of x1(x2) is In general
fx (x;y) = 9×2;fy (x;y) = y
5. Implicit function. Take the budget equation
p1x1 + p2x2 = w
Find the slope of the implicit function x2(x1). Show your work.
Di§erentiate both sides
p1dx1 + p2dx2 the slope of x2(x1) is dx2
0 cross multiply to get p1 :
dx2 p1 u(x1;x2) = C
deÖnes implicit function x2 (x1) : By the same argument the slope of x2 (x1) at point (x1; x2)
dx2 =ux1 (x1;x2): dx1 ux2 (x1;x2)
6. Optimization 1. A consumer seeks to maximise her utility by choosing how much of commodities A and B to consume. Let xA and xB denote the quantities demanded, and (pA;pB) the prices. Our consumer has utility
u(xA ; xB ) = ln(1 + xA ) + ln(1 + xB ); and she is subject to the budget constraint
xApA+xBpB =M Find the optimal bundle (xA;xB):
Form the Lagrangean
L=ln(1+xA)+ln(1+xB)(xApA +xBpB M): 2

The partials
@L = 1 pA=0 @xA 1+xA
@L = 1 pB=0 @xB 1+xB
From the Örst two equations
= xApA+xBpBM=0 xA= 1 1;xB= 1 1
pA pB Subsitute in the third equation
1 p A + 1 p B = M
This gives
Sub into the expressions for x
xA = M+pA+pB 1=1M+pB 1 2pA 2pA
xB =1M+pA1 2 pB
This gives the answer to a:
To answer b: recall from the slides that
du(x) = dL(x; ); hence dM dM
du(x) = dL(x;) =u (x)dxA +u (x)dxB p dxA p dxB + dM dM xA dM xB dM AdM BdM
= (uxA (x)pA)dxA +(uxB (x)pB)dxB += dM dM
The brackets (uxi (x) pi) are just the Örst order conditions restated, hence
ux (x)pA =0and,ux (x)pB =0:Indeed,ux (x)= 1 = 2 = A B A 1+xA M+pB+1
1 = M + pA + pB : (1) 2
2pA : From (1),  = M + pB + pA
2 : M + pB + pA

du(x) =  = 2 : dM M + pB + pA
Onecangettheredirectly,butthisisthehardway. Takeaderivativeofu(xA;xB)
with respect to M
and substitute
du(x) = uxA (x) dxA + uxB (x) dxB (2) dM dM dM
xA = dxA =
1M+pB1andxB=1M+pA1 2 pA 2 pB
1anddxB=1 2pA dM 2pB
1=2pA andux(x)=1=2pB 1+xA M+pB+pA B 1+xB M+pB+pA
Put this together into (2)
du(x) = 2 =  same as before, of course.
7. Optimization 2. You need to enclose a rectangular Öeld with a fence. You have 100 meters of fencing material. Determine the dimensions of the Öeld that will enclose the largest area. Set this up as a constrained optimization problem and approach this with Lagrangean. Hints: use all the information to determine the objective function and the constraint. It may help to draw. Recall: What is the area of a rectangle? Call the short side x and the long one y. What is the perimeter of such rectangle?
Call the length of one side x and the length of the other side of the rectangle y: The area is xy; and the perimeter is constrained as x + y = 50 This is equivalent to the optimization problem
The Lagrangean now is
xy ! max subject to x+y = 50
L = xy  (x + y 50) 4
dM M + pB + pA

The Örst order conditions
= x=0 Thus x = y so the optimal shape is the square.
8. Optimization with inequality constraints. Find
maxf (x;y) = xy s.to.x+y2 2
Approach this formally via Lagrangean. Write all the Karush-Kuhn-Tucker con- ditions and solve the resulting system of equations.
We have 3 inequality constraints here, hence three Lagrange multipliers. The full Lagrangean and the FOCs wrt to (x; y) is
$ = xy1x+y2 22(x)3(y)
= y1+2=0
= x2y1+3=0
And three complementary slackness conditions
1x+y22 = 0 2x = 0 3y = 0
In principle we need to solve the FOCs and the slackness conditions as a system of equations in (x; y; 1; 2; 3) : That will deliver (maybe a couple) candidates for the optimum. This is a hard math exercise. We will take an easier path.
Eyeball the constraints. They imply that the area where the optimum can be is under the line x + y2 = 2 and the solution most likely satisÖes x  0;y  0: We can ignore these constraints for now and check them later. This implies that 2 = 3 = 0: We also see that x + y2  2 constraint will be satisifed with equality. This implies that1 6=0:Call=1:
Then the simpliÖed Lagrangean is
L=xyx+y2 2: 5

The Örst order conditions
x = 34 ; y = r 23 ;  = r 23 :
These x and y satisfy the omitted constraints, hence we were correct to omit them. Further, since this solution to the problem with fewer contraints satisÖes all the constraints in the original promlem, this solution is the optimum in the original problem as well.
= x+y22=0:
Solve the system, i.e.  = y; then x = 2y2 and 3y2 = 2 and obtain the answers

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com