#### Related to [[Antiderivatives]] --- ## Definition - In mathematics, **integration** is the process **of finding the area enclosed by a curve/function**. - The ***integrand* is the function that you are *integrating***. >[!danger] >##### *Definition of a definite vs indefinite integral* >- An *indefinite* integral does not specify an **upper and lower bound**. This indicates that you are finding an equation - **specifically the specified function's [[Antiderivatives]]** instead of an area. >- A *definite* integral specifies an **upper and lower bound**. This indicates you *can* and should be finding an **area**. >$\text{Indefinite integral: }\color{Bisque}\int f(x)dx=F(x)\space\leftarrow\text{\small antiderivative function}$ >$\text{Definite integral: }\color{Bisque}\int_a^b f(x)dx=F(b)-F(a)=A\space\leftarrow\text{area}$ --- ## The fundamentals and Reimann sums - In order to find the *area* under a curve we first divide the space up into $n$ rectangles between two bounds $a$ and $b$. The height of these rectangles will be equal to **the functions height** at their location and their length will be equal to $\frac{1}{n}$. By adding up the area of these rectangles we can estimate the area under a curve. - The equation that results from this is known **as a Reimann sum**. >[!quote] >![[Integrationfdsf.png|850]] - When creating these rectangles we can choose to set their height equal to the function at 3 different locations, the left tip of the rectangle, the midpoint or the right tip. Depending on the functions shape some of these may be over and under estimations *(depending on weather the rectangles have a corner that protrudes out from the area under the line).* - If the function is curving down, then left endpoints will result in an **overestimated area** and right endpoints will result in an underestimation. - If the function is curving up, **right endpoints will result in an overestimated area** and left endpoints will result in an underestimated area. - Using the middle point will **always result in an overestimation** that is more accurate than **either** of the other methods. - This method, where we use a **finite number of rectangles to evaluate the area under a function between two bounds $a$ and $b$** is known as **Reimann summation**. The general Reimann sum equation using **right endpoints** is as follows: $\newline$ $\text{Riemann sum formula}$ $\small n = \text{ number of rectangles }\;\;|\;\;\text{bounds}=[a,b]\;\;|\;\;\Delta x = \text{width of rectangles}=\frac{b-a}{n}\;\;|\;\; x_i=a+i\Delta x$ $\large\color{LightCyan}\text{Estimate area under }f(x)=\sum_{i=1}^n f(x_i)\cdot\Delta x$ >[!quote] >##### *Example Riemann sum* >$f(x) = x^2\;\text{ on bounds }[1,3]\;\text{ with 4 rectangles - }n=4$ >$\text{Area}=\sum_{i=1}^4\biggl[\;1 + \left(\frac{2i}{4}\right)^2\;\;\biggl]\cdot\,\frac{2}{4}\longrightarrow 0.5\Big(f(1.5) + f(2) + f(2.5) + f(3)\Big)=7.5$ >[!tip] >##### *Riemann sum formulas for other endpoints* >$\large\text{Midpoint Reimann sum: }\space\color{LightCyan}\sum_{i=0}^{n-1}\Biggl[\frac{b-a}{n}\cdot f\left(\frac{b(1+2i)}{2n}\right)\Biggl]$ >$\large\text{Left point Reimann sum: }\space\color{LightCyan}\sum_{i=1}^{n}\Biggl[\frac{b-a}{n}\cdot f\left(\frac{(b-a)(i-1)}{n}\right)\Biggl]$ - Using a finite number of rectangles $n$ inherently means that the area we measure will be slightly inaccurate. The more rectangles you use the more accurate this estimation will be, so to get a **perfectly accurate area we use a limit to evaluate the area as the number of rectangles $n$ approaches *infinity!*** - To do this we evaluate the limit of a Riemann sum as n approaches infinity. This type of Riemann sum is known as **a definite integral**. - When using this technique *(infinite rectangles)* it **does not matter which side of the rectangle we use to get its height** since each rectangle has a width approaching zero. $\newline$ $\text{Using a limit to integrate with infinite rectangles:}$ $\large\color{LightCyan}\text{Exact area under }f(x)=\lim_{n\rightarrow\infty}\;\sum_{i=1}^n f(x_i)\cdot\Delta x$ >[!quote] >#### *In summary...* $\therefore\space\text{Let }f(x)\text{ be a function defined on all }a\le x\le b$ $\therefore\space\text{Let }\Big(x_{i-1}\Big)\le \Big(x_i^*\Big)\le\Big(x_i\Big)\text{ be sample points}$ >--- >$\large \text{The definite integral from }a\rightarrow b\text{ is:}$ >$\large \color{LightCyan}\int_a^bf(x)\space dx=\lim_{n\rightarrow\infty}\left(\sum_{i=1}^n \space f\Big(x_i^*\Big)\space \Delta x\right)$ --- ## The fundamental theorem of calculus - The fundamental theorem of calculus is *technically two theorems* which link the concept of **differentiating a function** *(calculating its slopes, or rate of change at each time)* with the concept of **integrating a function** *(calculating the area under its graph, or the cumulative effect of small contributions)*. - These two theorems work because the **antiderivative of a function is equal to the area of its *original function* at any point $x$**. This property should be somewhat intuitive since the *slope* of a function relates to how fast its area *increases or decreases* as you sweep along it left to right. $\newline$ $\large\text{The fundemental theorem of calculus:}$ $\text{\small Let }f(x)\text{ be a continuous, real valued function on a closed interval }[a,b]\text{ and }a\le x\le b$ $\text{\color{LightGrey}Part 1: }\space\space\large\color{Bisque} G(x)=\int_a^xf(t)dt\space\space \text{\color{LightGrey} where }\space\space G'(x)=f(x)$ $\text{\color{LightGrey}Part 2: }\space\space\color{Bisque}\Large\int_a^bf(x)dx=F(b)-F(a)$ >[!quote] >$\text{Visual explination of this theorem: }$ >‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎‎‎ ‎‎‎ ‎‎ ‎ ‎ ‎ ‎ ![[Fundamental_theorem_of_calculus_(animation_).gif|400]] ##### *Using the first part of the FTC* $\newline$ $\text{\color{grey}let }\;G(x) =\int_a^{h(x)} f(t)dt\;\;\;\color{grey}\text{and let }F(x)\text{ be the antiderivative of }f(x)$ $\text{\color{grey}if }\;G(x) = \int_{g(x)}^{h(x)}f(t)dt\;\text{\color{grey} convert it using integral rules to: }\;-\int_a^{g(x)}f(t)dt\space+\int_a^{h(x)}f(t)dt$ $\newline$ >[!quote] >$\text{Standard area }\,\color{LightCyan}G(x) = F\Big(h(x)\Big)-F(a)$ $\text{Derivative }\,\color{LightCyan}G'(x) = f\Big(h(x)\Big)\cdot h'(x)$ $\text{Second derivative }\;\color{LightCyan}G''(x)\,= f'\Big(h(x)\Big)\cdot h'(x)+f\Big(h(x)\Big)\cdot h''(x)$ $\newline$ ##### *Common questions involving the FTC* *For more check [[Integral applications]]* - Some questions will reference different functions in the FTC, therefore its important to know the commonly used function names and their relationship to each other. **$g(x)$ is usually used to denote the integral, which is either an area or the antiderivative function. $f(x)$ or $f(t)$ are usually used for the function inside the integral *(known as the integrand)*.** As a result, $g'(x)$ is **equal** to $f(x)$ and $f'(x)$ is just the *second derivative* of $g(x)$. - Questions relating to the first part of the FTC will often ask you about the **critical points** of $g(x)$. This information is relatively easy to find if the function inside the integral $f(t)$/$f(x)$ is **graphed** since we can treat these two functions just like we would a regular derivative and *its base function*. *Places where the derivative $f(x)$ is 0 are critical points.* - If $f(t)$ is not graphed we can find the critical points by setting it *(the integrand)* equal to zero and solving. - These critical points are places where **the area** under the function $f(t)$ either stops changing or reaches a minimum/maximum. >[!example] >##### *FTC question example* >- Given that this is the graph of $f(x)$ where does $g(x)$ have a local max/min? >- What is the value of $f'(3)$ and $g'(3)$? ></br> > >![[Integrationexamplepic.png|850]] > >--- >##### Answers: >- *On the graph of $g(x)$ there is a local max at $x=2$ and a local min at $x=4$*. >- *The value of $f'(3)$ is $0$ and the value of $g'(3)$ is $-1$.* ##### *Net change theorem* - The net change theorem states that the integral of any function **that represents a rate of change is the net change** or total change. For example if you integrate a function that represent the change in the water level of a revivor its integral will be equal to the net change of the water level or the difference in height from where it began. - This is why the **integral of an equation that describes velocity as a function of time will be equal to the displacement of the object it describes *(see [[Free fall motion]])***. Note that this is different from total displacement! - If you want to find the **total distance traveled** you must make the integrand *(the velocity and time function)* an **absolute value function**. This means you will have to separate the integral and use different bounds every time the sign of velocity changes *(making sure to multiply the equation by -1 if the velocity is negative)*. - The integral of a function that describes force as a function of distance will be equal to the **work exerted on that object - $w=Fd$.** Recall that the force exerted onto an object is a function of both the object's mass and its acceleration - $F=ma$. ##### *Mean value theorem* - This theorem an its associated equation allows you to find the average value of a function on some given interval $[a,b]$. This is very useful for calculating the average of some continuous set of data along an interval. - This theorem also states that **multiplying the average value of a continuous function on some interval and then multiplying it by the interval length is equal to the integral of the function on that interval**. $f_{\text{avg}}=\frac{1}{b-a}\int_b^a f(x)dx=f(c)$ $\therefore\int_a^b f(x)dx=f(c)(b-a)$ --- ## Integrability ##### *See more on [[Improper integrals]]* - Its important to recall that **not all functions can be integrated**. Weather or not a function is **integrable** depends on its properties within **the bounds specified by the integral**. As a result there are cases where a function is integrable within certain bounds and not integrable within others. - Since the integral **of a function is based on its derivative and the derivative is based on a limit** the integral of a function **will ignore many of the same geometrical features that [[Limit]] would.** For example, single *point* discontinuities or *holes* in the function have no effect on the overall integral. >[!quote] > ###### *Integrability rules:* > - Functions that are **continuous can be integrated**. > - Functions that have a **finite number of jump discontinuities can be integrated**. This is known as the *Jump Discontinuity Theorem.* > - Functions with **asymptotic discontinuities can only *sometimes* be integrated**. --- ## Integration specific rules - The following are **integral specific rules**. For rules regarding **antiderivatives** *(which you will need to use when **solving integrals**)* refer to the [[Antiderivatives|antiderivatives page]]! - The zero rule should be fairly intuitive, it states that if **the bounds of the integral are equal, then the area or solution to that integral is zero.** When the bounds of an integral are both equal there is no space left in between them for some area to exist. $\text{Zero rule}\longrightarrow\int_a^bf(x)dx\space\text{\color{grey} and }\space b=a\rightarrow \color{LightCyan}0\;\;\;\;\therefore\large\int_a^af(x)dx\rightarrow\color{LightCyan} 0$ $\newline$ - The inverse integration rule deals with integrals that have a lower bound *a* that is larger then its upper bound *b*. To make these integrals solvable, **you must reverse the bounds *(a and b)* and change the sign of the overall integral.** This effectively means that if you are evaluating the area under a curve **backwards from right to left** the resulting area will be negative instead of positive. $\text{Inverse integration rule }\longrightarrow\int_b^a f(x)dx\rightarrow\color{LightCyan}-\int_a^b f(x)dx$ $\newline$ - There is also a fairly intuitive rule which says that if a function is even - that is mirrored in both the $+x$ and $-x$ directions **you can evaluate only half the integral and double the result.** If the integrand is odd, that is the same in the $+y$ and $-y$ directions the integral will evaluate to 0 since there is the same amount of area **above the line as there is below the line**. *Note these two functions only work if the bounds are both equidistant from 0.* $\text{If }f(x)\text{ is even }\longrightarrow\int_{-a}^af(x)dx=2\int_0^af(x)dx\;\;\;\;\;\;\;\;\text{If }f(x)\text{ is odd }\longrightarrow\int_{-a}^af(x)=0$ $\small\color{grey}\text{assuming }f(x)\text{ is continuous on }[a,b]$ $\newline$ >[!tip] >##### *Even and odd functions* $f(x)\text{ is called even if }f(-x)=f(x)$ $\small \text{this means the graph of }f(x)\text{ is symmetric about the y axis}$ $\small\color{grey}\text{Examples: }x^2,\space|x|,\space cos(x),\space x^4,\space\frac{1}{x^2+1}$ $\newline$ $\small f(x)\text{ is called odd if }f(-x)=-f(x)$ $\small\text{this means the graph of }f(x)\text{ is rotationally symetric}$ $\small\color{grey}\text{Examples: }x,\space sin(x),\space tan(x),\space x^3$ --- ## Notation - To indicate that we are attempting to integrate or find the area under a function we use $\int$. At the bottom and top of this symbol the variables $a$ and $b$ are replaced by two x values which denote the **starting and ending point of the integral** *(we will only calculate the area under a function between these two points)*. - After the integration symbol we indicate **which function will be used,** *usually its $f(x)$*. This function is multiplied by $dx$ which represents an **infinitely small value** *(the width of each rectangle)*. - *Note: If the integral does not specify bounds $a$ and $b$ that indicates it is an **indefinite integral**. The answer to this type of integral is just an antiderivative function instead an area*. $\newline$ $\text{Standard integral example}\longrightarrow\large\int_a^b f(x)\space dx$ $\text{Indefinite integral example}\longrightarrow\int f(x)dx$ >[!tip] >##### *Antiderivative notation* >- If you haven't notice already it is typical **for the antiderivative function to be denoted using the same letter as its base function, but capital**. >- For example, the antiderivative of $f(x)$ is usually writen as $F(x)$ ##### *Showing steps* - When **solving an integral and showing your steps** its important to always surround any **unsolved *(you haven't plugged in a value)* antiderivative in brackets**. You can denote which bound *$a$ or $b$* corresponds with each antiderivative by **writing it as an exponent, after the second bracket.** If you haven't yet split the antiderivative up, you can denote **both a and b** after the second bracket just like you would with the integration symbol: $\int$. - You **must use brackets** in any step that contains **an unsubstituted variable**, just like the notation for limits! $\newline$ $\int_a^bf(x)dx\longrightarrow\Big[F(x)\Big]^a_b\longrightarrow\Biggl(\Big[F(x)\Big]^b-\Big[F(x)\Big]^a\Biggl)\longrightarrow\biggl(F(b)-F(a)\biggl)$ $\newline$ - Note: *instead of using brackets you can **instead use a vertical line on the right side of the equation.** The bounds, a and b will still be in the same upper right and lower right hand position. $\newline$ $\small\int_a^b f(x)dx\longrightarrow F(x)\Big|^a_b\longrightarrow \biggl(F(x)|^b-F(x)|^a\biggl)$ ##### *Indefinite integrals* - When solving an indefinite integral there are no bounds. **As a result we don't use the bracket or line notation**. Instead we use the **integral symbol** $\int$ to indicate terms that **are not yet in their antiderived form**. This should be relatively *intuitive* since all integration rules/techniques follow this convention $\newline$ $\int ln(x)\cdot\frac{1}{x^2}\longrightarrow\left(ln(x)\cdot\frac{-1}{x}-\int\frac{1}{x}\cdot\frac{-1}{x}\right)\longrightarrow\left(-\frac{ln(x)+1}{x}+C\right)\longleftarrow\text{ solution!}$ --- ## Combining integrals - It is possible to combine integrals only if both of them have the same **integrand**, meaning they both integrate the **same function**. The "rule" that serves as the basis for combining integrals is shown below. - If you are adding or subtracting an integral with **inverse bounds** remember that it should be treated as a negative term. This means adding it to another integral is effectively the same as **subtracting it** and subtracting it from another integral is the same as adding it. This is knowns as **internal addition**. $\newline$ $\text{Basic integral combination rule:}$ $\int_a^bf(x)dx\space+\int_b^cf(x)dx\longrightarrow\int_a^cf(x)dx$ >[!example] $\text{\color{white}Addition:}$ $\color{LightCyan}\int_1^2f(x)dx\space+\int_2^3f(x)dx\space\text{\color{white} is the same as }\space\int_1^3f(x)dx$ $\text{\color{grey}\small Internal addition: }\color{LightCyan}\int_1^3f(x)dx\space +\int_3^2f(x)dx\space\text{\color{white} is the same as }\space\int_1^2f(x)dx$ $\newline$$\text{\color{white} Subtraction:}$ $\color{LightCyan}\int_1^3f(x)dx\space-\int_1^2f(x)dx\space\text{\color{white} is the same as }\int_2^3f(x)dx$ $\text{\color{grey}\small Internal subtraction: }\color{LightCyan}\int_1^3f(x)dx\space-\int_3^4f(x)dx\space\text{\color{white} is the same as }\int_1^4f(x)dx$ --- ## Area *between* curves - To calculate the area between two curves *(that have differing functions)* you **subtract the integral of the larger curve from the integral of the smaller curve**. This only works if both integrals **have the same bounds $a$ and $b$.** - When finding the area **of the region *enclosed* by two functions you will often have to decide the bounds on which you will integrate**. Since the area enclosed by two functions will always either begin or end at a point of intersection, set the two functions equal to each other and find out **where they intersect**. Set the lower bound $a$ to the left most intersection point and set $b$ to the right most intersection point. - Make sure that the larger function *(greater y value on the bounds)* is **is subtracted by the smaller function** *(or just take the absolute value)*. This means the larger function equals $f(x)$ and the smaller function is $g(x)$. - An easy way to quickly find out which function is larger and which is smaller without using graphing tools is to pick a random point between the function's intersections *(the bounds of the integral)* and solve the two function. The function whose output is larger is, of course **the larger function and that remains true until there is another point of intersection.** - If there are **more than two intersection points** you will have to evaluate *more than one integral* because when the function cross over each other *(intersection points)* the one function will become **larger then the other function**. Evaluating the integral across *multiple* intersection points would likely result in some enclosed areas *subtracting* their area from others since the order of subtraction *(dictated by which function is larger)* changes multiple times. - For each pair of intersection points figure out which function is larger and subtract it from the other, smaller function. After calculating the integral between every pair of intersecting points add up the results **to evaluate the total enclosed area**. $\newline$ $\text{Let }g(x)\le f(x)\text{ in }[a,b]$ $A=\int_a^b\Big(f(x)-g(x)\Big)dx=\int_a^b\Big(\text{\small top function - bottom function}\Big)dx$ $\color{LightCyan}=\int_a^b f(x)dx\space -\int_a^bg(x)dx = A$ >[!quote] >##### *A good visual of this: * >![[Integrationareabetweencurvespic.png|850]] ##### *Horizontal integration* - If you want to know the area enclosed by two functions on bounds of $y$ you will have to use a technique known as horiztonal integration. This process is **identical** to regular integration, **the only difference is that before integrating/setting up your integral, re-arrange the function(s) so that they are solving for $x$ instead of $y$.** - You often need to use vertical integration to solve functions of y since they overlap themselves multiple times vertically, breaking the traditional $f(x)$ function rule. *(an example of this can be seen in the figure below)* To visualize this, think of many small rectangles parallel to the y axis filling in the region, is there anywhere where the top an bottom of a rectangle touches the *same function?* If so you may need to use horizontal integration *(or the other way around!)*. - If you are finding the **area between two functions that are in terms of y** always subtract the right function from the left function so you get a positive distance. - Just like with regular integration you must evaluate a *separate* integral for every pair of intersections. This is because when the two functions intersect the one that is larger than the other switches and thus $f(x)$ and $g(x)$ also switch. $\int_c^d\Big[f(y)-g(y)\Big]dy\longrightarrow\int_c^df(y)dy\space-\int_c^dg(y)dy$ $\small\color{grey}\text{on bounds }[c.d]\space f(x)\text{ must always be larger than }g(y)$ >[!danger] >**- If you are using horizontal integration, that is integrating with respect to y, the bounds of that integral must be y values, not x values.** >[!quote] >##### *Horizontally enclosed area* >![[Integrationverticalarea.png|850]] ##### *The area above a function* - Sometimes you might need to find the area **above a function up to certain y value.** To get the area between the function and this upper bound, just take the integral of **the bound minus the function**. *Put parenthesis around your function to distribute the minus sign.* - By modifying your integrand in this way you are essentially modifying the function so that the area underneath it **is equal to the area that used to be above it, up to the specified bound**. $\text{Area above a function: }\int_a^b\Big(c-f(x)\Big)dx\space\space {\color{grey}\small (c\text{ is the y value of the upper bound)}}$ >[!quote] >##### *Visualization of area above/below function* >- The area below the function **on the right** is equal to the area above the function on the left, bounded by $y=3$, shown by the blue line. The functions are: $y=0.1x^2+1$ on the left and $y=3-(0.1x^2+1)$ on the right. > > ![[2e7b86fcaebe57cbf5a95cd05f495c3f.gif|444]]![[2adb93364c773495a1f8960263f24a1f.gif|410]] --- ## Calculator >[!cite] > >--- > ><iframe src="https://www.wolframalpha.com/input/web-apps/calculus-course-assistant"width="850" height="1200"></iframe>