15/01/2017

Cans

A company manufactures 1 liter (1000 cc) cylindrical cans. In order to use the least possible metal, we want to minimize the surface of the box. It is proposed to seek an approximation of the radius of the cylindrical box The formula of the surface by this radius is : 2pix² + 2000/x

The visual solution with ploty:

aire <- function(x){
  2*pi*x*x + 2000/x
}
tm <- seq(1, 20, by = 0.1)

p<-plot_ly(x=tm,y=aire(tm),type='scatter',mode = 'lines') %>%
layout(title = "Cans surface optimisation",
       xaxis = list(title = "Radius cm"),
       yaxis = list (title = "Surface cc"))

p