Question 1

Does the following summation converge, diverge, or neither?

\[\sum_{n = 1}^{\infty} \frac{\sqrt{n}}{n^2 + 1}\]

total <- 0
series <- function(n) {
  sqrt(n) / (n^2 + 1)
}
for (x in 1:1e7) {
  total <- total + series(x)
}
total
## [1] 2.00552

We find that the series converges to 2.

Question 2

Write 695 in words.

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

Question 3

Convert \(225^{\circ}\) to radians.

# install.packages("pracma")
library(pracma)
value <- deg2rad(deg = 225)
cat("225 degrees =",value,"radians")
## 225 degrees = 3.926991 radians

Question 4

Solve and graph the following definite integral.

\[\int_{-2}^{3} 3x^2 dx\]

# 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() ──
## ✖ purrr::cross()  masks pracma::cross()
## ✖ 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
f <- function(x) {
  3 * x^2
}
answer <- integrate(f = f,lower = -2,upper = 3)$value
x_values <- seq(-2.05,3.05,length.out = 500)
y_values <- f(x_values)
q4_data <- data.frame(x = x_values,y = y_values)
ggplot(q4_data,aes(x = x,y = y)) +
  geom_line(col = "black",lwd = 1.25) +
  geom_ribbon(data = subset(q4_data,x >= -2 & x <= 3),
              aes(ymin = 0,ymax = y),
              fill = "blue") +
  labs(title = "Graph of f(x) = 3x^2",
       caption = paste("Answer:",answer),
       x = "x",
       y = "y") +
  theme_gray(base_size = 14)