A tank’s volume is \(V(t) = 12t^3 - 5t^2 + 4\). What is \(V'(t)\)?
# install.packages("Deriv")
library(Deriv)
V <- function(t) {
12 * t^3 - 5 * t^2 + 4
}
V_prime <- Deriv(V)
V_prime
## function (t)
## {
## .e1 <- 12 * t
## t * (.e1 + 2 * (.e1 - 5))
## }
Your friend asks you to choose one card from the seven cards in his hand without looking. Which one are you least likely to choose?
set.seed(123)
cards <- c("8 Heart","6 Spade","2 Club","4 Heart","4 Diamond","6 Club","2 Spade")
simulation <- sample(x = cards,size = 1e5,replace = T)
probabilities <- prop.table(table(simulation))
probabilities
## simulation
## 2 Club 2 Spade 4 Diamond 4 Heart 6 Club 6 Spade 8 Heart
## 0.14284 0.14294 0.14385 0.14148 0.14145 0.14428 0.14316
Put \([5613,6531,3156,3516]\) in ascending order.
# 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
q3_data <- data.frame(Number = c(5613,6531,3156,3516))
q3_data %>%
arrange(Number) # arrange(): ascending order
## Number
## 1 3156
## 2 3516
## 3 5613
## 4 6531
Plot the corresponding polygon to the given data below.
# install.packages("tidyverse")
library(tidyverse)
q4_data <- data.frame(X = c(-9,-9,-4,-4),
Y = c(-7,7,7,-7))
ggplot(q4_data,aes(x = X,y = Y)) +
geom_polygon(col = "black",fill = "lightblue",lwd = 1.25) +
geom_point(size = 4) +
coord_equal() +
theme_gray()
Find \(\sqrt[3] {80}\) correct to 2 decimal places.
# install.packages("pracma")
library(pracma)
##
## Attaching package: 'pracma'
## The following object is masked from 'package:purrr':
##
## cross
value <- nthroot(x = 80,n = 3) # x = 80 (our value),n = 3 (cube root)
cat("Value:",round(value,2),"\n")
## Value: 4.31
What is \(\int \sqrt{x^3} \space dx\)?
# install.packages(c("ggformula","mosaicCalc"))
library(ggformula)
## Warning: package 'ggformula' was built under R version 4.5.2
## Loading required package: scales
##
## Attaching package: 'scales'
## The following object is masked from 'package:purrr':
##
## discard
## The following object is masked from 'package:readr':
##
## col_factor
## Loading required package: ggiraph
## Warning: package 'ggiraph' was built under R version 4.5.2
## Loading required package: ggridges
## Warning: package 'ggridges' was built under R version 4.5.2
##
## New to ggformula? Try the tutorials:
## learnr::run_tutorial("introduction", package = "ggformula")
## learnr::run_tutorial("refining", package = "ggformula")
library(mosaicCalc)
## Warning: package 'mosaicCalc' was built under R version 4.5.2
## Registered S3 method overwritten by 'mosaic':
## method from
## fortify.SpatialPolygonsDataFrame ggplot2
##
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
##
## D
f <- makeFun(sqrt(x^3) ~ x)
anti_f <- antiD(f(x) ~ x)
anti_f
## function (x, C = 0)
## {
## F <- makeF(sqrt(x^3))
## evalFun(F, x = x, .const = C)
## }
## <environment: 0x00000220774a2cb8>