Discussion 13

IS 605 FUNDAMENTALS OF COMPUTATIONAL MATHEMATICS

Calculus

Using R, provide the solution for any exercise in either Chapter 4 or Chapter 7 of the calculus textbook. If you are unsure of your solution, post your concerns.

Chapter 4.3 Exercise 4:

library(Deriv)
## Warning: package 'Deriv' was built under R version 3.5.1

Find the minimum sum of two numbers whose product is 500.

limx -> 0 - f(x) = - \(infinity\)

mav <- 100
miv <- -mav

fx <- function(x) {
    x + 500/x
}
fxprime <- Deriv(fx)
(out_root <- uniroot(fx, c(miv, mav)))
## Warning in uniroot(fx, c(miv, mav)): NA/Inf replaced by maximum positive
## value
## $root
## [1] -9.536737e-05
## 
## $f.root
## [1] -5242883
## 
## $iter
## [1] 22
## 
## $init.it
## [1] NA
## 
## $estim.prec
## [1] 9.536737e-05