Integration

__Integration__
The integral of a function gives you the area under the curve. The symbol for it looks like this: math \int math

__Riemann Sums__
To get an approximation of that area, you can use a Riemann sum. Basically, this is just assuming that you have a series of rectangles under the curve. To approximate the area under y=f(x) between a to b, we can just divide the function into n rectangles of an equal length of (a-b)/n. The heights would just be the height at x. Knowing the formula for a rectangle (A=l*h) and that the sum of the areas of the rectangles will give us the Riemann sum, we can find some formulas for the three most common sums: left, right, and midpoint.

math A_1=l_1*h_1 math math A_2=l_2*h_2 math ... math A_n=l_n*h_n math math A_T=A_1+A_2+...+A_n math So... math A_T=l_1*h_1+l_2*h_2+...+l_n*h_n math

But we know all of the lengths are equal to each other, so...

math A_T=l*h_1+l*h_2+...+l*h_n math math A_T=l*(h_1+h_2+...+h_n) math l equals (b-a)/n so

math A_T=\frac{b-a}{n}*(h_1+h_2+...+h_n) math

The height will equal f(x), so...

math A_T=\frac{b-a}{n}*(f(x_1)+f(x_2)+...+f(x_n)) math math A_T=\frac{b-a}{n}*$\displaystyle\sum\limits_{i=1}^n{f(x_i)} math

Now, depending on which side of the function we take the height of, we have different formulas.

__Right Sums__ Assume we take the height at the right side of each interval, so for the function y=x from 0 to 4, using 4 rectangles, our length is 1, so the first interval has a height of f(1)=1; the second, f(2)=2; the third, f(3)=3; and so on. To find the height at each interval, you take the length of each interval and multiply by which number interval it is. In the example above, each interval had a length of 1, so the height of the first interval is f(1*1)=1; the second, f(1*2)=2; the third, f(1*3)=3; and so on

Generally, then, our height equals: math f((i)*\frac{b-a}{n} + a) math where i= the interval number and (b-a)/n is the length.

Plugging the height into the formula above, we get: math A_T=\frac{b-a}{n}*$\displaystyle\sum\limits_{i=1}^n{f((i)*\frac{b-a}{n} + a)} math

__Left Sums__ Now assume we take the height at the left side of each interval, so to find the height at each interval, you take the length of each interval and multiply by which number interval it is minus 1. So for the function y=x from 0 to 4, using 4 rectangles, our length is 1, so the first interval has a height of f(0*1)=0; the second, f(1*1)=1; the third, f(2*1)=2; and so on.

Generally, our height equals: math f((i-1)*\frac{b-a}{n} + a) math Plugging that height into the formula above to find our areas, we get: math A_T=\frac{b-a}{n}*$\displaystyle\sum\limits_{i=1}^n{f((i-1)*\frac{b-a}{n} + a )} math

__Mid-point Sums__ Now assume we take the height at the mid-point of each interval. So, for the function y=x from 0 to 4, using 4 rectangles, our length is 1, so the first interval has a height of f(.5)=.5; the second, f(1.5)=1.5; the third, f(2.5)=2.5; and so on.

Obviously, our midpoint x value is halfway between the one used for left and right sums.So, if you just average the two x's, you get the midpoint. math \frac{(i-1)*\frac{b-a}{n}+(i)*\frac{b-a}{n}}{2} = \frac{2i-1}{2}*\frac{b-a}{n} math Plugging that height into the formula above to find our areas, we get: math A_T=\frac{b-a}{n}*$\displaystyle\sum\limits_{i=1}^n{f( \frac{2i-1}{2}*\frac{b-a}{n} + a )} math

__First Fundamental Rule of Calculus:__ math \frac{d}{dx}$\int_{}{f(x)}dx =f(x) math In other words, integrals and derivatives are inverses. That's why integrals are sometimes called anti-derivatives. Therefore, technically, every rule that helps you find a derivative works in reverse for an integral. However, the reverse may not always be apparent, especially with the more complicated ones like product and quotient rule. That's why for AB Calc, these next two rules will be the go-to tricks, along with the standard integrals to memorize:

__Things to memorize:__ math $\int_{}{C*f(x)}dx = C*$\int_{}{f(x)} math where C is a constant

math $\int_{}{sin(x)}dx = -cos(x) + C math math $\int_{}{cos(x)}dx = sin(x) + C math and all the other trig derivatives backwards Since you don't know what constants may have been in the equation before taking the derivative, you have to add that constant C

math $\int_{}{tan(x)}dx = -ln|cos(x)| + C math math $\int_{}{cot(x)}dx = ln|sin(x)| + C math (Derivations for these further down) math $\int_{}{\frac1x}dx = ln|x| + C math

TBA: Sec, Csc, Inverse Trig
__Power Rule for Integration__ math $\int_{}{x^n}dx = \frac{x^{n+1}}{n+1} + C math

Sometimes, questions ask for a particular solution, where they'll give you a point on the graph. Then just plug your x and y into the integral, solve for C, then plug C into the indefinite integral for the solution.

Example: math $\int_{}{x}dx = \frac{x^2}{2} + C math

Particular solution: The graph of the integral passes through (2, 7)

math \frac{2^2}{2} + C=7 math

math 2+ C=7 math

math C=5 math

So the particular solution for (2,7) for this integral is:

math \frac{x^2}{2} + 5 math

__u Substitution__ The goal of this technique is to change something you can't integrate easily and turn it into something you can, in terms of u. Taking the chain rule in reverse: math $\int_{}{f(g(x))*g'(x)}dx = F(g(x)) + C math Where F(x) is the integral of f(x)

Example (derivation for the integral of tan(x)): math $\int_{}{\frac{sin(x)}{cos(x)}}dx =-ln|cos(x)|+ C math

Where f(x)=1/x and g(x)=cos(x)

However, it's usually hard to see what function equals what and which should be integrated, so, to make things simpler, use u substitution, where g(x)=u and g'(x)=du math $\int_{}{f(g(x))*g'(x)}dx = $\int_{}{f(u)}du math math u=cos(x) math math du=-sin(x)dx math Therefore: math $\int_{}{\frac{sin(x)}{cos(x)}}dx = -$\int_{}{\frac1u}du math math -$\int_{}{\frac1u}du=-ln|u| + C math Plug u back in: math -ln|cos(x)| + C math

You can try with cot(x) if you want to derive it yourself.

__Now, most integrals are just a matter of turning something complicated into something you know the trick for:__ For example: math $\int_{}{\frac{2x}{x^2+3}}dx = ? math Looks complicated, but using u substitution: math u=x^2+3 math math du=2xdx math So... math $\int_{}{\frac{2x}{x^2+3}}dx =$\int_{}{\frac1u}}du math math $\int_{}{\frac1u}}du=ln|u| math Now, just plug u back in: math ln(x^2+3) math (The absolute value is irrelevant because x^2+3 is always positive)

__Definite Integral__ Where F(x) is the integral of f(x): math $\int_{a}^b{f(x)}dx = F(a)-F(b) math The C is irrelevant because C-C=0 __(This is the 2nd Fundamental Theorem of Calculus)__

__Back to the First Fundamental Rule of Calculus (with Definite Integrals):__ math $\int_{a}^{f(x)}{g(t)}dt =g(f(x))*f'(x) math The integrand is written in terms of t to avoid confusion with the x of our function, because the variable of the integrand is irrelevant here

Example: math $\int_{3}^{x^2}{t^2-t-\frac3t}dt =(x^4-x^2-\frac3{x^2})*{2x} math

__Useful Rules for Definite Integrals__ math $\int_{a}^b{C}dx =(b-a)*C math math $\int_{a}^a{f(x)}dx =0 math math $\int_{a}^b{f(x)}dx =-$\int_{b}^a{f(x)}dx math math $\int_{a}^c{f(x)}dx =$\int_{a}^b{f(x)}dx+$\int_{b}^c{f(x)}dx math If f(x) is even: math $\int_{-a}^a{f(x)}dx =2$\int_{0}^a{f(x)}dx math If f(x) is odd: math $\int_{-a}^a{f(x)}dx =0 math