If \(f(x) = x \ln(x)\), what is \(f'(x)\)?
# install.packages("Deriv")
library(Deriv)
f <- function(x) {
x * log(x)
}
f_prime <- Deriv(f)
f_prime
## function (x)
## 1 + log(x)
Consider the list of numbers: \([41,43,47,49]\). Which number is composite?
# install.packages(c("comprehenr","pracma"))
library(comprehenr)
## Warning: package 'comprehenr' was built under R version 4.5.2
library(pracma)
answer <- to_vec(for (x in c(41,43,47,49)) if (!isprime(x)) x)
cat("The number that is composite is:",answer,"\n")
## The number that is composite is: 49