# CSE 1200 Calculus — Complete Summary

---

## Lecture 1: Limits, Continuity, L'Hopital's Rule

### Key Concepts
- **Indeterminate form 0/0**: direct substitution gives $0/0$; the limit may still exist
- **L'Hopital's Rule**: if $\lim \frac{f(x)}{g(x)} = \frac{0}{0}$ or $\frac{\pm\infty}{\pm\infty}$, then:
$$\lim \frac{f(x)}{g(x)} = \lim \frac{f'(x)}{g'(x)}$$
  provided the right-hand limit exists. Can be applied repeatedly.
- **Continuity**: $f$ is continuous at $a$ if $\lim_{x \to a} f(x) = f(a)$

### Method: Evaluate a 0/0 Limit
1. **Factor and cancel**: factor numerator and denominator, cancel common $(x - a)$ factors
2. **Conjugate multiplication**: for $\sqrt{\cdot}$ expressions, multiply by conjugate: $(\sqrt{A} - \sqrt{B})(\sqrt{A} + \sqrt{B}) = A - B$
3. **L'Hopital's Rule**: differentiate top and bottom separately (NOT the quotient rule)
4. **Substitution**: let $u = x - a$ to center the limit at $0$

---

## Lecture 2: Indeterminate Forms, Squeeze Theorem, Limits at Infinity

### Key Concepts
- **Indeterminate powers** ($1^\infty$, $0^0$, $\infty^0$): arise with $[f(x)]^{g(x)}$
- **Squeeze Theorem**: if $g(x) \leq f(x) \leq h(x)$ and $\lim g = \lim h = L$, then $\lim f = L$
- Useful when the expression contains bounded oscillating terms like $\sin(x)$ or $e^{\sin(x)}$
- **Bounds to know**: $-1 \leq \sin(x) \leq 1$, $e^{-1} \leq e^{\sin(x)} \leq e$

### Method: Evaluate $f(x)^{g(x)}$ (Exponential Rewrite)
1. Write $f(x)^{g(x)} = e^{g(x) \ln(f(x))}$
2. The limit becomes $e^{\lim g(x) \ln(f(x))}$
3. Rewrite $g(x) \ln(f(x))$ as $\frac{\ln(f(x))}{1/g(x)}$ to get $\frac{0}{0}$ or $\frac{\infty}{\infty}$
4. Apply L'Hopital on the exponent
5. **Special pattern**: $\lim_{u \to 0}(1+u)^{1/u} = e$

### Method: Limits at Infinity
1. **Divide by dominant term**: for rational-like functions, divide numerator and denominator by $x^n$
2. **Conjugate trick**: for $\sqrt{x^2 + ax} - x$, multiply by conjugate $\to \frac{ax}{\sqrt{x^2+ax}+x} \to \frac{a}{2}$
3. **Squeeze**: bound oscillating parts, show the bounds converge to the same limit

### WARNING
- L'Hopital can fail: $\lim \frac{x}{x + \sin x}$ gives $\frac{1}{1+\cos x}$ which does not exist. Instead divide by $x$: $\frac{1}{1 + \sin(x)/x} \to 1$

---

## Lecture 3: Asymptotes, Inverse Functions, Inverse Trig

### Key Concepts — Asymptotes
- **Vertical asymptote** $x = a$: $\lim_{x \to a} f(x) = \pm\infty$ (denominator zero, numerator nonzero)
- **Horizontal asymptote** $y = L$: $\lim_{x \to \pm\infty} f(x) = L$
- **Oblique asymptote** $y = ax + b$: when no horizontal asymptote exists
  - $a = \lim_{x \to \pm\infty} \frac{f(x)}{x}$, then $b = \lim_{x \to \pm\infty} (f(x) - ax)$

### WARNING
- If the limit at a candidate vertical asymptote is **finite**, it is a **removable singularity**, not an asymptote
- Check $x \to +\infty$ and $x \to -\infty$ separately — they can give different asymptotes

### Key Concepts — Inverse Functions
- **Swap and solve**: write $y = f(x)$, swap $x$ and $y$, solve for $y$ to get $f^{-1}(x)$
- For quadratics: use the quadratic formula after swapping; choose the correct $\pm$ sign based on the restricted domain
- **Domain of $f^{-1}$** = range of $f$

### Key Concepts — Inverse Trig Simplification
- **Triangle method**: for $\tan(\arcsin(x))$, draw a right triangle where $\sin(\theta) = x$, read off $\tan(\theta)$
- **Double angle**: $\cos(2\arcsin(x)) = 1 - 2x^2$
- **Range restrictions**: $\arccos(\cos(\theta)) = \theta$ only if $\theta \in [0, \pi]$; $\arctan(\tan(\theta)) = \theta$ only if $\theta \in (-\pi/2, \pi/2)$

---

## Lecture 4: Linearization / Linear Approximation

### Key Concepts
- **Linearization** of $f$ at $x = a$:
$$L(x) = f(a) + f'(a)(x - a)$$
- **Multivariable**: $L(x,y) = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$
- **From power series**: if $g(x) = \sum c_n(x-a)^n$, then $L(x) = c_0 + c_1(x-a)$
- **Error estimation** (differentials): $|\Delta f| \approx |f'(a)| \cdot |\Delta x|$

### Common Approximations Near $x = 0$
| Function | Approximation |
|---|---|
| $\sin(x)$ | $\approx x$ |
| $\cos(x)$ | $\approx 1$ |
| $e^x$ | $\approx 1 + x$ |
| $\ln(1+x)$ | $\approx x$ |
| $(1+x)^n$ | $\approx 1 + nx$ |

---

## Lecture 5: Implicit Differentiation, Mean Value Theorem, Newton-Raphson

### Key Concepts — Implicit Differentiation
- Given an implicit equation $F(x,y) = 0$, find $\frac{dy}{dx}$ by differentiating both sides w.r.t. $x$, treating $y$ as $y(x)$
- Chain rule: $\frac{d}{dx}[f(y)] = f'(y) \cdot \frac{dy}{dx}$

### Method: Implicit Differentiation
1. Differentiate both sides with respect to $x$ (apply chain rule to $y$-terms)
2. Collect all $\frac{dy}{dx}$ terms on one side
3. Factor out $\frac{dy}{dx}$ and isolate
- **Horizontal tangent**: set numerator of $\frac{dy}{dx} = 0$ (denominator $\neq 0$)
- **Vertical tangent**: set denominator of $\frac{dy}{dx} = 0$ (numerator $\neq 0$)

### Mean Value Theorem
If $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$, then there exists $c \in (a,b)$ such that:
$$f'(c) = \frac{f(b) - f(a)}{b - a}$$
- Geometrically: there is a point where the tangent line is parallel to the secant line
- **Word problems**: average velocity = instantaneous velocity at some point

### Method: Newton-Raphson
- Iterative root-finding formula: $x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}$
- **Graphical**: draw tangent at $(x_n, f(x_n))$; where it crosses the $x$-axis $= x_{n+1}$
- To sketch: choose $f(x)$ such that root = desired value (e.g., for $\sqrt[3]{6}$: $f(x) = x^3 - 6$), pick $x_0$ nearby, draw successive tangent lines converging to the root

---

## Lecture 6: Extreme Values on Closed Interval (Single Variable)

### Method: Find Absolute Max/Min on $[a,b]$
1. Find critical points: solve $f'(x) = 0$ and find where $f'(x)$ is undefined, within $(a,b)$
2. Evaluate $f$ at all critical points and at the endpoints $x = a$ and $x = b$
3. Compare: largest value = absolute max, smallest = absolute min

---

## Lecture 7: Integration Techniques (Substitution, By Parts)

### Key Concepts
- **U-substitution**: identify inner function $u = g(x)$ such that $g'(x)$ appears in the integrand; replace $dx = du/g'(x)$
- **Integration by parts**: $\int u\, dv = uv - \int v\, du$
- **LIATE rule** for choosing $u$: **L**ogarithmic, **I**nverse trig, **A**lgebraic, **T**rigonometric, **E**xponential (pick $u$ from the left, $dv$ from the right)
- **Reduction formulas**: express $I_n$ in terms of $I_{n-1}$ by applying IBP once
- **Combined techniques**: sometimes substitute first to simplify, then apply IBP

---

## Lecture 8: Applications of Integration (Area, Symmetry, FTC)

### Symmetry in Definite Integrals
- **Odd function** ($f(-x) = -f(x)$): $\int_{-a}^{a} f(x)\,dx = 0$
- **Even function** ($f(-x) = f(x)$): $\int_{-a}^{a} f(x)\,dx = 2\int_0^a f(x)\,dx$
- **Products**: odd $\times$ odd $=$ even, odd $\times$ even $=$ odd, even $\times$ even $=$ even

### Method: Area Between Curves
1. Find intersection points: set $f(x) = g(x)$ and solve for $x$
2. Determine which function is on top on each sub-interval
3. Integrate: $A = \int_a^b |f(x) - g(x)|\,dx$
4. If curves cross, split into sub-intervals and sum the areas

### Fundamental Theorem of Calculus
- **FTC Part 1**: if $g(x) = \int_a^x f(t)\,dt$, then $g'(x) = f(x)$
- **Chain rule variant**: if $g(x) = \int_a^{h(x)} f(t)\,dt$, then $g'(x) = f(h(x)) \cdot h'(x)$
- Critical points of $g$: set $g'(x) = f(x) = 0$

---

## Lecture 9: Improper Integrals

### Key Concepts
- **Type 1** (infinite limits): $\int_a^\infty f(x)\,dx = \lim_{t \to \infty} \int_a^t f(x)\,dx$
- **Type 2** (singularity at $c$): split at $c$ and take limits from each side
- **p-test**:
  - $\int_1^\infty \frac{1}{x^p}\,dx$ converges $\iff p > 1$
  - $\int_0^1 \frac{1}{x^p}\,dx$ converges $\iff p < 1$
- **Comparison test**: if $|f(x)| \leq g(x)$ and $\int g$ converges, then $\int f$ converges absolutely

### Method: Evaluate an Improper Integral
1. Identify the type (infinite limit or singularity)
2. Replace the problematic bound with a limit variable
3. Evaluate the proper integral, then take the limit
4. Common techniques: substitution, IBP, comparison

### WARNING
- Check for singularities at **every** point where the integrand is undefined, not just the endpoints

---

## Lecture 10: Recursive Sequences (Monotonicity, Boundedness, Limit)

### Key Concepts
- Sequence defined by $a_0 = c$ and $a_{n+1} = f(a_n)$
- **Monotone Convergence Theorem**: a bounded monotone sequence converges

### Method: Prove Convergence and Find the Limit
1. **Prove monotonicity** (by induction): show $a_{n+1} \geq a_n$ (increasing) or $a_{n+1} \leq a_n$ (decreasing)
2. **Prove boundedness** (by induction): show $a_n \leq M$ (if increasing) or $a_n \geq m$ (if decreasing)
3. Apply the Monotone Convergence Theorem $\to$ the limit $L$ exists
4. **Find the limit**: assume $\lim a_n = L$, then $L = f(L)$. Solve the fixed-point equation
5. **Discard** solutions outside the range of the sequence

---

## Lecture 11: Series — Geometric, Telescoping, Convergence Basics

### Key Formulas
- **Geometric series**: $\sum_{n=0}^{\infty} r^n = \frac{1}{1-r}$ for $|r| < 1$
- **Differentiation trick**: $\sum n x^{n-1} = \frac{d}{dx}\left[\frac{1}{1-x}\right] = \frac{1}{(1-x)^2}$, so $\sum n r^n = \frac{r}{(1-r)^2}$
- **Telescoping**: decompose $a_n$ via partial fractions; consecutive terms cancel, leaving boundary terms

### Recognizing Known Series
| Series | Sum |
|---|---|
| $\sum \frac{x^n}{n!}$ | $e^x$ |
| $\sum (-1)^n \frac{x^{2n+1}}{2n+1}$ | $\arctan(x)$ |
| $\sum (-1)^n \frac{x^{2n+1}}{(2n+1)!}$ | $\sin(x)$ |
| $\sum (-1)^n \frac{x^{2n}}{(2n)!}$ | $\cos(x)$ |
| $\sum (-1)^{n+1} \frac{x^n}{n}$ | $\ln(1+x)$ |

### Key Reference Series
- **$p$-series**: $\sum \frac{1}{n^p}$ converges $\iff p > 1$
- **Geometric**: $\sum r^n$ converges $\iff |r| < 1$
- **Harmonic**: $\sum \frac{1}{n}$ diverges ($p = 1$)

---

## Lecture 12: Series Convergence / Divergence Tests

### Decision Tree
1. **Divergence Test FIRST**: if $\lim a_n \neq 0$, the series **diverges**. Done.
2. **Check absolute convergence** (test $\sum |a_n|$):
   - **Ratio test**: $\lim \left|\frac{a_{n+1}}{a_n}\right| < 1 \Rightarrow$ absolutely convergent. Best for factorials and exponentials.
   - **Root test**: $\lim |a_n|^{1/n} < 1 \Rightarrow$ absolutely convergent. Best for $n$-th powers.
   - **Comparison / Limit Comparison**: compare with known $p$-series or geometric series.
   - **Integral test**: $\sum f(n)$ converges $\iff \int_1^\infty f(x)\,dx$ converges (when $f$ is positive, continuous, decreasing).
3. **If $\sum |a_n|$ diverges**, check **conditional convergence**: use the **Alternating Series Test** ($b_n$ decreasing and $\lim b_n = 0$).

### Examples
- $\sum (-1)^n \frac{n}{\sqrt{n^2 - 3}}$: $\lim \frac{n}{\sqrt{n^2-3}} = 1 \neq 0$. **Diverges** by divergence test.
- $\sum (-1)^n n^2 e^{-n}$: ratio test on $|a_n| = n^2/e^n$ gives $\lim = 1/e < 1$. **Absolutely convergent**.
- $\sum \frac{1+\sin(n)}{n^2}$: since $0 \leq 1+\sin(n) \leq 2$, compare with $\frac{2}{n^2}$ (convergent $p$-series). **Converges**.

---

## Lecture 13: Power Series — Interval and Radius of Convergence

### Key Concepts
- A **power series** centered at $a$: $\sum c_n (x-a)^n$
- **Radius of convergence** $R$: the series converges for $|x - a| < R$ and diverges for $|x - a| > R$
- At $x = a \pm R$ (boundary): must check separately

### Method: Find Interval of Convergence
1. **Ratio test**: $L = \lim \left|\frac{c_{n+1}}{c_n}\right|$, then $R = \frac{1}{L}$. Works best for factorials, exponentials, products.
2. **Root test**: $L = \lim |c_n|^{1/n}$, then $R = \frac{1}{L}$. Best for $c_n = (\text{something})^n$.
3. **Non-standard forms**: if the series has $x^{2n}$ or $x^{3n+1}$, substitute $u = x^2$ or $u = x^3$, find $R$ for $u$, then convert back.
4. **Boundary check**: substitute $x = a + R$ and $x = a - R$ into the series, test each:
   - Alternating series test, $p$-series, comparison, limit comparison
5. **Write the interval**: e.g., $[a-R, a+R)$ if the left endpoint converges and the right diverges

---

## Lecture 14: Power Series Operations, Linearization from Series

### Key Identity
If $g(x) = \sum c_n (x - a)^n$, then:
$$g^{(k)}(a) = k! \cdot c_k$$

### Method: Compute $f^{(k)}(0)$ from a Power Series
1. Find the Taylor series of the inner function (e.g., $\arctan(x) = \sum (-1)^n \frac{x^{2n+1}}{2n+1}$)
2. Multiply by the polynomial factor (e.g., $x^2 \cdot \arctan(x) = \sum (-1)^n \frac{x^{2n+3}}{2n+1}$)
3. Find the coefficient $c_k$ of $x^k$
4. $f^{(k)}(0) = k! \cdot c_k$

### Linearization from Power Series
- If $g(x) = \sum c_n(x-a)^n$, the linearization at $x = a$ is simply $L(x) = c_0 + c_1(x-a)$
- This is just reading off the constant and linear terms from the series

---

## Lecture 15: Taylor Series, Error Bounds, Limits via Taylor

### Key Taylor/Maclaurin Expansions
| Function | Expansion |
|---|---|
| $e^x$ | $1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \ldots$ |
| $\sin(x)$ | $x - \frac{x^3}{3!} + \frac{x^5}{5!} - \ldots$ |
| $\cos(x)$ | $1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \ldots$ |
| $\ln(1+x)$ | $x - \frac{x^2}{2} + \frac{x^3}{3} - \ldots$ |
| $(1+x)^\alpha$ | $1 + \alpha x + \frac{\alpha(\alpha-1)}{2!}x^2 + \ldots$ |
| $\frac{1}{1-x}$ | $1 + x + x^2 + x^3 + \ldots$ |
| $\arctan(x)$ | $x - \frac{x^3}{3} + \frac{x^5}{5} - \ldots$ |

### Method: Taylor Series for Anti-Derivative + Error Bound
1. Start from a known series and substitute to get the series for $f(x)$
   - E.g., $f(x) = e^{x^2} \to \sum \frac{(x^2)^n}{n!} = \sum \frac{x^{2n}}{n!}$
2. **Integrate term by term**: $\int \sum c_n x^n\,dx = C + \sum \frac{c_n x^{n+1}}{n+1}$
3. For a definite integral: $\int_0^b f(x)\,dx = \sum \frac{c_n \cdot b^{n+1}}{n+1}$
4. **Error bound (alternating series)**: $|\text{error}| \leq |\text{first omitted term}|$
5. **Error bound (positive series)**: compare remainder with geometric tail or integral estimate
6. Sum terms until the error bound is met

### Method: Evaluate a Limit via Taylor Expansion
1. Expand functions in the expression to sufficient order to cancel the indeterminate form
2. Substitute the expansions, simplify, cancel common factors
3. Evaluate the limit

---

## Lecture 16: Multivariable Functions — Domains, Graphs, Contour Plots

### Method: Sketch Maximal Domain
1. **Identify restrictions**: $\sqrt{\cdot}$ requires argument $\geq 0$; $\ln(\cdot)$ requires argument $> 0$; denominators $\neq 0$
2. Solve each restriction as an inequality in $x$ and $y$
3. The domain is the **intersection** of all regions
4. Sketch: dashed lines for strict inequalities, solid for non-strict

### Method: Match Functions to Graphs / Contour Plots
1. **Check symmetry**: $f(x,y) = f(y,x)$ means symmetric about $y = x$; $f(-x,y) = -f(x,y)$ means odd in $x$
2. **Set one variable to zero**: examine $f(x,0)$ and $f(0,y)$ to identify cross-sections
3. **Level curves** $f = c$: identify shapes (lines, circles, hyperbolas)
4. **Check special points**: evaluate at origin, along axes, along $y = x$
5. **Identify type**: quadratic forms (paraboloids, saddles), products ($xy$ gives saddle), trig (periodic contours)

---

## Lecture 17: Partial Derivatives, Gradient Vector

### Key Concepts
- **Partial derivative** $f_x = \frac{\partial f}{\partial x}$: differentiate w.r.t. $x$, treat $y$ as constant
- **Gradient**: $\nabla f = \left(\frac{\partial f}{\partial x},\ \frac{\partial f}{\partial y}\right)$
- $\nabla f$ points in the direction of **steepest ascent**
- $|\nabla f|$ gives the **maximum rate of change**
- $\nabla f = \mathbf{0}$ at critical points
- **Chain rule for composites**: $\frac{\partial}{\partial x}[e^{xy}] = y e^{xy}$

### Method: Compute the Gradient
1. Compute $f_x = \frac{\partial f}{\partial x}$ (treat $y$ as constant)
2. Compute $f_y = \frac{\partial f}{\partial y}$ (treat $x$ as constant)
3. Evaluate at the given point $(a,b)$

---

## Lecture 18: Directional Derivative

### Key Concepts
- **Directional derivative**: $D_\mathbf{u} f = \nabla f \cdot \hat{\mathbf{u}}$ (rate of change of $f$ in direction $\mathbf{u}$)
- **Maximum rate of change**: $\max D_\mathbf{u} f = |\nabla f|$, in direction $\frac{\nabla f}{|\nabla f|}$
- **Minimum rate of change**: $\min D_\mathbf{u} f = -|\nabla f|$, in direction $-\frac{\nabla f}{|\nabla f|}$ (steepest descent)

### Method: Compute a Directional Derivative
1. Compute gradient: $\nabla f = (f_x, f_y)$
2. Evaluate at the given point
3. Normalize the direction: $\hat{\mathbf{u}} = \frac{\mathbf{u}}{|\mathbf{u}|}$
4. Dot product: $D_\mathbf{u} f = \nabla f \cdot \hat{\mathbf{u}}$

---

## Lecture 19: Critical Points, Second Derivative Test, Absolute Max/Min

### Method: Find and Classify Critical Points (Multivariable)
1. Compute $f_x$ and $f_y$
2. Solve $f_x = 0$ AND $f_y = 0$ simultaneously $\to$ critical points
3. Check which solutions lie inside the domain
4. Compute the **Hessian determinant** at each critical point:
$$D = f_{xx} f_{yy} - (f_{xy})^2$$
5. Classify:

| Condition | Classification |
|---|---|
| $D > 0$ and $f_{xx} > 0$ | Local minimum |
| $D > 0$ and $f_{xx} < 0$ | Local maximum |
| $D < 0$ | Saddle point |
| $D = 0$ | Inconclusive |

When $D = 0$: use other arguments (e.g., show $f$ values along different paths through the point differ).

### Extreme Value Theorem
If $f$ is continuous on a closed bounded domain $D$, then $f$ attains an absolute max and min on $D$. These occur at interior critical points or on the boundary.

### Method: Find Absolute Max/Min on a Closed Domain
1. **Interior**: find all critical points where $\nabla f = \mathbf{0}$ inside $D$; evaluate $f$ at each
2. **Boundary**: parametrize each boundary segment (edge, curve) $\to$ reduce to single-variable optimization
   - For a triangle with vertices $(1,1)$, $(2,1)$, $(2,2)$: three edges
   - Edge: fix one variable or write $y = g(x)$, find critical points of $f(x, g(x))$
3. **Corners/vertices**: evaluate $f$ at all corner points
4. **Compare**: largest value = absolute max, smallest = absolute min

Common domains: **rectangles** (4 edges), **triangles** (3 edges), **disks** (parametrize boundary with $x = r\cos\theta$, $y = r\sin\theta$)

---

## Lecture 20: Complex Numbers — Arithmetic, Polar Form

### Key Concepts
- **Complex number**: $z = a + bi$ where $i^2 = -1$
- **Modulus**: $|z| = \sqrt{a^2 + b^2}$
- **Conjugate**: $\bar{z} = a - bi$; note $z \cdot \bar{z} = |z|^2$
- **Polar form**: $z = r e^{i\theta}$ where $r = |z|$ and $\theta = \arg(z)$
- **Euler's formula**: $e^{i\theta} = \cos\theta + i\sin\theta$

### Operations
| Operation | Rule |
|---|---|
| Division | $\frac{a+bi}{c+di} = \frac{(a+bi)(c-di)}{c^2+d^2}$ (multiply by conjugate) |
| Powers | $z^n = r^n e^{in\theta}$ |
| Modulus of product | $\|z_1 z_2\| = \|z_1\| \|z_2\|$ |
| Argument of product | $\arg(z_1 z_2) = \arg(z_1) + \arg(z_2)$ |
| Conjugate properties | $\overline{z_1 + z_2} = \bar{z}_1 + \bar{z}_2$, $\overline{z_1 z_2} = \bar{z}_1 \bar{z}_2$ |

---

## Lecture 21: Complex Roots, Euler's Formula

### Method: Find All Roots of $z^n = c$
1. Convert $c$ to polar: $c = r e^{i\theta}$
2. Apply the root formula:
$$z_k = r^{1/n} \cdot e^{i(\theta + 2\pi k)/n}, \quad k = 0, 1, \ldots, n-1$$
3. Convert to $a + bi$: $z_k = r^{1/n}(\cos\phi_k + i\sin\phi_k)$ where $\phi_k = \frac{\theta + 2\pi k}{n}$
4. The $n$ roots are equally spaced on a circle of radius $r^{1/n}$, separated by angle $\frac{2\pi}{n}$
5. **For $(z-a)^n = c$**: solve $w^n = c$ first, then $z = w + a$

### Proof of Euler's Formula: $e^{i\theta} = \cos\theta + i\sin\theta$
1. Expand: $e^{i\theta} = \sum \frac{(i\theta)^n}{n!}$
2. Separate even and odd terms:
   - Even ($n = 2k$): $\sum (-1)^k \frac{\theta^{2k}}{(2k)!} = \cos\theta$
   - Odd ($n = 2k+1$): $i \sum (-1)^k \frac{\theta^{2k+1}}{(2k+1)!} = i\sin\theta$
3. Therefore $e^{i\theta} = \cos\theta + i\sin\theta$

### Deriving Trig Identities from Complex Exponentials
- From $e^{i(a+b)} = e^{ia} \cdot e^{ib}$: expand both sides, equate real and imaginary parts $\to$ angle addition formulas
- **Double angle**: use $(e^{ix})^2 = e^{2ix}$. Expand $(\cos x + i\sin x)^2 = \cos^2 x - \sin^2 x + 2i\sin x\cos x$. Real part: $\cos(2x) = \cos^2 x - \sin^2 x$

---

## Lectures 22–23: Double Integrals

### Key Concepts
- $\iint_D f(x,y)\,dA$: integral of $f$ over region $D$
- **Order of integration**: $\int\int dy\,dx$ vs $\int\int dx\,dy$ — choose whichever gives simpler limits

### Method: Evaluate a Double Integral
1. **Sketch the region**: draw boundary curves, find intersection points
2. **Choose integration order**: pick the order with simpler limits
   - If the integrand is hard to integrate in one variable (e.g., $\cos(x^2)$), try the other order
3. **Set up limits**:
   - For $dy\,dx$: $x$ goes from $a$ to $b$, $y$ goes from $g_1(x)$ to $g_2(x)$
   - For $dx\,dy$: $y$ goes from $c$ to $d$, $x$ goes from $h_1(y)$ to $h_2(y)$
4. **Split if needed**: if the boundary changes form, split into sub-regions
5. **Evaluate**: inner integral first (treat outer variable as constant), then outer integral

### Method: Interchange Order of Integration
1. Sketch the region from the original limits
2. Re-describe boundaries in the other variable
3. Rewrite the integral with the new limits

---

## Quick Reference: When to Use What

| Problem Type | Method |
|---|---|
| Limit with $0/0$ | Factor/cancel, conjugate, or L'Hopital |
| Limit with $1^\infty$, $0^0$, $\infty^0$ | Rewrite as $e^{g \ln f}$, L'Hopital on exponent |
| Limit at $\infty$ with oscillation | Squeeze theorem |
| Asymptotes | VA: denom $= 0$; HA: $\lim_{x\to\pm\infty}$; OA: $a = \lim f/x$, $b = \lim(f - ax)$ |
| Linearization | $L(x) = f(a) + f'(a)(x-a)$ |
| Implicit $dy/dx$ | Differentiate both sides, chain rule on $y$-terms, solve for $dy/dx$ |
| Extreme values (single var) | $f' = 0$ + endpoints, compare $f$-values |
| Integration | Substitution, IBP (LIATE), partial fractions |
| Odd/even symmetry | Odd on $[-a,a] \to 0$; even $\to 2\int_0^a$ |
| Improper integral | Replace $\infty$ with limit; split at singularities; $p$-test |
| Recursive sequence limit | Monotone + bounded $\to$ converges; solve $L = f(L)$ |
| Series convergence | Divergence test $\to$ ratio/root/comparison $\to$ alternating series test |
| Series sum | Geometric formula, differentiation trick, partial fractions/telescoping |
| Interval of convergence | Ratio/root test for $R$; check endpoints separately |
| $f^{(k)}(0)$ from series | Find $c_k$ in the Taylor series; $f^{(k)}(0) = k! \cdot c_k$ |
| Limit via Taylor | Expand to sufficient order, simplify, evaluate |
| Anti-derivative via series | Integrate term-by-term; alternating error $\leq$ first omitted term |
| Gradient | $\nabla f = (f_x, f_y)$ |
| Directional derivative | $D_\mathbf{u} f = \nabla f \cdot \hat{\mathbf{u}}$ |
| Critical points (multivariable) | Solve $\nabla f = 0$; classify with $D = f_{xx}f_{yy} - f_{xy}^2$ |
| Absolute max/min on domain | Interior critical pts + boundary edges + corners; compare all $f$-values |
| Double integral | Sketch region, choose order, set up limits, evaluate inside-out |
| Complex arithmetic | Conjugate for division; polar for powers |
| Complex roots $z^n = c$ | $z_k = r^{1/n} e^{i(\theta + 2\pi k)/n}$ |
| Euler's formula | Power series of $e^{i\theta}$, separate even/odd terms |
