Let \(g(x) = \sin(\ln(4x^2 + 1))\). What is \(g'(x)\)?
# install.packages("Deriv")
library(Deriv)
g <- function(x) {
sin(log(4 * x^2 + 1))
}
g_prime <- Deriv(g)
g_prime
## function (x)
## {
## .e1 <- 4 * x^2
## 8 * (x * cos(log1p(.e1))/(1 + .e1))
## }
Construct a bar graph for the data below.
# install.packages("tidyverse")
library(tidyverse)
## Warning: package 'lubridate' was built under R version 4.5.2
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.1 ✔ stringr 1.5.2
## ✔ ggplot2 4.0.0 ✔ tibble 3.3.0
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ purrr 1.1.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
q2_data <- data.frame(Color = c("Red","Yellow","Blue","Green","Gray","Purple","Orange"),
Frequency = c(8,5,6,3,5,2,1))
ggplot(q2_data,aes(x = factor(Color),y = Frequency)) +
geom_col(fill = "steelblue") +
labs(title = "Graph of Data",
x = "Color",
y = "Frequency") +
theme_gray()