HP 15c User Manual

Page 142

Advertising
background image

142

Section 4: Using Matrix Operations

142

Example: Use the optimization program to find the dimensions of the box of largest volume
with the sum of the length and girth (perimeter of cross section) equaling 100 centimeters.

For this problem

l + (2h + 2w) = 100

v = whl

v(w,h) = wh(100-2h-2w)

= 100wh - 2wh

2

- 2hw

2

)

2

50

(

2

)

2

50

(

2

)

,

(

h

w

w

w

h

h

h

w

v

.

The solution should satisfy w + h < 50, w > 0, and h > 0.

First enter a subroutine to calculate the gradient and the volume.

Keystrokes

Display

´bE

120-42,21,15

Function subroutine.

lmA

121-45,23,11

´mE

122-42,23,15

´>1

123-42,16, 1

´UlA
´U

124u 45 11

O.2

125- 44 .2

Stores w in R

.2

.

OE

126- 44 15

Stores w in e

2

.

lA

127- 45 11

O.3

128- 44 .3

Stores h in R

.3

.

´>1

129-42,16, 1

OE

130- 44 15

Stores h in e

1

.

+

131- 40

5

132- 5

0

133- 0

-

134- 30

135- 16

2

136- 2

*

137- 20

Calculates l = 2(50 − h w).

´X.2

138-42, 4,.2

Stores l in R

.2

.

O*.3

139-44,20,.3

Stores wh in R

.3

.

l.2

140- 45 .2

l>E

141-45,16,15

´<E

142-42,26,15

*

143- 20

Advertising