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 :
f(x) = 2 * pi * x² + 2000/x
aire <- function(x){2*pi*x*x + 2000/x}
tm <- seq(1, 20, by = 0.1)
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"))