> For the complete documentation index, see [llms.txt](https://solomons-mathbook.gitbook.io/calculus-basics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solomons-mathbook.gitbook.io/calculus-basics/comment-394073989/comment-395370129.md).

# Calculate Integrals

## `Calculate Indefinite Integrals`

### Example

![image](https://user-images.githubusercontent.com/14041622/41094016-5f50cdb8-6a7f-11e8-9375-d21ffed56e2f.png) Solve: ![image](https://user-images.githubusercontent.com/14041622/41094031-6b987d6e-6a7f-11e8-8d38-b4fe86eb7d8e.png)

## Integration using completing the square

![image](https://user-images.githubusercontent.com/14041622/42393904-be29c282-818a-11e8-92e7-eb5b467c775d.png)

### Example

![image](https://user-images.githubusercontent.com/14041622/42393897-b88701aa-818a-11e8-9fd3-afb70954b9bb.png) Solve:

* Rewrite it to this form:

  ![image](https://user-images.githubusercontent.com/14041622/42393935-e08f0134-818a-11e8-9737-a9df35dd931c.png)
* Use the special arctan rule to solve it, and get:

  ![image](https://user-images.githubusercontent.com/14041622/42393986-1ec12590-818b-11e8-978e-92d51567edac.png)

### Example

![image](https://user-images.githubusercontent.com/14041622/42394154-b283fd16-818b-11e8-8e43-9aae620c70c8.png) Solve: Solve:

* Rewrite it to this form:

  ![image](https://user-images.githubusercontent.com/14041622/42394242-0731f8cc-818c-11e8-88da-560f1e7960df.png)
* Use the special arctan rule to solve it, and get:

  ![image](https://user-images.githubusercontent.com/14041622/42394255-13e855f2-818c-11e8-8628-fc82f0677f78.png)

## `Calculate Definite Integrals`

### Example

![image](https://user-images.githubusercontent.com/14041622/41094257-403e9ff8-6a80-11e8-8176-c1dc057215e6.png) Solve: Don't get confused when you see the Upper boundary is smaller than the Lower one.

![image](https://user-images.githubusercontent.com/14041622/41094263-4493ee8c-6a80-11e8-8bcd-54ba5f991181.png)

### Example (piecewise integration)

![image](https://user-images.githubusercontent.com/14041622/41095081-ecd55c96-6a82-11e8-8315-45a3964a4bdd.png) Solve: The key is to seperate the intervals and integrate them piece by piece. ![image](https://user-images.githubusercontent.com/14041622/41095104-f9dce378-6a82-11e8-9351-aa781b7c1691.png)

### Example (Absolute value)

![image](https://user-images.githubusercontent.com/14041622/41144944-1f795f68-6b31-11e8-91bd-d523a212aee1.png) Solve:

* Splitting up the absolute value, and notice that the absolute value function is a piecewise function. Here we have that:

  ![image](https://user-images.githubusercontent.com/14041622/41144986-3af5a418-6b31-11e8-9a78-8fa06f63be0c.png)
* Splitting up the definite integral:

  ![image](https://user-images.githubusercontent.com/14041622/41145002-4606b770-6b31-11e8-8606-f3acaa3737ba.png)
* Evaluating each piece:

  ![image](https://user-images.githubusercontent.com/14041622/41145022-52bc83be-6b31-11e8-90bf-b63619f87bd1.png)

  ![image](https://user-images.githubusercontent.com/14041622/41145039-5c9f24d6-6b31-11e8-9f00-1549373580a0.png)
* Answer is 20.
