Derivatives Applied

Problem 1 : among all rectangles of circumference 10, which one has the largest area?

(* 10 = circumference = 2a+2b *)
a=5-b;
area[b_]:=(5-b)*b;
area'[b];

Plot[{area[b],area'[b]},{b,0,5},PlotStyle->Thick];

Solve[area'[b]==0,b]//N;

Problem 2: Given an isosceles triangle with base (-1,0),(1,0) and top vertex (0,h), what is the rectangle with largest area that you can inscribe?

Solution: let the rectangle area be x*y. From geometry, we know (h-y)/x = h/1, hence y=((1-x)h.

h=2;
triarea[x_]:=x*(1-x)*h;
triarea'[x];

Plot[{triarea[x],triarea'[x]},{x,0,1},PlotStyle->Thick];

Solve[triarea'[x]==0,x]//N;

Problem 3 : A manufacturer wants to manufacture an aluminum can holding 1 pint in volume. What dimensions (height h, radius r) does the can have to have in order to minimize the amount of aluminum?

(*vol=Pi r^2 h; hence h= V/(Pi r^2);
area=2Pi*r*h+2Pi*r^2; *) 
vol=2;
alu[r_]:=2Pi*r*vol/(Pi*r^2) + 2Pi*r^2;
alu'[r];

Plot[{alu[r],alu'[r]},{r,0,1},PlotStyle->Thick];

Solve[alu'[r]==0,r]//N;

Problem 4 : Let f(x)=-2x^4+3. Find an inscribed rectangle, with one edge on the x-axis, which has maximal area.

Plot[-2x^4+3,{x,-1,1},PlotStyle->Thick];
areax4[x_]:= 2x*(-2x^4+3);
areax4'[x];
Plot[{areax4[x],areax4'[x]},{x,-1,1},PlotStyle->Thick];
Solve[areax4'[x]==0,x]//N;

Problem 5 : Let f(x)=cos(x). Find an inscribed rectangle, with one edge on the x-axis, which has maximal area. This will run into a problem.

Plot[Cos[x],{x,-Pi/2,Pi/2},PlotStyle->Thick];
areacos[x_]:= 2x*Cos[x];
areacos'[x];
Plot[{areacos[x],areacos'[x]},{x,-Pi/2,Pi/2},PlotStyle->Thick];
Solve[areacos'[x]==0,x];