Calculus 1 problem set: limits, derivatives, rates, optimization, integrals, L'Hôpital
Overview
Section titled “Overview”| Module | S-M01 · solve · none · Pass 2 · 6 to 8 h |
| You build | answers in solve/S-M01.toml (54 checked by SymPy) and 3 proofs in solve/S-M01/q10.md, q25.md, q57.md (self-graded against their rubrics) |
| Contract | none: a pen and paper set |
| Tests | course/solve/S-M01/key.toml (hidden): typed answers plus reject canaries; the problems are in course/solve/S-M01/problems.md and in section 4 |
| Needs | no module. Reading: S-M00 (functions, exponentials, logarithms) and the Calculus 1 topic, sections 1 to 5 |
| Used by | no call site (a solve set). Take it after M01.1 (finite differences), M01.2 (Newton’s method), and M01.3 (activation derivatives) in Pass 2; M01.4 and S-M02 build on the integrals |
| Milestone | MS-P2 (the Pass 2 gate runs ol check on every solve part of the pass) |
| Optional depth | OpenStax, Calculus Volume 1 (free), ch. 2 to 5; 3Blue1Brown, Essence of Calculus, episodes 1 to 9 |
Key Takeaways
Section titled “Key Takeaways”- A limit describes what approaches, not itself; and are signals to rewrite, never answers (q1, q8).
- The product, quotient, and chain rules compute every derivative your autograd needs; the sigmoid, softplus, tanh, and SiLU derivatives are four lines each (q13 to q15, q21).
- An optimum of a smooth function sits where or on the boundary, and you still have to check which candidate wins (q36, q38).
- The fundamental theorem turns integrals into antiderivatives and makes (q46, q47).
- L’Hôpital’s rule turns and into a limit of derivatives, and only applies when that limit exists (q57).
How to work this chapter
Section titled “How to work this chapter”ol start S-M01 # writes solve/S-M01.toml and the three proof filesol check S-M01 # SymPy checks the answers, then asks each proof rubric (y/n)ol check S-M01 --regrade # ask the rubrics again after you change a proof1. Why now
Section titled “1. Why now”In Pass 2 your system learns to learn. M01.1 approximates derivatives with finite differences, M01.3 writes the derivative of every activation function, and M04.1 turns those into gradcheck, the test that guards every backward pass in L0. All of it assumes you can differentiate a formula by hand and know what a limit is, because a derivative is a limit and a finite difference is that limit stopped early. Training picks the weights that minimize a loss, which is optimization; the learning-rate schedules of M10.4 and the area under an ROC curve (M07.7) are integrals. This set checks the pen and paper side of Calculus 1 before your code depends on it.
2. Principles
Section titled “2. Principles”| Symbol | Meaning | Type / shape |
|---|---|---|
| gets arbitrarily close to as gets close to | real | |
| positive tolerances in the definition of a limit | positive reals | |
| , | the derivative, | function |
| the second derivative, the derivative of | function | |
| the sigmoid, | function | |
| an antiderivative of : | function | |
| the definite integral, the signed area under from to | real | |
| time, in related-rate problems | real |
2.1 Limits
Section titled “2.1 Limits”means: for every there is a such that implies . The value plays no part, which is why has a limit at 2 even though it is undefined there: for it equals . Limits add, multiply, and divide (when the denominator’s limit is not 0). Three standard limits do most of the work: as , as , and for rational functions at infinity, only the highest powers matter. A one-sided limit restricts to one side of . Forms like , , , , , and are indeterminate: they say the problem needs rewriting (factor, multiply by a conjugate, take logarithms), not what the answer is.
2.2 Derivative rules
Section titled “2.2 Derivative rules”The derivative is the limit of the difference quotient. From that definition follow the rules you use instead of it: linearity; the power rule for a constant ; , , , ; the product rule ; the quotient rule ; and the chain rule, : the outer derivative evaluated at the inner function, times the inner derivative. The chain rule is the whole of backpropagation (M08.1 to M08.3). A variable exponent, as in , needs first; the power rule does not apply.
2.3 Implicit differentiation and related rates
Section titled “2.3 Implicit differentiation and related rates”When is defined by an equation such as , differentiate both sides with respect to , treating as a function of (so ), and solve for . Related rates apply the same idea with time: if two quantities are tied by an equation and both change with , differentiating the equation in ties their rates.
2.4 Optimization
Section titled “2.4 Optimization”At an interior minimum or maximum of a differentiable , ; such points are critical points. A global optimum on an interval is a critical point or an endpoint (or a limit at an open end), so list the candidates and compare their values. The second derivative classifies a critical point: is a local minimum, a local maximum. Gradient descent (M10.1) finds the same points numerically when solving by hand is impossible.
2.5 Integrals and the fundamental theorem
Section titled “2.5 Integrals and the fundamental theorem”The definite integral is the limit of Riemann sums over finer and finer partitions. The fundamental theorem of calculus (FTC) connects it to derivatives in two ways: if then ; and for continuous . With a variable upper limit , the chain rule adds a factor: . The average value of on is .
2.6 L’Hôpital’s rule
Section titled “2.6 L’Hôpital’s rule”If and (or both ) as , and exists, then equals it. It may need several applications ( takes two). Products become quotients, and powers or become products after taking the logarithm. When the limit of does not exist, the rule says nothing, and the original limit may still exist (q57).
3. Worked example by hand
Section titled “3. Worked example by hand”This is a sibling of q13 and q38, not one of the graded problems.
A chain rule derivative. Differentiate . Outer function with derivative ; inner with derivative (chain rule again, inner ). So . Multiply top and bottom by : . This is the derivative of the binary cross-entropy for a positive label, written in terms of the logit. In solve/ it would be answer = "-exp(-x)/(1 + exp(-x))"; answer = "-1/(exp(x) + 1)" passes too, because SymPy checks equivalence, and answer = "1/(1 + exp(-x))" fails.
An optimization. Maximize for (an open box from a sheet). . The critical points are (a zero-volume box) and . Compare candidates: , , . The maximizer is .
4. The problem set
Section titled “4. The problem set”Write each answer in solve/S-M01.toml:
[q1]answer = "4"[q13]answer = "exp(-z)/(1 + exp(-z))^2"[q35]answer = "{-1, 1}"[q10]proof = "S-M01/q10.md"Numbers are exact: exp(2), 2/pi, sqrt(7)/2; 0.5 fails where 1/2 is expected. An [expr] answer may take any equivalent form. Write as E or exp(1) and as pi.
Limits
Section titled “Limits”q1. . [number]
q2. . [number]
q3. . [number]
q4. . (Which derivative is this?) [number]
q5. . [number]
q6. . [number]
q7. . [number]
q8. . [number]
q9. (from the left). [number]
q10. Prove from the definition that : for every , give a such that implies . [proof]
Derivative rules and the chain rule
Section titled “Derivative rules and the chain rule”q11. . [expr in x]
q12. . [expr in x]
q13. The sigmoid is . Give . [expr in z]
q14. Softplus is . Give . [expr in x]
q15. . Give in terms of exponentials. [expr in x]
q16. . [expr in x]
q17. . [expr in x]
q18. for . [expr in x]
q19. for . (Write .) [expr in x]
q20. , the shape of the normal density. [expr in x]
q21. SiLU (swish) is . Give its derivative. [expr in x]
q22. . [expr in x]
q23. . Give . [number]
q24. for . [expr in x]
q25. Prove from the limit definition that the derivative of is . [proof]
Implicit differentiation and related rates
Section titled “Implicit differentiation and related rates”q26. The circle passes through . Give the slope there. [number]
q27. defines implicitly near . Give as a formula in and . [expr in x, y]
q28. A circle’s radius grows at 2 cm/s. How fast (in cm²/s) does its area grow when the radius is 5 cm? [number]
q29. A 10 m ladder leans on a wall. Its foot slides away from the wall at 1 m/s. When the foot is 6 m from the wall, give the rate (m/s) at which the top moves; a falling top has a negative rate. [number]
q30. A sphere’s volume grows at 100 cm³/s. Give (cm/s) when the radius is 5 cm. [number]
q31. for . Differentiate implicitly and give as a formula in alone. [expr in x]
Optimization
Section titled “Optimization”q32. . Give the that minimizes . [number]
q33. Give the minimum value of the of q32. [number]
q34. A rectangle has perimeter 20. Give its largest possible area. [number]
q35. Give the set of critical points of . [set]
q36. Give the maximum of over . [number]
q37. Give the that minimizes , a one-parameter least-squares fit. [number]
q38. An open box is folded from a sheet by cutting a square of side from each corner. Give the that maximizes the volume. [number]
q39. Give the shortest distance from the point to the parabola . [number]
Integration and the fundamental theorem
Section titled “Integration and the fundamental theorem”q40. . [number]
q41. . [number]
q42. . [number]
q43. . [number]
q44. Give the antiderivative of with . [expr in x]
q45. . [number]
q46. for . [expr in x]
q47. . [expr in x]
q48. Give the average value of over . [number]
q49. Give the area between and for . [number]
q50. . [number]
q51. Give the left Riemann sum of on with equal pieces. [number]
L’Hôpital’s rule
Section titled “L’Hôpital’s rule”q52. . [number]
q53. . [number]
q54. . [number]
q55. . [number]
q56. . [number]
q57. Show that , and explain why L’Hôpital’s rule cannot be used to get it. [proof]
5. Pitfalls
Section titled “5. Pitfalls”| Pitfall | Symptom | Caught by |
|---|---|---|
| Substituting into a form instead of simplifying first | a removable singularity “evaluated” as 0 or undefined | q1 (canary 0), q8 (canary 0) |
| Treating as 1 | compound growth and disappear | q6 (canary 1) |
| Differentiating a product factor by factor | given as | q11, q21 (canaries) |
| Forgetting the inner derivative of the chain rule | backward passes off by the inner Jacobian; gradcheck fails | q13, q16, q23, q45, q47 (canaries) |
| Using the power rule on a variable exponent | differentiated as | q19 (canary) |
| Reporting the argmax instead of the max, or keeping a degenerate critical point | the wrong number answered, or a zero-volume box chosen | q36 (canary 1), q38 (canary 6) |
| Dropping the sign of a related rate | a falling ladder reported as rising | q29 (canary 3/4) |
| Applying L’Hôpital once too few times, or where has no limit | a wrong finite limit, or no answer to a limit that exists | q52 (canary 1), q57 (proof) |
6. Where it’s used next
Section titled “6. Where it’s used next”| Direction | Module | How it uses this |
|---|---|---|
| Back | S-M00 | functions, exponentials, logarithms, and the trigonometry these problems differentiate |
| Forward | M01.1 | finite differences approximate the limit of q4; the step size trades truncation against rounding |
| Forward | M01.3 | the activation derivatives of q13 to q15 and q21, in code, checked against torch |
| Forward | M04.1 | gradcheck compares an analytic derivative (your rules) with a numerical one (your limits) |
| Forward | M10.1 | gradient descent finds the critical points of q32 to q39 numerically |
| Forward | S-M02 | integration techniques, improper integrals, series, and ODEs |