A specific part of the graph need integrated, it is from a polynomial but everytime a error shows up in rstudio

21 views Asked by At

I have these code:

f <- function(x){y ~ poly(x, 4)}

integrate(f, lower = 670, upper = 750)

also tried the code below:

f <- function(x){y ~ poly(x, 4)}

integrate(Vectorize(f, lower = 670, upper = 750))

I also tried this code but at both codes i get this error:

Error in integrate(f, lower = 670, upper = 750) :
evaluation of function gave a result of wrong length

Any help is much appreciated.

0

There are 0 answers