---
title: "Class activity, September 6"
format: html
editor: visual
author: "Your name"
---

## What will happen?

For each question, predict what will happen when the code is run. Then run the code and check whether your prediction was correct.

1. 

```{r}

```


2.

```{r}

```


3. 

```{r}

```


## Practice with anonymous functions

4. Use the `integrate()` and an anonymous function to find the area under the curve for the following functions:

* `y = x^2 - x` for x in $[0, 1]$
* `y = sin(x) + cos(x)` for x in $[-\pi, \pi]$
* `y = exp(x)/x` for x in $[10, 20]$
