1 2 3 4 | Chebyshev1(n)
Chebyshev2(n)
ChebyshevT(n)
ChebyshevU(n)
|
n |
non-negative integer; order of the Chebyshev polynomial |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | par(mar = c(4.5, 4.5, 1.7, 4.5), xpd = FALSE)
plot(
xlim = c(-1, 1), ylim = c(-1, 1),
panel.first = grid(col = "gray69"),
x = NA_real_, y = NA_real_,
xlab = "x", ylab = ~T ~ ""[n](x), main = "Chebyshev polynomials of the first kind"
)
n <- 0:4
col <- c("#0072B2", "#E69F00", "#009E73", "#D55E00", "#56B4E9")
for (i in seq_along(n)) {
x <- as.polynomial(Chebyshev1(n[i]))
lines(x, col = col[i], n = 1001, lwd = 2)
}
par(xpd = TRUE)
legend(x = par("usr")[2L], y = par("usr")[4L],
legend = paste0("n = ", n),
fill = col,
bty = "n")
par(mar = c(4.5, 4.5, 1.7, 4.5), xpd = FALSE)
plot(
xlim = c(-1, 1), ylim = c(-4, 5),
panel.first = grid(col = "gray69"),
x = NA_real_, y = NA_real_,
xlab = "x", ylab = ~U ~ ""[n](x), main = "Chebyshev polynomials of the second kind"
)
n <- 0:4
col <- c("#0072B2", "#E69F00", "#009E73", "#D55E00", "#56B4E9")
for (i in seq_along(n)) {
x <- as.polynomial(Chebyshev2(n[i]))
lines(x, col = col[i], n = 1001, lwd = 2)
}
par(xpd = TRUE)
legend(x = par("usr")[2L], y = par("usr")[4L],
legend = paste0("n = ", n),
fill = col,
bty = "n")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.