Calculus 2 problem set: integration techniques, the Gaussian, series, Taylor, polar, ODEs
Overview
Section titled “Overview”| Module | S-M02 · solve · none · Pass 2 · 6 to 8 h |
| You build | answers in solve/S-M02.toml (48 checked by SymPy) and 4 proofs in solve/S-M02/q12.md, q18.md, q30.md, q40.md (self-graded against their rubrics) |
| Contract | none: a pen and paper set |
| Tests | course/solve/S-M02/key.toml (hidden): typed answers plus reject canaries; the problems are in course/solve/S-M02/problems.md and in section 4 |
| Needs | no module. Reading: S-M01 (derivatives and the fundamental theorem) and the Calculus 2 topic |
| Used by | no call site (a solve set). Take it after M02.1 (Taylor series in code) and M02.2 (the EMA as a geometric series) in Pass 2; M07.0 and M07.3 read its Gaussian integrals, which are the solve-only M02.3 |
| Milestone | MS-P2 (the Pass 2 gate runs ol check on every solve part of the pass) |
| Optional depth | OpenStax, Calculus Volume 2 (free), ch. 3 to 7; Trefethen, Approximation Theory and Approximation Practice, ch. 1 to 3, for why a few Taylor terms after range reduction are enough |
Key Takeaways
Section titled “Key Takeaways”- Integration by parts is the product rule integrated; substitution is the chain rule integrated (q1 to q11, q12).
- The Gaussian integral gives the normal density its constant, and half the second moment of a standard normal sits on each side of 0, which is the ReLU factor in Kaiming initialization (q16, q17).
- A series converges when its partial sums do; terms going to 0 is necessary, not sufficient (q20, q30).
- A Taylor polynomial plus a Lagrange remainder is an approximation with a guarantee; range reduction keeps the remainder small (q35, q38).
- A first-order ODE describes a rate; the logistic equation’s solution is the sigmoid, and Euler’s method is one step of gradient descent on gradient flow (q48, q51, q52).
How to work this chapter
Section titled “How to work this chapter”ol start S-M02 # writes solve/S-M02.toml and the four proof filesol check S-M02 # SymPy checks the answers, then asks each proof rubric (y/n)ol check S-M02 --regrade # ask the rubrics again after you change a proof1. Why now
Section titled “1. Why now”Your Pass 2 code leans on this calculus in three places. M02.1 computes and from Taylor polynomials, and its tests check a Lagrange remainder bound; M09.6 later puts the same polynomial in C. M02.2 treats the exponential moving average as a geometric series and derives Adam’s bias correction (M10.3) from its partial sum. And M07.0 and M07.3 draw normal random numbers and pick initialization scales from integrals of the normal density, which only exist because converges to . This set checks the hand techniques behind those modules: integrating by parts and by substitution, improper integrals, convergence, Taylor remainders, curves, and the simplest differential equations.
2. Principles
Section titled “2. Principles”| Symbol | Meaning | Type / shape |
|---|---|---|
| functions in integration by parts | functions | |
| improper integral, | real or divergent | |
| standard normal density, | function | |
| , | a series and its partial sum | real |
| radius of convergence of a power series | nonnegative real | |
| degree Taylor polynomial at 0, | polynomial | |
| remainder | real | |
| polar coordinates: , | reals | |
| , | an unknown function of time and its derivative | function |
| the step size of Euler’s method | positive real |
2.1 Integration techniques
Section titled “2.1 Integration techniques”Substitution reverses the chain rule: with ; change the limits with it. Integration by parts reverses the product rule: ; pick to get simpler when differentiated (, ). Partial fractions split a rational function into simple pieces: . Trigonometric identities such as and substitutions such as remove square roots.
2.2 Improper integrals and the Gaussian
Section titled “2.2 Improper integrals and the Gaussian”An integral over an infinite range, or of a function that blows up at an endpoint, is defined as a limit, and it converges when the limit is finite: but ; although the integrand is unbounded. The Gaussian integral has no elementary antiderivative, but is a double integral over the plane, and in polar coordinates () it becomes . Substituting gives , the constant of the normal density. By symmetry, is half of .
2.3 Series and convergence
Section titled “2.3 Series and convergence”A series converges to when its partial sums . Tests: a geometric series for ; the -series converges exactly for (compare with , the integral test); the ratio test gives convergence when ; an alternating series with terms decreasing to 0 converges. A power series converges for and diverges for ; each endpoint needs its own test.
2.4 Taylor polynomials and the remainder
Section titled “2.4 Taylor polynomials and the remainder” matches and its first derivatives at 0. Lagrange’s form of the remainder says for some between 0 and , so a bound on bounds the error. The error grows like , so implementations shrink first: range reduction writes with and computes , where a degree 6 polynomial in already reaches float32 precision (M02.1, M09.6).
2.5 Parametric curves and polar coordinates
Section titled “2.5 Parametric curves and polar coordinates”A curve has slope and arc length . In polar coordinates the area swept by is , and multiplying an equation by converts it with , , .
2.6 First-order differential equations
Section titled “2.6 First-order differential equations” has the solution (separate variables: ). A linear equation is solved with the integrating factor . The logistic equation separates by partial fractions and gives the sigmoid. Euler’s method steps . Gradient descent with learning rate is exactly Euler’s method on the gradient flow , and M02.4 shows momentum is Euler on the heavy-ball equation.
3. Worked example by hand
Section titled “3. Worked example by hand”This is a sibling of q1 and q17, not one of the graded problems.
By parts, twice. Compute . Take , , so , : the integral is . Again with : . Total: . In solve/ this is answer = "2 - 5*exp(-1)"; answer = "0.1606" fails as inexact.
A Gaussian moment. for a standard normal . Substitute , : . So .
4. The problem set
Section titled “4. The problem set”Write each answer in solve/S-M02.toml:
[q3]answer = "pi/2 - 1"[q19]answer = "true"[q28]answer = "[-1, 1)"[q45]answer = "x^2 + y^2 = 2*y"[q12]proof = "S-M02/q12.md"Numbers are exact (log(3/2)/2, not 0.2027). Taylor polynomials are checked symbolically, in any term order. Write as E or exp(1) and as pi.
Integration techniques
Section titled “Integration techniques”q1. (by parts). [number]
q2. . [number]
q3. . [number]
q4. (substitution). [number]
q5. . [number]
q6. (partial fractions). [number]
q7. Give the antiderivative of with . [expr in x]
q8. . [number]
q9. . [number]
q10. . [number]
q11. (substitute ). [number]
q12. Derive the integration by parts formula from the product rule and the fundamental theorem of calculus. [proof]
Improper integrals and the Gaussian
Section titled “Improper integrals and the Gaussian”q13. . [number]
q14. . [number]
q15. (improper at 0). [number]
q16. . [number]
q17. is a standard normal with density . Give , the second moment of a ReLU of a standard normal. [number]
q18. Prove by squaring the integral and changing to polar coordinates. [proof]
Series and convergence tests
Section titled “Series and convergence tests”q19. Does converge? [bool]
q20. Does converge? [bool]
q21. . [number]
q22. (telescoping). [number]
q23. . [number]
q24. Does converge? (Ratio test.) [bool]
q25. Does the alternating series converge? [bool]
q26. Give the sum . [number]
q27. Give the radius of convergence of . [number]
q28. Give the interval of convergence of , endpoints included or not. [interval]
q29. Give the set of real for which converges. [interval]
q30. Prove that diverges. [proof]
Taylor series and remainders
Section titled “Taylor series and remainders”q31. Give the degree 3 Taylor polynomial of at 0. [expr in x]
q32. Give the Maclaurin series of through the term. [expr in x]
q33. Give the coefficient of in the Maclaurin series of . [number]
q34. Give the degree 4 Taylor polynomial of at 0. [expr in x]
q35. With the Lagrange remainder, bound for , where is the degree 3 Taylor polynomial at 0. Use for the unknown point and give the bound. [number]
q36. Give the smallest with . [number]
q37. Give the degree 3 Taylor polynomial of at 0. [expr in x]
q38. Range reduction writes with the integer nearest to , so that with . For , give . [number]
q39. . Give the first three nonzero terms of its Maclaurin series. [expr in x]
q40. Prove that for every real . [proof]
Parametric curves and polar coordinates
Section titled “Parametric curves and polar coordinates”q41. The curve , . Give at . [number]
q42. Give the arc length of , for . [number]
q43. Give the arc length of , for . [number]
q44. Give the area enclosed by the polar curve , . [number]
q45. Rewrite the polar curve as an equation in and . [equation in x, y]
q46. Give the area enclosed by the cardioid , . [number]
First-order differential equations
Section titled “First-order differential equations”q47. Solve with . [expr in t]
q48. Solve the logistic equation with . [expr in t]
q49. Solve with . [expr in t]
q50. A quantity decays by and halves every 10 time units. Give . [number]
q51. Euler’s method on , , with step : give the approximation of after two steps. [number]
q52. Gradient flow on is . Starting from , give the time at which . [number]
5. Pitfalls
Section titled “5. Pitfalls”| Pitfall | Symptom | Caught by |
|---|---|---|
| Losing the constant from | substitution answers off by a factor of 2 | q4 (canary log(2)), q6 (canary log(3/2)), q10 (canary 1) |
| Treating an unbounded integrand as a divergent integral | reported as infinite | q15 (canary oo) |
| Confusing the normalizers of and | normal densities off by | q16 (canary sqrt(2*pi)) |
| Concluding convergence from terms that go to 0 | the harmonic series called convergent | q20, q30 (proof) |
| Testing only the interior of an interval of convergence | an endpoint included or dropped wrongly | q28 (canaries), q29 (canary [1, oo)) |
| Using the remainder of the wrong degree, or dropping its derivative factor | an error bound that is too optimistic | q35 (canaries) |
| Rounding the range-reduction quotient the wrong way | $ | r |
| Ignoring the initial condition of an ODE | a family of solutions instead of one | q47, q49 (canaries) |
6. Where it’s used next
Section titled “6. Where it’s used next”| Direction | Module | How it uses this |
|---|---|---|
| Back | S-M01 | derivatives, antiderivatives, and the fundamental theorem |
| Forward | M02.1 | Taylor polynomials with range reduction for exp and erf, tested against the Lagrange bound of q35 |
| Forward | M02.2 | the EMA as a truncated geometric series (q21) and its bias correction |
| Forward | M07.0 | the normal density’s constant (q16) behind Box-Muller normals |
| Forward | M07.3 | the ReLU second moment of q17 sets Kaiming’s gain |
| Forward | M02.4 | Euler’s method and gradient flow (q51, q52) explain momentum |
| Forward | S-M04 | multiple integrals and the change of variables behind q18 |