Question 1

Write the number 466 in words.

# install.packages("english")
library(english)
## Warning: package 'english' was built under R version 4.5.2
words(466)
## [1] "four hundred sixty-six"

Question 2

Use the following data frame to construct a shape and shade the area.

  1. Define the data frame.
q2_data <- data.frame(x = c(-5,-7,-5,7,10,7,2),
                      y = c(1,5,10,10,5,1,-3))
q2_data
##    x  y
## 1 -5  1
## 2 -7  5
## 3 -5 10
## 4  7 10
## 5 10  5
## 6  7  1
## 7  2 -3
# 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
ggplot(q2_data,aes(x = x,y = y)) +
  geom_polygon(fill = "blue",alpha = 0.5,col = "black") +
  geom_point(size = 3) +
  labs(title = "Polygon of Given Points",
       x = "x",
       y = "y") +
  theme_gray(base_size = 14)

Question 3

Evaluate the following indefinite integral.

\[\int (2x + 3)(x^2 + 3x)^2 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
## The following object is masked from 'package:english':
## 
##     ordinal
## 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((2 * x + 3) * (x^2 + 3 * x)^2 ~ x)
anti_f <- antiD(f(x) ~ x)
anti_f
## function (x, C = 0) 
## (x^6 + 9 * x^5 + 27 * x^4 + 27 * x^3)/3 + C