optimization which point on the line y 1 2x is closest to

15
MATH 1380 Lecture 18 1 of 15 Ronald Brent © 2018 All rights reserved. x -2 -1 1 2 -2 -1 0 1 2 y Optimization Which point on the line x y 2 1 = is closest to the origin?

Upload: others

Post on 16-Jan-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 1 of 15 Ronald Brent © 2018 All rights reserved.

x-2 -1 1 2

-2

-1

0

1

2

y

Optimization Which point on the line xy 21−= is closest to the origin?

Page 2: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 2 of 15 Ronald Brent © 2018 All rights reserved.

Recall the distance between a point (x, y) and (0, 0) is 22 yxd += . If we require the point to be on the line i.e. xy 21−= , then the distance is

145)21()( 222 +−=−+= xxxxxd

To find the absolute minimum of this function we first find critical points

14525)(

2 +−−=′

xxxxd

which equals 0 at 52

=x . The point is

51,

52 . And the distance is

51)5/2( =d .

Page 3: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 3 of 15 Ronald Brent © 2018 All rights reserved.

The method for solving optimization problems is as follows*:

1. Understand the Problem. What is being asked? Can you envision the problem? What is the numerical information being given? What are the units?

2. Build a Mathematical Model This will involve drawing pictures,

labeling variables and using either algebraic, geometric, or trigonometric laws to write down equations relating the variables.

a. One equation will be the function you wish to maximize or

minimize. This is called the objective function. It will depend upon one or more variables.

b. One equation will relate the variables in the problem. This is called

the constraint equation.

c. Using the constraint and the objective, many times the objective function can be reduced to a function of only one variable.

Page 4: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 4 of 15 Ronald Brent © 2018 All rights reserved.

3. What is the domain of the objective function? This needs to be determined from all the given data and the constraints.

4. Determine Critical Numbers. We know how to do this 5. Solve the Mathematical model. Determine all the variables leading to

optimized solutions, use them in various formula to determine actual requested solution.

6. Interpret the Solution. What does the mathematical solution mean in

terms of the originally stated problem? Write it down in a coherent sentence!

Page 5: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 5 of 15 Ronald Brent © 2018 All rights reserved.

Maximizing area given perimeter:

Suppose that the perimeter of a rectangle is 20 feet. What are the dimensions of the rectangle with the greatest area? 1) Pretty self-explanatory here. This is a geometry problem concerning area and length (perimeter.) Units are in feet. 2) x

y A perimeter of 20 feet translates to 2022 =+ yx , so 10=+ yx . Maximize the area, xyA = (objective) subject to 10=+ yx (constraint.) 10=+ yx implies xy −=10 , and so )10()( xxxA −= .

Page 6: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 6 of 15 Ronald Brent © 2018 All rights reserved.

3) The perimeter constraint restricts x between 0 and 10. 4) Since xxA 210)( −=′ , the critical point is 5=x . 5) With 2)( −=′′ xA , the second derivative test insures that 25)5( =A is a

maximum. Endpoints yield 0)10()0( == AA the minimum area. Desired solution is x = 5, which means y = 5.

6) The dimensions of the rectangle with perimeter 20 feet with the largest area is

a square of side length 5 feet. Definition: A constrained optimization problem is one where you are given an objective function to maximize or minimize subject to a constraint function. In the last example we solved the constraint function for one of the variable in terms of the other, and substituted the result into the objective function. We then used typical methods to find absolute maximum values for the resulting equation. This is not always possible.

Page 7: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 7 of 15 Ronald Brent © 2018 All rights reserved.

Example: A piece of wire 10 cm long is cut into 2 pieces. One piece is shaped into a circle and the other into a square. Find the dimensions of the shapes that maximize and minimize the area.

10 cm x y r First off, x + y = 10. Next, we need the radius of the circle to compute its area. What we have is x, the circumference. If the piece x meters long is bent into the

circle, then rx π2= , so π2xr = and the area of the circle is

2

2circle 2

==π

ππ xrA .

Page 8: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 8 of 15 Ronald Brent © 2018 All rights reserved.

The remaining piece, length y is bent into the square, so it has side length 4y and

so the area of the square is 2

square 4

=

yA

Since 10=+ yx ,

xy −=10 Which gives

2

square 410

=xA

Total area is 22

squarecircle 410

2)(

+

=+=

xxAAxAπ

π

Simplifying the area function, we obtain

Page 9: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 9 of 15 Ronald Brent © 2018 All rights reserved.

1610020

4)(

22 +−+=

xxxxAπ

.

We wish to optimize this function over the interval [0, 10]. Since

πππ

π 8104

810

2)( −+

=−+=′ xxxxxA ,

the critical point is ππ+

=410x . Since 0

81

21)( >+=′′π

xA , this yields a minimum

so that

The minimum area becomes πππ

π+

=+

++

=4

25)4(

100)4(

2522A cm2

Note: The maximum area occurs at one of the endpoints. 425)0( =A cm2, and

π25)10( =A cm2. So, the maximum occurs when only a circle is built.

Page 10: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 10 of 15 Ronald Brent © 2018 All rights reserved.

Example: Minimize the surface area of a can with 1 cubic foot volume. Let r be the radius of the can, and h the height. r The volume is hrV 2π= The surface area is )(22 2rrhS ππ += Given the volume constraint ∞<< r0 h

For V = 1, we have hr 21 π= or 2

1r

=

This gives a surface area of )(22 2rr

S π+=

Hence, rr

S π422 +−

=′ . Critical points occur at 0=r , and 3 21π

=r ft, since r = 0

isn’t in the domain of the problem, we don’t consider it.

When 3 21π

=r ft, 3 4π

=h ft. The surface area is 3 23 π=S sq. ft.

Page 11: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 11 of 15 Ronald Brent © 2018 All rights reserved.

Example: Building an open topped box

xxxxxxV

144484)212)(212(

23 +−=−−=

So

0)2)(6(0128

014496122

2

=−−⇒=+−⇒

=+−=′

xxxx

xxV

Critical points x = 2, 6. V(2)=128 and V(6)=0 Max is at x = 2 with volume 128

Page 12: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 12 of 15 Ronald Brent © 2018 All rights reserved.

Page 13: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 13 of 15 Ronald Brent © 2018 All rights reserved.

Example: Your dreams of becoming a hamster breeder have finally come true!!! You are constructing a set of rectangular pens in which to house your furry friends. The overall area you are working with is 60 square feet, and you want to divide the area up into six pens of equal size as shown below. The cost of the outside fencing is $10 a foot. The inside fencing costs $5 a foot. You wish to minimize the cost of the fencing. a) Labeling variables, write down a constrained optimization problem that describes this problem. b) Using any method learned in this course, find the exact dimensions of each

pen that will minimize the cost of the breeding ground. What is the total cost?

Page 14: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 14 of 15 Ronald Brent © 2018 All rights reserved.

The cost of the outside fencing is $10 a foot. The inside fencing costs $5 a foot. You wish to minimize the cost of the fencing. a) Let x be the width of each individual pen, and y be the length as shown

above. Since the total area is 60 sq. ft., each individual pen will have an area of 10 sq. ft.

The constraint is 10=yx . The objective function is the cost. Examining the

fencing above, there is y5 feet of interior fencing, and xy 122 + feet of exterior fencing.

So the total cost is )122(10$)5(5$ xyyC +⋅+⋅= , or xyC 12045 += .

x y 10 sq.ft.

Page 15: Optimization Which point on the line y 1 2x is closest to

MATH 1380 Lecture 18 15 of 15 Ronald Brent © 2018 All rights reserved.

The constrained optimization problem is: Minimize xyC 12045 += subject to the constraint 10=yx .

b) Solving 10=yx for y gives x

y 10= . Substituting this into C gives

xx

C 120450+= , as the function to minimize over ),0( ∞∈x .

1204502 +−=′

xC , Setting 0=′C gives the equation:

2

450120x

= or 4

151204502 ==x so

215

415

==x ,so critical points are 0=x , and 215

=x , and so

315410

==x

y .

The cost is 76.464$1512012045 ≈=+= xyC