Applied Optimization: Maximizing Area Given Fixed Fencing

2 ビュー (過去 30 日間)
Mona Mona
Mona Mona 2019 年 5 月 1 日
コメント済み: Walter Roberson 2019 年 5 月 3 日
You have a ranch house 56 feet wide, and wish to enclose a rectangular area in the back with 500 ft of fencing, using the house as part of one side (see figure below). What dimensions will maximize the area?
fence_6_9.jpg
Solve this problem by defining variables L as the length of the field and W as the width on either side of the house (we can assume the house is centered on that side without affecting our solution), then follow these steps:
  1. Write the area A as a function of L and W.
  2. Write an equation eq you know relating L and W.
  3. Eliminate L by solving eq for L (we could solve for W, but L is slightly easier).
  4. Substitute this solution for L in your function A.
  5. Find the critical value of A (you should only get one).
  6. Use the Second Derivative Test to determine if your critical value is a maximum or a minimum.
  7. Answer the question being asked in the problem.
What is the solution of this Matlab
syms L W
% Step 1
A=; % Write A as a symbolic expression, not a function
% Step 2
eq=; % Remember to use == for the equal sign in your equation!
% Step 3
elimL=solve();
% Step 4
AofW=subs()
% Step 5
dA=diff()
cv=solve()
% Step 6
ddA=diff()
SDT=subs()
% Step 7-find the value of the other variable by substituting into eq and solving
eqalt=subs();
Lans=solve();
% DO NOT CHANGE CODE ON REMAINING LINES-displays answer with explanation
Wans=cv;
disp('Desired length is')
disp(Lans)
disp(' ')
disp('Desired width is')
disp(Wans)
  5 件のコメント
jahanzaib ahmad
jahanzaib ahmad 2019 年 5 月 3 日
where is the figure ?
Walter Roberson
Walter Roberson 2019 年 5 月 3 日
The figure is the box-on-a-box

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSurrogate Optimization についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by