SUNY Geneseo Department of Mathematics
Monday, October 27
Math 221 02
Fall 2014
Prof. Doug Baldwin
> f = function(x) { x^2 - 3 * x}
> f(1)
[1] -2
> f(4)
[1] 4
> curve( f(x), 1, 4 )
> a = 1
> b = 4
> ( f(b) - f(a) ) / (b - a)
[1] 2
> curve( 2*x - 4, add=TRUE, col="purple")
> df = function(x) { 2*x - 3}
> df(2.5)
[1] 2
> f(2.5)
[1] -1.25
> curve( 2*x - 6.25, add=TRUE, col="red")
> f = function(x) {x^3/3 - x}
> curve( f(x), -2, 2 )
> m = 1/3
> curve( m * x, add=TRUE, col="purple")