I'm having a problem with my coding. I'm supposed to
Plot a graph of this equation [y=f(x)] where f(x) = (10*((x-1)^2)^(1/3))/(x^2 + 9) for 10001 values of x between (and including) -5 and 5
Among the 10001 x values in a, find the two local maximums of f(x).
I tried doing this :
# question1
x <- seq(-5,5,length=10001)
y <- (10*((x-1)^2)^(1/3))/(x^2 + 9)
plot(x,y) # This will produce a graph with two max point
# question2
x[which.max(y)]
y[which.max(y)]
however, i only get the coordinates one of the maximum point and clueless as to how do i get another maximum point.