# Chapter 5 notebook: Analysis: Know When Limits and Proofs Are Safe

**Goal:** Write the hypotheses that make a convergence or stopping claim defensible.

**Start with:** Rules 5.1.2, 5.1.3, 5.3.2. Use a calculator or the optional Python lab. Programming is optional for the workbook; the Jupyter version requires a Python 3 kernel. All lab numbers are constructed practice inputs, not observed data.

**Source:** [Finished Chapter 5](../skills/math-thumb-analysis/references/chapter.md) from *Mathematical Rules of Thumb*. Numbered rules, classifications, and the decision path come from the book. The lab, exercises, answer key, and worksheet prompts are companion additions.

## 1. Frame your decision

Write a question in which an answer would change something you do. Gather: Domain and metric; quantifiers; convergence notion; uniform bounds; completeness or compactness assumptions.

- My question and intended decision:
- Known inputs and units:
- Required accuracy or threshold:
- What I expect before calculating:
- What I still need to find out:

Use the lab as a worked starting point if you do not yet have your own problem. For notation or prerequisites, ask the chapter skill to explain only the concept blocking the next step.

## 2. Choose a route

- **Is the problem about perturbation or numerical error?** Find a Lipschitz or derivative bound. If an iteration is a verified contraction, translate its last step into a stopping certificate.
- **Are functions converging?** Before moving a limit through continuity, integration, differentiation, or summation, name the governing interchange theorem. Check whether its control is uniform and whether one bound works across the entire domain.
- **Is the object a function series?** Seek a point-independent majorant and try the M-test.
- **Is the limit unknown?** Compare late terms or partial sums with one another. A tail estimate plus completeness may be enough.
- **Does a numerical series change sign?** Test absolute convergence first. If that fails, move to cancellation-sensitive tests.
- **Does a positive term have a recognizable leading scale?** Compare it with a $p$-series, geometric series, or logarithmic benchmark.
- **Is a proof stalled?** Inspect its architecture: use density plus continuity for identity, formal negation for counterexamples, a stronger invariant for induction, compactness for existence, or backward error algebra for epsilon-delta construction.

**Chapter-specific stop check:** Finite numerical checks cannot prove a universal quantified assertion. Name the theorem and verify its domain-wide hypotheses.

## 3. Work the lab

Iterate T(x)=0.5 × x+1 on the real line, starting at zero. Its contraction factor is q=0.5 and fixed point is 2. After a step from x_n to x_(n+1), the remaining error is at most q/(1-q) times the last step. Stop when this bound is at most 0.01. At step 8, x=1.9921875 and the bound is 0.0078125, equal to the true error in this example.

Predict the sign and scale before running the code. Then change one input and explain why the result moves. The code checks the constructed example; it does not prove the rule for every possible input. Code assertions may describe the example's chosen regime, so inspect them before changing that regime.

```python
q, intercept, tolerance = 0.5, 1.0, 0.01
assert 0 <= q < 1 and tolerance > 0
x = 0.0
fixed_point = intercept/(1-q)
for step in range(1, 1000):
    updated = q*x+intercept
    bound = q/(1-q)*abs(updated-x)
    x = updated
    if bound <= tolerance:
        break
else:
    raise RuntimeError("Iteration budget exhausted")
print(f"Step {step}: x={x:.8f}; bound={bound:.8f}; true error={abs(x-fixed_point):.8f}")
assert abs(x-fixed_point) <= bound+1e-14
```

**My prediction, observed result, and explanation:**

_Record your work here._

## 4. Practise without the answers

### Exercise 1

If f is Lipschitz with constant 3 and the input error is at most 0.02, what is the output error bound?

**My approach, assumptions, calculation, and check:**

_Write your attempt here._

### Exercise 2

Negate: for every epsilon>0 there exists N such that for every n>=N, |a_n-L|<epsilon.

**My approach, assumptions, calculation, and check:**

_Write your attempt here._

### Exercise 3

For f_n(x)=x^n on [0,1], identify the pointwise limit and explain why continuity cannot be carried through this limit.

**My approach, assumptions, calculation, and check:**

_Write your attempt here._

**Coaching prompt:** “Use the Chapter 5 skill to help me with Exercise 2. Ask for my attempt, give one useful hint if I need it, and help me check the assumptions before showing the answer.”

## 5. Answer key and reasoning

Read this after attempting the exercises, or use it immediately if you prefer a complete walkthrough. An answer is complete only when its assumptions and stopping point are clear.

### Answer 1

At most 3 × 0.02=0.06, provided the Lipschitz condition holds throughout the relevant domain.

### Answer 2

There exists epsilon>0 such that for every N there exists n>=N with |a_n-L|>=epsilon. Preserve the reversed quantifier order and the non-strict inequality.

### Answer 3

The limit is zero on [0,1) and one at 1, hence discontinuous. The convergence is not uniform on [0,1]; pointwise convergence of continuous functions does not suffice.

## 6. Build the complete chapter toolkit

The new lab samples the chapter; the following checklist covers all 12 rules. Study one thematic group at a time. A large group can take several sessions.

- **Quantify Stability Before Trusting Approximation:** work with rules 5.1.1, 5.1.2, 5.1.3.
- **Select a Convergence Test That Matches the Evidence:** work with rules 5.2.1, 5.2.2, 5.2.3, 5.2.4.
- **Engineer Proofs Instead of Guessing Them:** work with rules 5.3.1, 5.3.2, 5.3.3, 5.3.4, 5.3.5.

For each selected rule, read its equation, explanation, and worked use in the source. Reproduce that example; change one input; then change one assumption so the rule is no longer justified. Record the result and what check catches the failure. Historical examples remain labeled and qualified as in the source.

Read each complete numbered profile in the [chapter reference](../skills/math-thumb-analysis/references/chapter.md) before applying it. The cues below abbreviate the graph metadata; they are not complete conditions. Change the status only after doing the practice described below.

| Rule | Book role | First assumptions to inspect | Practice status |
|---|---|---|---|
| 5.1.1: Use a Lipschitz constant as an error amplifier | Independent | valid lipschitz constant;  inputs in certified domain | new |
| 5.1.2: Turn contraction rate into a fixed-point error bound | Workflow | contraction factor below one;  invariant complete domain | new |
| 5.1.3: Demand uniform control before interchanging limits | Workflow | uniform convergence or stronger dominating condition | new |
| 5.2.1: Use the M-test for uniform convergence of function series | Independent | uniform termwise majorant;  summable majorant series | new |
| 5.2.2: Use the Cauchy criterion when the limit is unknown | Workflow | complete metric space | new |
| 5.2.3: Test absolute convergence before conditional behavior | Workflow | series of real or complex terms | new |
| 5.2.4: Compare with a model whose threshold you know | Workflow | eventual nonnegativity or absolute values;  known model behavior | new |
| 5.3.1: Extend equality from a dense set by continuity | Independent | both functions continuous;  dense agreement set | new |
| 5.3.2: Negate quantified claims mechanically | Workflow | well formed quantified statement | new |
| 5.3.3: Strengthen an induction claim when the step lacks leverage | Workflow | inductive structure;  stronger claim is true | new |
| 5.3.4: Use compactness as the signal that escape is impossible | Workflow | compact domain;  continuous function for extrema | new |
| 5.3.5: Choose delta by working backward from epsilon | Specialized | target error epsilon positive;  controllable input distance | new |

For a completed row, record: **rule number / my new input / mathematical claim type / verified assumptions / calculation / check / valid use / rejected use / next step**. “Practised” means you worked an example. “Demonstrated” means you can explain a valid use, transfer it, and reject a misuse without the answer key.

## 7. Apply it to your own problem

Return to your opening question. Choose the smallest rule set that can settle it. Use the book's independent/workflow/specialized classification separately from the claim type (exact, approximate, bound, diagnostic, or heuristic).

- Selected rule number(s) and reason:
- Assumptions that hold, fail, or remain uncertain:
- Substitution with units:
- Result and error, uncertainty, or bound:
- Independent check or limiting case:
- Decision this supports:
- Stop here, do a named next calculation, or gather missing information:

## 8. Transfer and continue

Useful nearby chapters: Chapter 4: calculus; Chapter 11: asymptotics; Chapter 20: numerical methods. Bring the question, units, assumptions, result type, and uncertainty to the next chapter. Choose a bridge only when it supplies an operation you actually need.

**Completion check:** Explain this chapter's lab in your own words; solve one changed-input exercise; reject one invalid use; and produce a decision record for your own problem. If one check fails, revisit that part of the chapter rather than marking every rule complete.
