# Simpson’s Rule (Riemann Sums with Parabolas)

int_a^b f(x) dx ~~ (h/3)((y_0+4y_1+y_2)+(y_2+4y_3+y_4)+…+(y_(n-2)+4y_(n-1)+y_n))

int_a^b f(x) dx ~~ (h/3)(y_0+4y_1+2y_2+4y_3+2y_4+…+2y_(n-2)+4y_(n-1)+y_n)

int_a^b f(x) dx ~~ sum_(j=1)^(n/2) (h/3)(f(x_(2j-2))+4f(x_(2j-1))+f(x_(2j)))

where h=(b-a)/n and the error is |E_S|<=(M(b-a)^5)/(180*n^4) and M is an upper bound for |f^((4))| on [a,b].

#### Example 1:

Evaluate int_5^7 5x dx using Simpson’s rule with n=4

x_0 through x_4 are {5, 5.5, 6, 6.5, 7} and h=2/4=1/2

Area ~~ 1/6*(5(5)+4*5(5.5)+2*5(6)+4*5(6.5)+5(7))=60

Since f'(x)=5 and f”(x)=0, then f^((4))(x)=0 and the error is zero here.

#### Example 2:

Consider int_-1^1 (x^2+5) dx with n=4

h=2/4=1/2 so x_k=-1+k/2, which is the set {-1,-1/2,0,1/2,1}

Area ~~1/6(((-1)^2+5)+4((-1/2)^2+5)+2((0)^2+5)+4((1/2)^2+5)+((1)^2+5))

Area=10 2/3

Since f^((4))(x)=0 the error here is also zero.

#### Example 3:

int_0^2 (5t^3+8t) dt with n=4

h=2/4=1/2 and x_k=0+k/2, so the x-values are {0,1/2,1,1 1/2,2}

Area ~~ 1/6((5(0)^3+8(0))+4(5(1/2)^3+8(1/2))+2(5(1)^3+8(1))+4(5(1 1/2)^3+8(1 1/2))+(5(2)^3+8(2)))

Area =36

Since f^((4))(x)=0, the error is zero here.

#### Example 4:

int_3^9 4/s^2 ds with n=4

h=6/4=3/2 and x_k=3+3k/2, so the x-values are {3, 4.5, 6, 7.5, 9}

Area ~~1/2*(4/3^2+4*4/4.5^2+2*4/6^2+4*4/7.5^2+4/9^2)

#### Example 5:

How many intervals are needed to estimate int_1^2 1/x dx to within 0.0001 square units of the actual area?

Recall the error is |E_S|<=(M(b-a)^5)/(180*n^4) and M is an upper bound for |f^((4))| on [a,b].

f(x)=x^(-1)

f'(x)=-1*x^(-2)

f”(x)=2*x^(-3)

f”(x)=-6*x^(-4)

f^((4))(x)=24*x^(-5)

f^((5))(x)=-144*x^(-6)

I found the 5th derivative to show that f^((4))(x) is decreasing, since its derivative is negative on the interval [1,2]. So, f^((4))(1)=24 is the maximum needed for the error estimation.

Plugging into |E_S|<=(M(b-a)^5)/(180*n^4):

0.0001<=(24*(1)^5)/(180*n^4)

Solving for n we get n <=((24)/(180*0.0001))^(1/4)~~6.04

A_(S_6) = 1/3*1/6*(1/1+4*1/(1 1/6)+2*1/(1 2/6)+4*1/(1 3/6)+2*1/(1 4/6)+4*1/(1 5/6)+1/2)~~0.693169

A_(S_4) = 1/3*1/4*(1/1+4*1/(1 1/4)+2*1/(1 2/4)+4*1/(1 3/4)+1/2)~~0.693254

A_(S_2) = 1/3*1/2*(1+4*1/1.5+1/2)~~.694444

ln(2)~~0.69314718

The actual error from the 6th Simpson’s sum is about 0.00002.

A_(S_20) = sum_(n=1)^10 1/(3*20)*(1/(1 + 1/20 (2 n – 2)) + 4/(1 + 1/20 (2 n – 1)) + 1/(1 + (2 n)/20)) = 5555158368718531/8014397185594800~~0.693147375

For comparison, consider 100 terms with right endpoints: sum_(k=1)^100 1/(100 (k/100 + 1))
~~0.690653430481824215252268721472608478928428119821791431288…

Or the Trapezoidal Rule with 50 intervals:
A_(T_50)=sum_(k=1)^50 1/(2*50)*(1/(1+(K-1)/50)+1/(1+k/50))~~0.693172179

#### Example 6:

Here is a picture of a parabola intersecting the reciprocal function at x=1,2,3

The parabola, y=1/6*x^2-1*x+11/6, is shown in red.
The beautiful thing about Simpson’s rule is that we don’t actually need to calculate the coefficients of any of these parabolas. The weighted sum does all of the work for us.

# Trigonometric Substitution

Examples

1. int sqrt(1-x^2)dx
2. int sqrt(1+x^2)dx
3. int 1/(x sqrt(x^2-16)dx

Homework

1. int 1/sqrt(81+x^2) dx
2. int_-16^16 1/(256+x^2) dx
3. int_0^2 1/sqrt(16-x^2) dx
4. int sqrt(9-t^2) dt
5. int sqrt(y^2-81)/y dy
6. int 1/(x^2 sqrt(x^2-64)) dx
7. int_0^35 (4x)/sqrt(x^2+1) dx
8. int x^3/sqrt(x^2+121) dx

# Section 6.3 Arc Length Problems

Arc Length = $$\displaystyle \int_{x=a}^b \sqrt{1+\left[f'(x)\right]^2}\,dx$$

Arc Length = $$\displaystyle \int_{y=c}^d \sqrt{1+\left[g'(y)\right]^2}\,dy$$

#### Steps

1. find $$f'(x)$$
2. find $$\big[f'(x)\big]^2$$
3. find $$1+\big[f'(x)\big]^2$$
4. find $$\sqrt{1+\big[f'(x)\big]^2}$$
5. $$\displaystyle \int_{x=a}^b{\sqrt{1+\left[f'(x)\right]^2}\,dx}$$
1. hope to find an antiderivative
2. or evaluate numerically with a computer program

#### Homework

1. Sketch and find the length of the curve $$y=\frac{1}{3}(x^2+2)^\frac{3}{2}$$ from $$x=0$$ to $$x=3$$.
1. $$y’=\frac{1}{3}\frac{3}{2} 2x (x^2+2)^\frac{1}{2}=x (x^2+2)^\frac{1}{2}$$
2. $$(y’)^2 = x^2 (x^2+2)$$
3. $$1+(y’)^2 =1+ x^2 (x^2+2)$$
$$= x^4 + 2x^2 +1 = (x^2+1)^2$$
4. $$\sqrt{1+(y’)^2} = x^2+1$$
5. $$\int_0^3 \left(x^2+1\right) \,dx=\bigg[\frac{x^3}{3}+x\bigg]_0^3=12$$
2. Sketch and find the length of the curve $$y=x^\frac{3}{2}$$ from $$x=0$$ to $$x=4$$.
3. Sketch and find the length of the curve $$x=\frac{y^3}{3}+\frac{1}{4y}$$ from $$y=1$$ to $$y=3$$.
4. Sketch and find the length of the curve $$x=\frac{y^4}{4}+\frac{1}{8y^2}$$ from $$y=1$$ to $$y=2$$.
5. Sketch and find the length of the curve $$x=\int_0^x \sqrt{\sec^4(t)-1}\,dt$$, $$-\frac{\pi}{4}\le x \le\frac{\pi}{4}$$
1. $$x’=\sqrt{\sec^4(x)-1}$$
2. $$(x’)^2=\sec^4(x)-1$$
3. $$1+(x’)^2 =\sec^4(x)$$
4. $$\sqrt{1+(x’)^2} =\sec^2(x)$$
5. $$\displaystyle \int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} \sqrt{1+(x’)^2}\,dx =\int_{-\frac{\pi}{4}}^{\frac{\pi}{4}}\sec^2(x)\,dx=\bigg[\tan(x)\bigg]_{-\frac{\pi}{4}}^{\frac{\pi}{4}}=2$$
6. $$y=x^2$$ , $$-1 \le x \le 2$$
Sketch the graph and set up the integral for the length of the curve. Use a calculator or program to approximate the curve’s length.
7. 13
8. 14
9. 15
10. 21
11. Find the arc length of an astroid. $$\displaystyle x^\frac{2}{3}+y^\frac{2}{3}=a^\frac{2}{3}$$ is a curve called an astroid, star-shaped. Solving for $$y$$ we get $$\displaystyle y=\left(a^\frac{2}{3}-x^\frac{2}{3}\right)^\frac{3}{2}$$. We will start by finding the arclength of half of the section in the first quadrant $$\frac{a\sqrt{2}}{4}$$.
In the graph to the right a = 3. You can see there that Geogebra had a difficult time drawing the cusps on each axis.
Solution
12. 23

# Section 6.2 Cylindrical Shells

Consider revolving a thin rectangle of area under a curve about the y-axis. You would end up with a cylinder, like a label on a can.

The volume of such an object would be $$2\pi x_i f(x_i) \Delta x$$.

Summing these up and taking the limit as $$\Delta x \to 0$$ leads to an integral for a rotational volume.

$$! \int_{x=a}^b 2\pi x f(x) \, dx$$

#### Examples

1. $$y=1+x^2/4$$ where $$0 \le x \le 2$$ about the $$y$$-axis
2. $$x=y^2$$ where $$0 \le y \le \sqrt{2}$$ about the $$x$$-axis
3. $$y=\sqrt{x^2+1}$$ where $$0 \le x \le \sqrt{3}$$ about the $$y$$-axis
4. The region bounded by $$y=x$$, $$y=-x/2$$ and $$x=2$$ about the $$y$$-axis
5. The region bounded by $$y=x^2$$, $$y=2-x$$, $$x=0$$, and $$x \ge 0$$ about the $$y$$-axis
6. The region bounded by $$y=2x-1$$, $$y=\sqrt{x}$$ and $$x=0$$ about the $$y$$-axis
7. The region bounded by $$x=\sqrt{y}$$, $$x=-y$$ and $$y=2$$ about the $$x$$-axis
8. The region bounded by $$x=2y-y^2$$ and $$x=0$$ about the $$x$$-axis
9. The region bounded by $$y=|x|$$ and $$y=1$$ about the $$x$$-axis
10. $$y=x+2$$ and $$y=x^2$$ about
1. $$x=2$$
2. $$x=-1$$
3. the $$x$$-axis
4. $$y=4$$
11. Compute the volume of the solid generated by revolving the region bounded by $$y=x$$ and $$y=x^2$$ about each coordinate axis using
1. the shell method
2. the washer method
12. Using washers or shells, find the volume of the region in the first quadrant bounded by the curve $$x=y-y^3$$ and the $$y$$-axis about
1. the $$x$$-axis
2. $$y=1$$
13. Using washers or shells, find the volume of the region  bounded by the curve $$y=\sqrt{x}$$ and the $$y=x^2/8$$ about
1. the $$x$$-axis
2. the $$y$$ axis
14. The region shown here is to be revolved about the x-axis to generate a solid. Which of the methods (disk, washer, shell) could you use to find the volume of the solid? How many integrals would be required in each case? Explain.

# HW Volumes Part 1

1. The solid lies between planes perpendicular to the $$x$$-axis at $$x = 0$$ and $$x = 4$$. The cross-sections perpendicular to the axis on the interval $$0 \le x \le 4$$ are squares whose diagonals run from the parabola $$y = -\sqrt{x}$$ to the parabola $$y = \sqrt{x}$$.

5. The base of a solid is the region between the curve $$y = 2\sqrt{\sin(x)}$$ and the interval $$[0, \pi]$$ on the $$x$$-axis. The cross-sections perpendicular to the $$x$$-axis are
a. equilateral triangles with bases running from the $$x$$-axis to the curve as shown in the accompanying figure.
b. squares with bases running from the $$x$$-axis to the curve.

9. The solid lies between planes perpendicular to the $$y$$-axis at $$y = 0$$ and $$y = 2$$. The cross-sections perpendicular to the $$y$$-axis are circular disks with diameters running from the $$y$$-axis to the parabola $$x = 25y^2$$.

15. Find the volume of the solid generated by revolving the shaded region about the $$x$$-axis.

17. Find the volume of the solid generated by revolving the shaded region about the $$y$$-axis.

19. Find the volume of the solid generated by revolving the region bounded by $$y=x^2$$, $$y=0$$, and $$x=2$$ about the $$x$$-axis.

Revolving around the $$x$$-axis with the disk method gives us rectangles with a width of $$dx$$. The radius of the disks is $$y=x^2$$.

$$! V=\int_{x=0}^2 \pi \left(x^2\right)^2\,dx$$

$$! V=\pi\bigg[\frac{x^5}{5}\bigg]_0^2=\frac{\pi\cdot 32}{5}\,\textrm{units}^3$$

21. Find the volume of the solid generated by revolving the region bounded by $$y=\sqrt{9-x^2}$$ and $$y=0$$ about the $$x$$-axis.

23. Find the volume of the solid generated by revolving the region bounded by $$y=\sqrt{\cos(x)}$$, $$0\le x \le \pi /2$$ about the $$x$$-axis.

25. Find the volume of the solid generated by revolving the region bounded by $$y=e^{-x}$$, $$y=0$$, and $$x=1$$ about the $$x$$-axis.

31. Find the volume of the solid generated by revolving the region bounded by the region enclosed by $$x =\sqrt{5}y^2$$, $$x=0$$, $$y=-1$$, and $$y=1$$ about the $$y$$-axis.

32. Find the volume of the solid generated by revolving the region bounded by the region enclosed by $$x=y^{3/2}$$, $$x=0$$, and $$y=2$$ about the $$y$$-axis.

35. Find the volume of the solid generated by revolving the region bounded by the region enclosed by $$x=\frac{2}{\sqrt{y+1}}$$, $$x=0$$, $$y=0$$, and $$y=3$$ about the $$y$$-axis.

37. Find the volume of the solid generated by revolving the shaded region about the $$x$$-axis.

45. Find the volume of the solid generated by revolving the region enclosed by the triangle with vertices $$(1,0)$$, $$(2,1)$$, $$(1,1)$$ about the $$y$$-axis

53. Find the volume of the solid of revolution by revolving the region bounded by the parabola $$y=x^2$$ and the line $$y=1$$ about

a. the line $$y=1$$
b. the line $$y=-1$$
c. the line $$y=2$$

54. By integration, find the volume of the solid generated by revolving the triangular region with vertices $$(0,0)$$, $$(b,0)$$, $$(0,h)$$ about
a. the $$x$$-axis
b. the $$y$$-axis

55. The volume of a torus: The disk $$x^2+y^2\le a^2$$ is revolved about the line $$x=b$$ ($$b\ge a$$) to generate a solid shape like a doughnut and called a torus. Find its volume. (HINT: $$\int_{-a}^{a}\sqrt{a^2-y^2}\,dy=\frac{\pi a^2}{2}$$, since it is the area of a semicircle of radius $$a$$.)

57. Volume of a Bowl
a. A hemispherical bowl of radius $$a$$ contains water to a depth $$h$$. Find the volume of the water in the bowl.
b. Related Rates: Water runs into a sunken concrete hemispherical bowl of radius 5 m at a rate of $$0.2\,\textrm{m}^3$$/sec. How fast is the water level in the bowl rising when the water in 4 m deep?

61. Designing a wok: You are designing a wok frying pan that will be shaped like a spherical bowl with handles. A bit of experimentation at home persuades you that you can get one that holds about 3 L if you make it 9 cm deep and give the sphere a radius of 16 cm. To be sure, you picture the wok as a solid of revolution, as shown here, and calculate its volume with an integral. To the nearest cubic centimeter, what volume do you really get?
($$1\,\textrm{L}=1000\,\textrm{cm}^3$$.)

From the text:

# Section 6.1 Volumes from Integration

Integrals can be used any time we accumulate something. It could be accumulating speed to get distance, lengths to get area, even area to get volume or force to get work.

Consider a rectangular box, $$l\cdot w \cdot h$$. Notice that the $$l\cdot w$$ is the area of the base. So, Volume = Area of Base x height. Consider the integral:

$$! \int_0^h (l\cdot w) \, dx =l\cdot w \cdot h$$

This works for any area as long as the the top and bottom are parallel and the cross-sections have the same area.

$$! \int_0^h \textrm{Area}\,dx = Volume$$

#### Example 1

Consider the functions $$y=\sqrt{x}$$ and $$y=-\sqrt{x}$$. Imaging a square, perpendicular to the $$x-y$$-plane and $$x$$-axis whose diagonals span between these curves.

The length of any diagonal would then be $$2 \sqrt{x}$$ and a side length would be $$\sqrt{2x}$$ Now let that square slide from $$x=0$$ to $$x=4$$. Let’s sketch this solid and find it’s volume.

Volume = $$\displaystyle \int_0^4 \textrm{side}^2\,dx = \int_0^4 \big( \sqrt{2x}\big)^2\,dx = \int_0^4 2x\,dx = \big[x^2\big]_0^4 = 16$$ square units.

### Rotational Volumes

We can also find volumes by rotating areas or accumulating discs

Consider rotating the line $$y=3$$ about the $$x$$-axis.

To get a cross-sectional area we consider that a circular disc has an area of $$\pi r^2$$ and here the radius is the distance from the $$x$$-axis to the line $$y=3$$.

$$! \int_{x=0}^5 \pi (3)^2\,dx = \pi\cdot 3^2 \cdot 5$$

We can rotate any curve about an axis to generate volumes of all sorts.

# Intersecting Cylinders with equal radii

Imaginw two pipes of the same size intersecting. What does that intersection look like?

It is slightly larger than a sphere of the same radius.

Since it is symmetric top to bottom, just consider the top half. Slices of this intersection, parallel to the plane the two pipes sit on are squares.

The length of each square is $$2\sqrt{r^2-y^2}$$ where $$y$$ is measured perpendicular to the plane of the pipes, starting at their common center.

A particular slice, parallel to the plane of the pipes, above the common center would then have an area of $$\bigg(2\sqrt{r^2-y^2}\bigg)^2$$.

If we integrate this area as $$y$$ goes from $$0$$ to $$r$$, then we will get the volume of the top half:

$$!\int_{y=0}^r \bigg(2\sqrt{r^2-y^2}\bigg)^2\,dy$$

# Section 5.6 Substitution and Area Between Curves

Substitution with integrals, that is, reversing the chain rule for derivatives, can help us find antiderivatives for special function combinations.

According to the fundamental theorem of calculus, we can also use those antiderivatives to find areas between curves.

#### Example 1

I want to find the area between $$f(x)=x^2-1$$ and $$g(x)=1-x^2$$ on the interval $$[-1,1]$$

Since $$g(x)$$ is the upper curve here, we want the integral $$\displaystyle \int_{-1}^1 \big(g(x)-f(x)\big)\,dx$$

Note this is the same as $$\displaystyle 2\cdot\int_{0}^1 \big(g(x)-f(x)\big)\,dx$$ since the functions have even symmetry.

Examples

• The area between $$y=1$$ and $$y=\cos^2(x)$$ on the interval $$0,\pi$$
• The area between $$y=0$$, $$x+y=2$$, and $$y=x^2$$ on the interval $$0,2$$

# Section 5.5 Substitution in Definite Integrals

Consider the chain rule:

$$! \frac{d}{dx}\bigg[F(g(x))\bigg]=F'(g(x))\cdot g'(x)$$

With respect to integration the chain rule looks like this:

$$! \int F'(g(x))\cdot g'(x)\, dx = F(g(x)) + C$$

Now consider a substitution, $$u=g(x)$$. Then $$\frac{du}{dx}=g'(x)$$ or in differential form $$du = g'(x)\,dx$$.

Applying this to the integral version of the chain rule, we get

$$! \int F'(u) \, du = F(u)+C$$

#### Example 1

$$! \frac{d}{dx}\bigg[\sin\left(x^2\right)\bigg]=\cos\left(x^2\right)\cdot 2x$$

This means that $$\sin\left(x^2\right)$$ is an antiderivative for $$\cos\left(x^2\right)\cdot 2x$$.

$$! \int \cos\left(x^2\right)\cdot 2x \, dx = \sin\left(x^2\right) + C$$

Applying the substitution $$u=x^2$$ and $$du=2x \, dx$$, we get

$$! \int \cos\left(u\right) \, du = \sin\left(u\right) + C$$

#### Other Examples

$$\displaystyle \int 3\cdot (3x+4)^7 \, dx$$

$$\displaystyle \int sqrt{5x-1} \, dx$$

$$\displaystyle \int \frac{4x^3}{x^4+1} \, dx$$

$$\displaystyle \int \sin^5\left( x/3\right) \cos\left( x/3\right) \, dx$$

$$\displaystyle \int_{0}^{\pi/2} \frac{2\sin(2\theta)}{4-\cos(2\theta)}\,d\theta$$

# Section 5.2

Summation Notations: $$\displaystyle \sum_{k=1}^n a_k$$ or $$\left(\sum_{k=1}^n a_k \right)$$
$$!\sum_{k=1}^n a_k$$

#### Example 1

$$!\sum_{k=1}^n k$$

$$!\sum_{k=1}^n k=1+2+3+ \cdots +n$$

#### Example 2

$$!\sum_{i=1}^n (2i-1)$$

$$!\sum_{i=1}^n (2i-1) = 1+3+\cdots + (2n-1)$$

#### Example 3

$$!\sum_{i=0}^n 5^i$$

$$!\sum_{i=0}^n 5^i = 1+5+ 5^2 \cdots + 5^n$$

#### Example 4

$$!\sum_{i=0}^n \frac{(-1)^i}{2i+1}$$

$$!\sum_{i=0}^n \frac{(-1)^i}{2i+1} = \frac{1}{1}+ \frac{-1}{3} + \frac{1}{5} + \frac{-1}{7} +\cdots + \frac{(-1)^n}{2n+1}$$

### Sum Rules

$$\displaystyle \sum_{k=1}^n (a_k \pm b_k) = \sum_{k=1}^n a_k \pm \sum_{k=1}^n b_k$$

$$\displaystyle \sum_{k=1}^n c \cdot a_k = c \cdot \sum_{k=1}^n a_k$$

$$\displaystyle \sum_{k=1}^n c = n \cdot c$$

### Special Sums

$$!\sum_{k=1}^n k = \frac{n(n+1)}{2}$$

$$!\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}$$

$$!\sum_{k=1}^n k^3 = \left(\frac{n(n+1)}{2}\right)^2$$

#### Example 5

$$\displaystyle f(x)=x^2$$ on the interval $$[0,4]$$ with 4 subintervals, then 10 subintervals

#### Example 6

$$\displaystyle f(x)=4x^3$$ on the interval $$[0,5]$$ , find the limit of the right hand sums

$$\Delta x = \frac{5}{n}$$ and $$x_i = 0+\frac{5}{n}\cdot i$$. Since $$f$$ is increasing on this interval, right-hand sums will lead to an upper sum.

$$! \sum_{k=1}^n \frac{5}{n}\cdot 4\left( \frac{5i}{n} \right)^3$$

$$! =\frac{2500}{n^4}\cdot\sum_{k=1}^n i^3 =\frac{2500}{n^4}\cdot \left(\frac{n(n+1)}{2}\right)^2$$

$$! \lim_{n\to\infty}\frac{2500}{n^4}\cdot \left(\frac{n(n+1)}{2}\right)^2 = \frac{2500}{4}=625$$

#### Example 7

$$\displaystyle f(x)=4x^3$$ on the interval $$[0,5]$$ , find the limit of the left hand sums

$$\Delta x = \frac{5}{n}$$ and $$x_i = 0+\frac{5}{n}\cdot (i-1)$$. Since $$f$$ is increasing on this interval, left-hand sums will lead to an lower sum

$$! \sum_{k=1}^n \frac{5}{n}\cdot 4\left( \frac{5(i-1)}{n} \right)^3$$

$$! =\frac{2500}{n^4}\cdot\sum_{k=1}^n (i-1)^3 =\frac{2500}{n^4}\cdot \left(\frac{(n-1)n}{2}\right)^2$$

$$! \lim_{n\to\infty}\frac{2500}{n^4}\cdot \left(\frac{(n-1)n}{2}\right)^2 = \frac{2500}{4}=625$$