Question 1

Write the number 45 in words.

# install.packages("english")
library(english)
## Warning: package 'english' was built under R version 4.5.2
words(45)
## [1] "forty-five"

Question 2

Which one of the following decimal numbers is the second least?

A. 96.814

B. 914.68

C. 98.614

D. 916.108

# 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(Choice = LETTERS[1:4],
                      Value = c(96.814,914.68,98.614,916.108))
correct_answer <- q2_data %>%
  arrange(Value) %>%
  slice(2) %>%
  pull(Choice)
cat("The correct answer is:",correct_answer,"\n")
## The correct answer is: C

Question 3

Find the roots and graph \(f(x) = x^2 - x - 56\).

# install.packages(c("tidyverse","rootSolve"))
library(tidyverse)
library(rootSolve)
f <- function(x) {
  x^2 - x - 56
}
roots <- uniroot.all(f,c(-10,10))
x_values <- seq(-10,10,length.out = 500)
y_values <- f(x_values)
q3_data <- data.frame(x = x_values,y = y_values)
ggplot(q3_data,aes(x = x,y = y)) +
  geom_line(col = "black",lwd = 1.25) +
  annotate("point",x = roots[1],y = f(roots[1]),col = "blue",size = 5) +
  annotate("point",x = roots[2],y = f(roots[2]),col = "blue",size = 5) +
  labs(title = "Graph of f(x) = x^2 - x - 56",
       caption = paste("Roots:",roots[1],"and",roots[2]),
       x = "x",
       y = "y") +
  theme_gray()

Question 4

What is \(\int \frac{1 - x}{\sqrt{1 - x^2}} \space dx\)?

# install.packages(c("mosaicCalc","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
library(ggformula)
g <- makeFun((1 - x) / (sqrt(1 - x^2)) ~ x)
anti_g <- antiD(g(x) ~ x)
anti_g
## function (x, C = 0) 
## {
##     F <- makeF((1 - x)/(sqrt(1 - x^2)))
##     evalFun(F, x = x, .const = C)
## }
## <environment: 0x000002665e675690>