Remember that for an ellipse:
((x^2)/(a^2))+((y^2)/(b^2)) = 1 is the generic equation
so
y^2/b^2 = 1 - x^2/a^2
y^2 = b^2 - x^2(b^2/a^2)
y = +/-sqrt(b^2 - x^2(b^2/a^2))
1)
Ok an ellipse this should be fun fun times.
Now:
let L = length of rectangle
let h = height of rectangle
Now since the rectangle is centered and inscribed in the eclipse with Length L and height h it will have to be split in two.
It has -L/2 and L/2 limits for the x axis
and
-h/2 and h/2 limits for the y axis
So now we can get some lengths:
Top left point:
[-L/2 , sqrt(b^2 - (-L/2)^2(b^2/a^2) ]
Top right point:
[L/2 , sqrt(b^2 - (+L/2)^2(b^2/a^2)
Bottom left point:
[-L/2, - sqrt(b^2 - (-L/2)^2(b^2/a^2)]
Bottom right point:
[L/2 , - sqrt(b^2 - (L/2)^2(b^2/a^2)]
Now you can find some lengths and all that.
Now:
h = 2*sqrt(b^2 - (L^2/4)*(b^2/a^2))
You need max area:
area = L*h
area(L) = 2L*sqrt(b^2 - (L^2/4)*(b^2/a^2))
Need the derivative:
area'(L) = 2*sqrt(b^2 - (L^2/4)*(b^2/a^2)) + 2L*(1/2)(b^2 - (L^2/4)*(b^2/a^2))^(-1/2)*(-L/2*(b^2/a^2))
Make it equal to zero and solve for L:
L = +/- sqrt(2)*a
now
h=2*sqrt(b^2 - (L^2/4)*(b^2/a^2))
h = 2b/sqrt(2) = sqrt(2)*b
max area = h*L = sqrt(2)*a * sqrt(2)*b = 2*a*b
These answers make sense because L has is horizontal and the a determines how wide the elipse should be. Same for the h.
2)Now for the cone, you have to visualize it in 2d.
let rc=radius cylinder
let hc = height cylinder
Here is a diagram:
http://farm4.static.flickr.com/3292/3086750130_b1826ccfe9_o.jpgYour constraint is the sloping line of the cone, which becomes:
y = (-h/r)*x + h
So now:
hc = y(rc) = (-h/r)*(rc) + h
length_base = 2rc
Need max area (will turn out to be max volume, trying to find the max radius of cylinder that will fit in this "triangle")
area = L*h
area(rc) = 2*rc *[(-h/r)*(rc) + h]
area(rc) = -2*rc^2(h/r) + 2*rc*h
Find derivative:
area'(rc) = -4rc(h/r) + 2h
Make it equal to zero and solve for rc:
0 = -2rc(h/r) + h
0 = -2*rc/r + 1
1 = 2*rc/r
r/2 = rc
Therefor max volume will have rc = r/2
hc = (-h/r)*(rc) + h
hc = (-h/r)*(r/2) + h
hc = h/2
Therfore max volume you can have is:
vol_cylinder = pi*rc^2*hc
vol = pi*(r^2/4)*(h/2)
max_vol = pi*(r^2*h)/8
Hope this helped you out.