\frac{d}{dx}[sin^{-1}(x)] = \frac{1}{cos(sin^{-1}(x))} \end{aligned} $$
#### $\frac{d}{dx} [tan^{-1}(x)] = \frac{1}{\sqrt{x^2+1}}$
$$ \begin{aligned} f(x) = tan(x)\\ f'(x) = sec^2(x)\\ sec^2(x) = \frac{1}{cos^2(x)}\\ f^{-1}(x) = tan^{-1}(x)\\ (f^{-1})'(x) = \frac{1}{f'(f^{-1}(x))}\\ \frac{d}{dx}[tan^{-1}(x)] = \frac{1}{sec^2(tan^{-1}(x))}\\ = cos^2(tan^{-1}(x)) \end{aligned} $$
#### Results I feel like his diagram is really useful here as well b/c it shows how you do (cos(tan^-1(x))) by drawing out the triangle:
![[attachments/Integration-by-Parts-cSNm.png]]
so b/c of [[Fundamental theorem of calculus]],
$$ \begin{aligned} \int \frac{1}{\sqrt{1-x^2}} dx = sin^{-1}(x) + C\\ \int \frac{1}{x^2+1} dx = tan^{-1}(x) + C \end{aligned} $$
### Combined with [[u-substitution]]
To make these work, you need to remember how to find [[perfect square]] trinomials.
#### $\int \frac{1}{x^2+4x+8}dx$
$$ \begin{aligned} &\int \frac{1}{x^2+4x+8}dx\\ &\int \frac{1}{(x^2+4x+4)+4} dx &\text{"borrow 4 from 8 to make 'perfect square'}\\ &\int \frac{1}{(x+2)^2 + 4} dx\\ &\frac{1}{4} \int \frac{1}{ \frac{(x+2)^2}{4} + 1} dx\\ &\frac{1}{4} \int \frac{1}{ (\frac{x+2}{2})^2 + 1} dx\\ u &= \frac{x+2}{2}\\ du &= \frac{1}{2}dx\\ &\frac{1}{2} \int \frac{1}{u^2+1} du &\text{move 1/2 from the outside into the du}\\ &\frac{1}{2}tan^{-1}(u) + C\\ &\frac{1}{2}tan^{-1}(\frac{x+2}{2}) + C \end{aligned} $$
#### $\int \frac{1}{\sqrt{4-2x-x^2}} dx$
$$ \begin{aligned} &\int \frac{1}{\sqrt{4-2x-x^2}} dx \\ &\int \frac{1}{\sqrt{5-(x^2+2x+1)}} dx\\ &\int \frac{1}{\sqrt{5-(x+1)^2}} dx\\ &\int \frac{1}{\sqrt{5(1-\frac{(x+1)^2}{5})}} dx\\ &\int \frac{1}{\sqrt{5} \sqrt{1-(\frac{x+1}{\sqrt{5}})^2}} dx\\ u &= \frac{x+1}{\sqrt{5}}\\ du &= \frac{1}{\sqrt{5}} dx\\ &\int \frac{1}{\sqrt{1-u^2}} du\\ &sin^{-1}(u) + C\\ &sin^{-1}(\frac{x+1}{\sqrt{5}}) + C \end{aligned} $$
## Lecture 5.2 - Integrals for Ratios and Roots of Polynomials
- [x] DONE
Completed: 2022-04-30 https://youtu.be/f0nOtdRz-0Q
### Example
#### $\int \frac{x^3+1}{x^2+4}dx$ When we see a higher polynomial on the numerator, we have to "carry out the division".
$$ \begin{aligned} \int \frac{x^3+1}{x^2+4}dx = \int x+\frac{-4x+1}{x^2+4} \end{aligned} $$
More on dividing polynomials: https://www.khanacademy.org/math/algebra-home/alg-polynomials/alg-long-division-of-polynomials/v/dividing-polynomials-1
$$ \begin{aligned} \int \frac{x^3+1}{x^2+4}dx\\ \int x+\frac{-4x+1}{x^2+4}\\ \int x dx + -\int \frac{4x}{x^2+4} + \int \frac{1}{x^2+4}\\ \int x dx = \frac{1}{2}x^2\\ \\ -\int \frac{4x}{x^2+4}\\ u= x^2+4\\ du = 2x\\ -\int \frac{1}{u} \cdot 2du\\ -2 ln|u|\\ \\ \int \frac{1}{x^2+4}\\ \frac{1}{4} \int \frac{1}{(\frac{x}{2})^2+1}\\ u = \frac{x}{2}\\ du = \frac{1}{2} dx\\ \frac{1}{2} \int \frac{1}{(u)^2+1} du\\ tan^{-1}(u) \cdot 0.5 + C \end{aligned} $$
#### $\int \frac{2x-1}{\sqrt{1-9x^2}}dx$
$$ \begin{aligned} \int \frac{2x-1}{\sqrt{1-9x^2}}dx\\ \int \frac{2x-1}{\sqrt{1-(3x)^2}}dx\\ u = 3x\\ du = 3dx\\ \frac{1}{3} \frac{\frac{2}{3}u-1}{\sqrt{1-u^2}} du\\ \text{break it up}\\ \frac{2}{9} \frac{u}{\sqrt{1-u^2}} - \frac{1}{3} \frac{1}{\sqrt{1-u^2}} du\\ \text{second half.. } -\frac{1}{3}sin^{-1}(3x) + C\\ v = 1-u^2\\ dv = -2u du\\ -\frac{1}{9} \int v^{-.5} dv\\ -\frac{2}{9} v^{.5} \\ \text{so..} -\frac{2}{9} \sqrt{(1-u^2)} - \frac{1}{3}sin^{-1}(3x) + C\\ -\frac{2}{9} \sqrt{(1-(3x)^2)} - \frac{1}{3}sin^{-1}(3x) + C \end{aligned} $$
## Lecture 5.3 - Integration by Parts (integrating products of functions)
- [x] DONE
Completed: 2022-04-30 https://youtu.be/cs85W4e52js
"integral equivalent of the chain rule" chain rule: $[u(x)v(x)]' = u(x)v'(x) + u'(x)v(x)$ adding [[Fundamental theorem of calculus]], $u(x)v(x) = \int u(x)v'(x) dx + \int u'(x)v(x) dx$
Then you can solve for one of the integrals.
$$ \begin{aligned} \int u(x)v'(x) dx = u(x)v(x) - \int u'(x)v(x) dx \end{aligned} $$
Often abbreviated $\int u dv = uv - \int v du$.
We use this technique when there are products within the functions and one of the two parts gets simpler when you integrate.
### Example
#### $\int x \cos(x) dx$ $$ \begin{aligned} \int x \cos(x) dx\\ u = x\\ du = dx\\ dv = \cos(x) dx\\ v = \sin(x)\\ \int u dv = uv-\int vdu\\ = x \sin(x) - \int sin(x) dx\\ = x \sin(x) ~~ \cos(x) ~~ C \end{aligned} $$
#### $\int(3x+4)e^{-x} dx$ $$ \begin{aligned} \int(3x+4)e^{-x} dx\\ u = 3x+4\\ du = 3 dx\\ v = -e^{-x}\\ dv = e^{-x} dx\\ -(3x+4) \cdot e^{-x} - \int -e^{-x} \cdot 3 dx\\ -(3x+4) \cdot e^{-x} ~~ 3e^{-x} ~~ C\\ -3xe^{-x}-7e^{-x} + C \end{aligned} $$
## Lecture 5.4 - Integration by Parts (integrating functions that are more easily differentiated)
- [x] DONE
Completed: 2022-04-30 https://youtu.be/tECn1k_1IBw
### Examples
#### $\int \ln (x) dx$ We know the derivative of $ln$, but not the integral of it. So we let $ln(x)$ as u.
$$ \begin{aligned} \int \ln(x) dx\\ u = \ln(x)\\ du = \frac{1}{x}dx\\ v = x\\ dv = dx\\ \ln(x) \cdot x - \int x \frac{1}{x} dx = \ln(x) \cdot x - \int 1 dx\\ x \cdot \ln(x) - x + C \end{aligned} $$
#### $\int tan^{-1}(x) dx$ $$ \begin{aligned} \int tan^{-1}(x) dx\\ u = tan^{-1}(x)\\ du = \frac{1}{x^2+1} dx\\ v = x\\ dv = dx\\ x \tan^{-1}(x) - \int \frac{x}{x^2+1}\\ \text{now, redefining u / du}\\ u = x^2+1\\ du = 2x dx\\ \frac{1}{2} \int \frac{du}{u}\\ \text{...}\\ x tan^{-1}(x) - \frac{1}{2} \ln(x^2+1) + C \end{aligned} $$
##### I'm not clear why step 10 worked.
- [x] DONE
Completed: 2022-05-04 du/u is natural log. du isn't a number Why is $\int \frac{du}{u} = ln(u)$ ? I would have guessed it was $du \cdot \frac{1}{u}$ or something else?
* DONE Lecture 5.5 - Integration by Parts for Definite Integrals
Completed: 2022-05-01 https://youtu.be/tPW3XpV-5rgthh
### [#B] Don't quite understand where I went wrong here
- [x] DONE
Completed: 2022-05-11 $$ \begin{aligned} \int_{0}^{\frac{\pi}{6}} x^2 cos(x) dx\\ u = x^2\\ du = 2x dx\\ v = sin(x)\\ dv = cos(x) dx\\ x^2sin(x)|_0^{\frac{\pi}{6}} - \int sin(x) 2x dx\\ x^2sin(x)|_0^{\frac{\pi}{6}} - x^2cos(x)|_0^{\frac{\pi}{6}}\\ (\frac{\pi}{6})^2 sin(\frac{\pi}{6}) - sin(0) - (\frac{\pi}{6})^2 cos(\frac{\pi}{6}) - cos(0)\\ = -1.10035 \end{aligned} $$
Teacher's answer was $\frac{\pi^2}{72}+\frac{\sqrt{3}}{6}\pi-1 = .043978$
Alright, so the answer was when I get $\int sin(x)2x dx$, I need to do uv substitution again.
## Homework
### 6.1 43-52, 61-78
#### 43 $\int \frac{7}{x^2+7}dx$
- [x] DONE
Completed: 2022-05-01 $$ \begin{aligned} &\int \frac{7}{x^2+7}dx\\ &\frac{1}{7} \int \frac{1}{\frac{x^2}{7}+1}dx\\ &\frac{1}{7} \int \frac{1}{(\frac{x}{\sqrt{7}})^2+1}dx\\ u &= \frac{x}{\sqrt{7}}\\ du &= \frac{1}{\sqrt{7}}dx\\ &\frac{1}{\sqrt{7}} \int \frac{1}{u^2+1}du\\ &\frac{1}{\sqrt{7}} \tan^{-1}(u) + C\\ &\frac{1}{\sqrt{7}} \tan^{-1}(\frac{x}{\sqrt{7}}) + C\\ \end{aligned} $$
#### 47 $\int \frac{5}{\sqrt{x^4-16x^2}} dx$ $$ \begin{aligned} \int \frac{5}{\sqrt{x^4-16x^2}} dx \end{aligned} $$
I need to remove x^2 from the denominator there. Not entirely sure how to do it in a way that balances out.
#### 50 $$ \begin{aligned} \int \frac{2}{\sqrt{-x^2+6x+7}}dx \end{aligned} $$
#### 53 validate $$ \begin{aligned} &\int \frac{x^2}{(x^3+3)^2}dx\\ u &= x^3+3\\ du &= 3x^2dx\\ &\int \frac{\frac{1}{3}du}{u^2}\\ &\frac{1}{3} \int \frac{du}{u^2}\\ &\frac{1}{3} 3u^3 &\text{1/3rd of inverse u$^2$}\\ &u^3 \end{aligned} $$
#### 62 blocked
- [x] DONE
Completed: 2022-05-04 $$ \begin{aligned} \int &\frac{2x+7}{x^2+7x+3}dx\\ u &= x^2+7x+3\\ du &= 2x+7\\ \end{aligned} $$
##### Q: Why does `du` disappear when integrating?
- [x] DONE
Completed: 2022-05-04
It's not really a number, it's just an indicator that we're integration little parts.
Got info on the dx/dy syntax and what it means.
given f(x), we want to find the derivative (slope of tangent) at point x. Nearby point x+h will be f(x+h).
Difference is the slope.
f(x+h)-f(x) (rise) / (x+h) -x (run).
so f'(x) = lim h->0, f(x+h)-f(x) / (x+h) - x
simplified:
(f(x+x) - f(x)) / h
![[attachments/Integration-by-Parts-chUA.png]]
#### 66 $$ \begin{aligned} \int \frac{2}{4x^2+1}dx \end{aligned} $$
#### 72 $$ \begin{aligned} \int \frac{x^3}{x^2+9}dx \end{aligned} $$
#### 74 $$ \begin{aligned} \int \frac{sin(x)}{cos^2(x)+1}dx \end{aligned} $$
### 6.2 5-49
#### 5 $\int x \sin x dx$ $$ \begin{aligned} &\int x \sin x dx\\ u &= x\\ du &= dx\\ v &= cos(x)\\ dv &= sin(x) dx\\ &= uv - \int vdu\\ &= x \cdot cos(x) - \int cos(x)dx\\ &= x \cdot cos(x) - sin(x) \end{aligned} $$
#### 10 $\int x^3e^x dx$ $$ \begin{aligned} \int x^3e^x dx\\ u &= x^3\\ du &= 3x^2\\ v &= e^x\\ dv &= e^x\\ x^3 e^x - \int e^x 3x^2\\ x^3 e^x - e^x 3x^2 \end{aligned} $$
#### 17 $\int sin^{-1}(x) dx$
#### 30 $\int x \sqrt{x-2}dx$
$$ \begin{aligned} &\text{6.2, number 30}\\ &\int x \sqrt{x-2}dx\\ u &= x\\ du &= dx\\ v &= \frac{2}{3}(x-2)^{\frac{3}{2}}\\ dv &= (x-2)^{.5}dx\\ &= x \cdot \frac{2}{3}(x-2)^{\frac{3}{2}} - \int \frac{2}{3}(x-2)^{\frac{3}{2}} dx\\ &= x \cdot \frac{2}{3}(x-2)^{\frac{3}{2}} - (x-2)^{.5} + C \end{aligned} $$
#### 36 $\int e^{2x}cos(e^x) dx$
#### 39 $\int e^{\sqrt{x}} dx$
#### 42 $\int_{-1}^1 xe^{-x}dx$
#### 46 $\int_0^1x^3e^xdx$
## Quizes
### Quiz 1
#### 1
$\int_1^4 5xe^{x^2} dx$ turns into $\int_A^B Ce^u du$. What are A B & C?
#### 2 value of $\int_0^{0.6} \frac{1}{x^2+4} dx$?
$$ \begin{aligned} \int_0^{0.6} \frac{1}{x^2+4} dx\\ \frac{1}{4} \int_0^{0.6} \frac{1}{(\frac{x}{2})^2+1} dx\\ u = \frac{x}{2} du = \frac{1}{2} dx \frac{1}{4} \tan^{-1}(u)|_0^{0.6}\\ \frac{1}{4} (\tan^{-1}(0.6) - \tan^{-1}(0))
\end{aligned} $$ u = (1/2 x) du = 1/2 dx 1/4 tan^{-1}(x) 1/4 tan^{-1}(x/2)
#### 3
No clue. guessing. $$ \begin{aligned} \int sin^3(x) cos^2(x) dx\\ u = cos(x) \end{aligned} $$
#### 4 $$ \begin{aligned} (u+2)(u+2) = u^2 4u 2u ~~ 4x ~~ 8 + 3 \end{aligned} $$
#### 5
$$ \begin{aligned} \int_0^{\frac{\pi}{3}} x cos(2x) dx u = x du = dx v = sin(2x) \cdot 2 dv = cos(2x) dx
u \cdot v - \int vdu
2x \cdot sin(2x) - \int sin(2x) \cdot 2 dx 2x \cdot sin(2x) + cos(2x)
\end{aligned} $$
### Quiz 2
#### 1 $$ \begin{aligned} &\int_1^4 3 \sqrt{x}e^{\sqrt{x}}dx\\ u &= \sqrt{x}\\ du &= \frac{2}{3}x^{\frac{3}{2}} dx\\ &\int_1^4 3ue^{u}dx\\ &\frac{3}{2}u^2 e^u + C|_1^4 \end{aligned} $$
#### 2 exact value of: $$ \begin{aligned} \int_0^{0.6} \frac{1}{x^2+4}dx\\ 4 \int_0^{0.6} \frac{1}{(\frac{x}{2})^2+1}dx\\ u &= \frac{x}{2}\\ 4 tan^{-1}(u)|_0^{0.6}\\ 4 tan^{-1}(0.6/2) \end{aligned} $$ So I don't pull the 4 out. I think it's 1/4
#### 3 - I don't understand what to do with the du here.
- [x] DONE
Completed: 2022-05-16 Don't need du & dx. du takes over dx. $$ \begin{aligned} &\int \sin^2(x) \cos^3(x) dx\\ &\int \sin^2(x) \cdot (1-sin^2) \cdot \cos(x) dx\\ u &= sin(x)\\ du &= -cos(x) dx\\ \int u^2 \cdot -du^3 dx \end{aligned} $$
![[attachments/Integration-by-Parts-MTos.png]]
#### 4
$$ \begin{aligned} \int \frac{x^2+4x+3}{x-2} dx\\ u &= x - 2\\ du &= \frac{1}{2}x^2\\ \int \frac{2u+(4u+4 \cdot 2)+3}{u}\\ \int \frac{6u+15}{u}\\ \int 6u+15 \cdot \frac{1}{u}\\ &= 3u^2 \cdot \ln|u| + C\\ &= 3(x-2)^2 \cdot \ln|x-2| +C \end{aligned} $$
### Quiz 3/4
#### 1. Consider the integral $\int_1^2 4x^3 cos(x^2) dx$ w/ $u=x^2$, it becomes $\int_A^B Cu^D cos(u) du$. What is a/b/c/d?
a=1 b=4 (b/c we need to account for previous squaring C = 4 (constant) D = 3/2 (1 + 1/2 of x^2)
--
Seems like this wasn't quite right. Instead, when u=x^2, du = 2x, which means the 4x^3 would be udu. This means the C constant would be 2, not 4. This also means that D would be 1, not 1.5.
#### 2
Find the exact value $$ \begin{aligned} \int_0^{0.6} \frac{1}{x^2+4}dx\\ \frac{1}{4} \int_0^{0.6} \frac{1}{\frac{x^2}{4}+1}dx\\ \frac{1}{4} \int_0^{0.6} \frac{1}{(\frac{x}{2})^2+1}dx\\ u&=\frac{x}{2}\\ du &= 2dx\\ \frac{1}{2} \int_0^{0.3} \frac{1}{(u)^2+1} du\\ \frac{1}{2} tan^{-1}(u)|_0^{0.6}\\ \frac{1}{2} tan^{-1}(\frac{x}{2})|_0^{0.6}\\ \frac{1}{2} tan^{-1}(0.3) \end{aligned} $$
I think going to 0.3 is because x went from x/2 to just u, so divide the B value.
#### 3
Find $\int sin^5(x) dx$ where $u=cos(x)$.
$$ \begin{aligned} \int sin^5(x)dx\\ \int (1-cos^2(x))^2 \cdot sin(x)dx\\ u=cos(x)\\ du = sin(x)\\ \int (1-u^2)^2 du \end{aligned} $$
u = cos(x) means du = -sin(x), so the final value should be $-\int (1-u^2)^2 du$.
#### 4 $$ \begin{aligned} \int \frac{x^2+4x+3}{x-2}dx\\ u = x-2\\ du = dx\\ \int \frac{x^2+4x+3}{u} du \end{aligned} $$ ... unsure?
Need to do [[division by polynomials]]
#### 5 $$ \begin{aligned} &\int_0^{\frac{\pi}{3}} x cos(2x) dx\\ u &= x\\ du &= dx\\ v &= \frac{1}{2} sin(2x)\\ dv &= cos(2x) dx\\ &\frac{x}{2}sin(2x)|_0^{\frac{\pi}{3}} - \int_0^{\frac{\pi}{3}} \frac{1}{2} sin(2x) dx\\ &\frac{x}{2}sin(2x)|_0^{\frac{\pi}{3}} - cos(2x)|_0^{\frac{\pi}{3}}\\ &(\frac{\pi}{6} sin(2\pi) - sin(\frac{\pi}{3})) - (cos(\frac{2\pi}{3}) - cos(0))\\ \end{aligned} $$
Next to last line should have been $$ \begin{aligned} &\frac{x}{2}sin(2x)|_0^{\frac{\pi}{3}} + \frac{1}{4}cos(2x)|_0^{\frac{\pi}{3}}\\ &(\frac{\pi}{6} sin(2\pi) - sin(\frac{\pi}{3})) - (\frac{1}{4}cos(\frac{2\pi}{3}) + \frac{1}{4}cos(0))\\ \end{aligned} $$