# ?'s questions at Yahoo! Answers regarding optimization

#### MarkFL

Staff member
Here are the questions:

What is the function and answer to these optimization questions?

1. A piece of wire 40 cm long is to be cut into two pieces. One will be bent to form a circle; the other will be bent to form a square. Find the lengths of the two pieces that cause the sum of the area of the circle and the area of a square to be a minimum.

2. A manufacturer wants to design an open box having a square base and a surface area of 108 square inches. What dimensions will produce a box with maximum value?

3. The concentration in mg/cm^3, of a particular drug in a patient's bloodstream is given by the formula C(t) = (0.12t) / (t^2+2t+2), where t represents the number of hours after the drug is taken.
a) Find the maximum concentration on the interval 0<=t<=4.
b) Determine when the maximum concentration occurs
I have posted a link to this topic so the OP can see my work.

#### MarkFL

Staff member
Re: ?'s questions at Yahoo Answers regarding optimization

Hello ?,

1.) A piece of wire 40 cm long is to be cut into two pieces. One will be bent to form a circle; the other will be bent to form a square. Find the lengths of the two pieces that cause the sum of the area of the circle and the area of a square to be a minimum.

Let's let the length of the wire be $0<L$, and the let $0\le S$ be the portion of the wire used to form the square, and let the portion of the wire that is the circumference of the circle be $0\le C$

Each side of the square will be $\dfrac{S}{4}$, and so the area of the square is:

$$\displaystyle A_S=\left(\frac{S}{4} \right)^2=\frac{S^2}{16}$$

The area of the circle is:

$$\displaystyle A_C=\pi r^2$$

Now, the circumference of the circle is $C$ and so the radius of the circle is:

$$\displaystyle r=\frac{C}{2\pi}$$

hence the area of the circle in terms of $C$ is:

$$\displaystyle A_C=\pi\left(\frac{C}{2\pi} \right)^2=\frac{C^2}{4\pi}$$

Adding the two areas, we find the total area of the two shapes is:

$$\displaystyle A=A_S+A_C=\frac{S^2}{16}+\frac{C^2}{4\pi}$$

To find the absolute extrema, we first observe we must have:

$0\le S\le L$ which also means $0\le C\le L$

So, we will find the local extrema within this interval, and also look at the area at the end-points of the interval as possible absolute extrema as well.

There are 3 ways to find the local extremum, since the area is a quadratic in $S$.

For the first two methods, we wish to have an area function in one variable, and so we may use:

$C=L-S$

and we have:

$$\displaystyle A(S)=\frac{S^2}{16}+\frac{(L-S)^2}{4\pi}$$

Method 1: find the axis of symmetry

We will write the area function in standard quadratic form:

$$\displaystyle A(S)=\frac{4+\pi}{16\pi}S^2-\frac{L}{2\pi}S+\frac{L^2}{4\pi}$$

Thus, the axis of symmetry is at:

$$\displaystyle S=-\frac{-\frac{L}{2\pi}}{2\left(\frac{4+\pi}{16\pi} \right)}=\frac{4L}{4+\pi}$$

Since the parabola opens upward, we know the global minimum is at this value of $S$.

Thus, this is the amount of the wire that should go to the square to minimize the total area. Analysis of the end-points reveals:

$$\displaystyle A(0)=\frac{L^2}{4\pi}$$

$$\displaystyle A(L)=\frac{L^2}{16}$$

Since $A(0)>A(L)$, we find that to maximize the area, none of the wire should go to the square, and this makes sense as a circle will enclose more area per perimeter than a square.

Method 2: Equate derivative of area function to zero and solve for $S$ to get critical value.

$$\displaystyle A(S)=\frac{S^2}{16}+\frac{(L-S)^2}{4\pi}$$

$$\displaystyle A'(S)=\frac{S}{8}-\frac{L-S}{2\pi}=\frac{\pi S-4(L-S)}{8\pi}=0$$

This implies:

$$\displaystyle \pi S-4(L-S)=0$$

$$\displaystyle S=\frac{4L}{4+\pi}$$

To determine the nature of the associated extremum, we may use either the first or second derivative tests.

First derivative test:

$$\displaystyle A'(0)=\frac{\pi(0)-4(L-0)}{8\pi}=-\frac{L}{2\pi}<0$$

$$\displaystyle A'(L)=\frac{\pi L-4(L-L)}{8\pi}=\frac{L}{8}>0$$

Thus, the first derivative test shows the extremum is a minimum.

Second derivative test:

$$\displaystyle A''(S)=\frac{d}{dS}\left(\frac{\pi S-4(L-S)}{8\pi} \right)=\frac{p+4}{8\pi}>0$$

This shows the area function is concave up everywhere, and thus the extremum must be a global minimum.

Method 3: Use optimization with constraint

We have the objective function:

$$\displaystyle A(C,S)=\frac{S^2}{16}+\frac{C^2}{4\pi}$$

subject to the constraint:

$$\displaystyle g(C,S)=C+S-L=0$$

Using Lagrange multipliers, we find:

$$\displaystyle \frac{C}{2\pi}=\lambda$$

$$\displaystyle \frac{S}{8}=\lambda$$

this implies:

$$\displaystyle \frac{C}{2\pi}=\frac{S}{8}$$

$$\displaystyle C=\frac{\pi S}{4}$$

Substituting this into the constraint, we find:

$$\displaystyle \frac{\pi S}{4}+S-L=0$$

Solving for $S$, we find:

$$\displaystyle S=\frac{4L}{4+\pi}$$

The remaining analysis is the same as for Method 1.

In conclusion, we have found to minimize the area, we need:

$$\displaystyle S=\frac{4L}{4+\pi}$$

$$\displaystyle C=\frac{\pi}{4}S=\frac{\pi}{4}\cdot\frac{4L}{4+\pi}=\frac{\pi L}{4+\pi}$$

Using the given value $L=40\text{ cm}$ we find then:

$$\displaystyle S=\frac{160}{4+\pi}\,\text{cm}$$

$$\displaystyle C=\frac{40\pi}{4+\pi}\,\text{cm}$$

Last edited:

#### MarkFL

Staff member
Re: ?'s questions at Yahoo Answers regarding optimization

2.) A manufacturer wants to design an open box having a square base and a surface area of 108 square inches. What dimensions will produce a box with maximum value?

I am assuming two things here...we wish to maximize the volume and the sirface area is the outer surface area only.

Let's let $0\le L$ be the lengths of the sides of the square base and $0<S$ be the outer surface area. We will let $0\le h$ be the height of the box. We may then write:

(1) $$\displaystyle V(h,L)=hL^2$$

(2) $$\displaystyle S(h,L)=L^2+4hL$$

We should observe that we require:

$$\displaystyle 0\le L\le\sqrt{S}$$

Method 1: Single variable calculus

Solving (2) for $h$, we find:

$$\displaystyle h=\frac{S-L^2}{4L}$$

Substituting for $h$ into (1) we have:

$$\displaystyle V(L)=\left(\frac{S-L^2}{4L} \right)L^2=\frac{1}{4}\left(SL-L^3 \right)$$

Differentiating with respect to $L$ and equating to zero, we find:

$$\displaystyle V'(L)=\frac{1}{4}\left(S-3L^2 \right)=0$$

And this implies:

$$\displaystyle S-3L^2=0$$

Taking the positive root since $L$ represents a measurement of length, we have:

$$\displaystyle L=\sqrt{\frac{S}{3}}$$

and so:

$$\displaystyle h=\frac{S-\left(\sqrt{\frac{S}{3}} \right)^2}{4\sqrt{\frac{S}{3}}}= \frac{1}{2}\sqrt{\frac{S}{3}}$$

To determine the nature of the extremum associated with this critical value,we may use the first and second derivative tests.

First derivative test:

$$\displaystyle V'(0)=\frac{1}{4}\left(S-3(0)^2 \right)=\frac{S}{4}>0$$

$$\displaystyle V'(\sqrt{S})=\frac{1}{4}\left(S-3(\sqrt{S})^2 \right)=-\frac{S}{2}<0$$

Thus, the first derivative test shows the extremum is a maximum. Since we have:

$$\displaystyle V(0)=V(\sqrt{S})=0$$, we know this is the absolute maximum on the restricted domain of $L$.

Second derivative test:

$$\displaystyle V''(L)=\frac{d}{dL}\left(\frac{1}{4}\left(S-3L^2 \right) \right)=-\frac{6L}{4}$$

Thus, on the restricted domain, the volume function is concave down, hence the extremum is a maximum.

Method 2: Multi-variable calculus (optimization with constraint)

We have the objective function:

$$\displaystyle V(h,L)=hL^2$$

subject to the constraint:

$$\displaystyle g(h,L)=L^2+4hL-S=0$$

Using Lagrange multipliers, we find:

$$\displaystyle L^2=4L\lambda$$

$$\displaystyle 2hL=(2L+4h)\lambda$$

This implies:

$$\displaystyle \lambda=\frac{L^2}{4L}=\frac{hL}{L+2h}$$

$$\displaystyle \frac{L^2(L+2h)-4hL^2}{4L(L+2h)}=0$$

$$\displaystyle \frac{L^2(L-2h)}{4L(L+2h)}=0$$

Thus, knowing $L=0$ is a minimum, we are left with:

$$\displaystyle L=2h$$

and substitution of this into the constraint reveals:

$$\displaystyle (2h)^2+4h(2h)-S=0$$

$$\displaystyle h=\frac{1}{2}\sqrt{\frac{S}{3}}$$

and so:

$$\displaystyle L=2h=\sqrt{\frac{S}{3}}$$

So, in conclusion, we have found that the volume of the box is maximized for:

$$\displaystyle L=\sqrt{\frac{S}{3}}$$

$$\displaystyle h=\frac{1}{2}\sqrt{\frac{S}{3}}$$

Using the given value of $$\displaystyle S=108\text{ in}^2$$, we then have:

$$\displaystyle L=6\text{ in}$$

$$\displaystyle h=3\text{ in}$$

#### MarkFL

Staff member
Re: ?'s questions at Yahoo Answers regarding optimization

3.) The concentration in $$\displaystyle \frac{\text{mg}}{\text{cm}^3}$$, of a particular drug in a patient's bloodstream is given by the formula $$\displaystyle C(t)=\frac{0.12t}{t^2+2t+2}$$, where $t$ represents the number of hours after the drug is taken.

a) Find the maximum concentration on the interval $0\le t\le4$.

b) Determine when the maximum concentration occurs.

First, we want to find the critical values by equating the derivative of the concentration function to zero. Use of the quotient rule gives:

$$\displaystyle C'(t)=\frac{0.12(t^2+2t+2)-0.12t(2t+2}{(t^2+2t+2)^2}=\frac{0.12(2-t^2)}{(t^2+2t+2)^2}=0$$

The denominator has no real roots, and for the given interval the only critical value is then:

$$\displaystyle t=\sqrt{2}$$

To determine the nature of the extremum associated with this critical value, we may use the first and second derivative tests.

First derivative test:

$$\displaystyle C'(0)=\frac{0.12(2-0^2)}{(0^2+2(0)+2)^2}=0.06>0$$

$$\displaystyle C'(4)=\frac{0.12(2-4^2)}{(4^2+2(4)+2)^2}=-\frac{21}{8450}<0$$

Thus, the first derivative test shows that the extremum is the absolute maximum.

Second derivative test:

$$\displaystyle C''(t)=\frac{d}{dt}\left(\frac{0.12(2-t^2)}{(t^2+2t+2)^2} \right)=0.12\left(\frac{(t^2+2t+2)^2(-2t)-(2-t^2)(2(t^2+2t+2)(2t+2))}{(t^2+2t+2)^4} \right)=\frac{0.24(t^3-6t-4)}{(t^2+2t+2)^3}$$

Knowing the denominator is positive for all real $t$, we need only look at:

$$\displaystyle (\sqrt{2})^3-6(\sqrt{2})-4=-4\sqrt{2}-4<0$$

And so we know the extremum is a maximum. Thus, we have found:

a) The maximum concentration in $$\displaystyle \frac{\text{mg}}{\text{cm}^3}$$ is

$$\displaystyle C_{\max}=C(\sqrt{2})=\frac{3}{50}(\sqrt{2}-1)\approx0.0248528137423857$$

b) This maximum occurs for $t$:

$$\displaystyle t=\sqrt{2}\text{ hr}\approx1\text{ hr }24\text{ min }51.1688245432\text{ sec }$$.