dxdy: Returns the nth derivative d^ny/dx^n

View source: R/dxdy.R

dxdyR Documentation

Returns the nth derivative d^ny/dx^n

Description

Returns the nth derivative d^ny/dx^n

Usage

dxdy(x, y, n = 1)

Arguments

x

x values

y

y values

n

order of the derivative

Value

a data.frame(x,y)

Examples

x <- seq(-10, 10, .0001)
y <- 1 + x + x^2 + x^3 + x^4
par(mfrow = c(2, 2), mar = c(4, 4, 1, 1))
plot(x, y, type = "l", main = "1+x+x^2+x^3+x^4")
plot(dxdy(x, y, 1), col = "red", type = "l", main = "1+2x+3x^2+4x^3")
plot(dxdy(x, y, 2), col = "blue", type = "l", main = "2+6x+12x^2")
plot(dxdy(x, y, 3), col = "orange", type = "l", main = "6+24x")

colinbousige/tutor documentation built on Jan. 29, 2023, 7:35 p.m.