Skip to content

8.3 Calculus 2 problem set: integration techniques, the Gaussian, series, Taylor, polar, and ODEs

The code in this chapter leans on second-semester calculus in three places. Taylor series, remainder bounds, and range reduction computes exe^x and erf⁡\operatorname{erf} from Taylor polynomials and checks them against a Lagrange remainder bound, and Polynomial approximation and range reduction: expf in C later puts the same polynomial in C. Series convergence, the EMA as a geometric series, and bias correction treats the exponential moving average as a geometric series and derives from its partial sum the bias correction that Adam and AdamW relies on. And Random variables, expectation, variance, and normal draws by Box-Muller and Variance propagation and initialization draw normal random numbers and pick initialization scales from integrals of the normal density, which exist only because ∫e−x2\int e^{-x^2} converges to π\sqrt{\pi}.

Concepts from other sections (32)

This section uses these ideas. Each has a short definition and a link to the section that explains it in full. Tap a dotted term in the text to preview it.

  • Taylor polynomial: the degree-nn polynomial whose value and first nn derivatives at a point match those of ff. Read more: 8.1 Taylor series, remainder bounds, and range reduction
  • Lagrange remainder: the exact error f(n+1)(ξ)(x−a)n+1/(n+1)!f^{(n+1)}(\xi)(x-a)^{n+1}/(n+1)! of a Taylor polynomial, for some unknown ξ\xi between aa and xx. Read more: 8.1 Taylor series, remainder bounds, and range reduction
  • Exponential moving average (EMA): the recursion mt=βmt−1+(1−β)xtm_t = \beta m_{t-1} + (1 - \beta)x_t, a weighted sum with geometric weights. Read more: 8.2 Series convergence, the EMA as a geometric series, and bias correction
  • Geometric series: ∑arj\sum a r^j, with partial sum a1−rt1−ra\frac{1 - r^t}{1 - r} and limit a1−r\frac{a}{1-r} for ∣r∣<1|r| < 1. Read more: 8.2 Series convergence, the EMA as a geometric series, and bias correction
  • Bias correction: dividing mtm_t by its weight total 1−βt1 - \beta^t so the zero start no longer pulls the average toward 0. Read more: 8.2 Series convergence, the EMA as a geometric series, and bias correction
  • Integration by parts: ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du, the product rule in reverse; it integrates products of two kinds of function, such as xexx e^x, and LIATE is a heuristic for choosing uu. Read more: Chapter 8: Calculus 2
  • Partial fractions: decomposing a rational function P(x)/Q(x)P(x)/Q(x) with deg⁡P<deg⁡Q\deg P < \deg Q into a sum of simpler fractions over the factors of QQ, each of which integrates to a logarithm or an arctangent. Read more: Chapter 8: Calculus 2
  • Trigonometric substitution: replacing xx by asin⁡θa\sin\theta, atan⁡θa\tan\theta, or asec⁡θa\sec\theta to remove a square root of the form a2−x2\sqrt{a^2 - x^2}, a2+x2\sqrt{a^2 + x^2}, or x2−a2\sqrt{x^2 - a^2} from an integrand. Read more: Chapter 8: Calculus 2
  • Alternating series test: if ∣an∣|a_n| decreases to 0, the series ∑(−1)n∣an∣\sum (-1)^n |a_n| converges, even when ∑∣an∣\sum |a_n| does not. Read more: Chapter 8: Calculus 2
  • Range reduction: rewriting ex=2kere^x = 2^k e^r so the polynomial only ever sees a small argument ∣r∣≤ln⁡22|r| \le \frac{\ln 2}{2}. Read more: 8.1 Taylor series, remainder bounds, and range reduction
  • Ordinary differential equation (ODE): an equation relating a function of one variable to its derivatives, such as dy/dx=2xydy/dx = 2xy; it models how a system changes, and gradient descent is Euler’s method applied to one. Read more: Chapter 8: Calculus 2
  • Standard normal: the distribution N(0,1)\mathcal{N}(0, 1) with density 12πe−z2/2\frac{1}{\sqrt{2\pi}} e^{-z^2/2}. Read more: 13.1 Random variables, expectation, variance, and normal draws by Box-Muller
  • Power series: a series ∑cn(x−a)n\sum c_n (x - a)^n in powers of x−ax - a; it converges for ∣x−a∣|x - a| less than its radius of convergence RR and can diverge beyond it. Read more: Chapter 8: Calculus 2
  • Polar coordinates: describing a point by its distance rr from the origin and angle θ\theta, with x=rcos⁡θx = r\cos\theta and y=rsin⁡θy = r\sin\theta; a polar curve r(θ)r(\theta) sweeps area 12∫αβr(θ)2 dθ\frac12\int_\alpha^\beta r(\theta)^2\,d\theta. Read more: Chapter 8: Calculus 2
  • Chain rule: Jg∘f(x)=Jg(f(x)) Jf(x)J_{g \circ f}(x) = J_g(f(x))\,J_f(x). Read more: 10.2 Jacobians, the multivariable chain rule, and numeric JVP/VJP
  • Product rule / quotient rule: (fg)′=f′g+fg′(fg)' = f'g + fg' and (f/g)′=(f′g−fg′)/g2(f/g)' = (f'g - fg')/g^2, the rules for differentiating a product or a ratio of two functions. Read more: Chapter 7: Calculus 1
  • Arc length: the length of a curve, L=∫ab1+f′(x)2 dxL = \int_a^b \sqrt{1 + f'(x)^2}\,dx for y=f(x)y = f(x), or ∫ab(dx/dt)2+(dy/dt)2 dt\int_a^b \sqrt{(dx/dt)^2 + (dy/dt)^2}\,dt for a parametric curve: the integral of speed. Read more: Chapter 8: Calculus 2
  • Integrating factor: the multiplier μ(x)=e∫P(x) dx\mu(x) = e^{\int P(x)\,dx} that turns the first-order linear ODE y′+P(x) y=Q(x)y' + P(x)\,y = Q(x) into (μy)′=μQ(\mu y)' = \mu Q, which can be integrated directly. Read more: Chapter 8: Calculus 2
  • sigmoid: σ(x)=11+e−x\sigma(x) = \frac{1}{1 + e^{-x}}, mapping the real line into (0,1)(0, 1), with σ′=σ(x)σ(−x)\sigma' = \sigma(x)\sigma(-x). Read more: 7.3 Activation Functions and Their Derivatives
  • fundamental theorem of calculus: if F′=fF' = f, then ∫abf=F(b)−F(a)\int_a^b f = F(b) - F(a). Read more: 7.4 Definite Integrals: Trapezoid and Simpson
  • Second moment (vv, exp_avg_sq): the EMA of the elementwise squared gradient. Read more: 16.3 Adam and AdamW: bias correction and decoupled weight decay
  • Kaiming (He) initialization: weight variance 2/nin2/n_{\text{in}} (or 2/nout2/n_{\text{out}}), compensating for ReLU zeroing half its inputs. Read more: 13.4 Variance propagation and initialization
  • First moment (mm, exp_avg): the EMA of the gradient. Read more: 16.3 Adam and AdamW: bias correction and decoupled weight decay
  • Jacobian: the m×nm \times n matrix of partial derivatives Jij=∂fi/∂xjJ_{ij} = \partial f_i / \partial x_j of a function f:Rn→Rmf: \mathbb{R}^n \to \mathbb{R}^m. Read more: 10.2 Jacobians, the multivariable chain rule, and numeric JVP/VJP
  • Determinant: a single number det⁡A\det A for a square matrix: the factor by which AA scales signed volume. It is zero exactly when AA squashes space flat and so cannot be inverted, and det⁡(AB)=det⁡Adet⁡B\det(AB) = \det A \det B. Read more: Chapter 9: Linear Algebra
  • Integral test: if ff is positive, continuous, and decreasing with an=f(n)a_n = f(n), then ∑an\sum a_n and ∫1∞f(x) dx\int_1^\infty f(x)\,dx converge or diverge together. Read more: Chapter 8: Calculus 2
  • p-series / harmonic series: ∑1/np\sum 1/n^p, which converges if and only if p>1p > 1; the harmonic series ∑1/n\sum 1/n is the case p=1p = 1 and diverges, growing like ln⁡n\ln n, which is why it appears in hashing and coupon-collector analyses. Read more: Chapter 8: Calculus 2
  • Ratio test: if successive term ratios eventually stay below some q<1q < 1, the series converges. Read more: 8.2 Series convergence, the EMA as a geometric series, and bias correction
  • GELU: x Φ(x)x\,\Phi(x), the input weighted by the standard normal CDF; its tanh approximation is a different function. Read more: 7.3 Activation Functions and Their Derivatives
  • Unit circle: the circle of radius 1 about the origin; the point at angle θ\theta is (cos⁡θ,sin⁡θ)(\cos\theta, \sin\theta). Read more: 6.2 Trigonometry, rotations, complex numbers, and Euler’s formula
  • Box-Muller: the transform r=−2ln⁡(1−u1)r = \sqrt{-2\ln(1-u_1)}, θ=2πu2\theta = 2\pi u_2 that turns two uniforms into two independent standard normals. Read more: 13.9 Probability problem set, part a: axioms, Bayes, random variables, Box-Muller
  • Change of variables (multiple integrals): for a substitution (x,y)=T(u,v)(x, y) = T(u, v), dA=∣J∣ du dvdA = |J|\,du\,dv, where JJ is the Jacobian determinant of TT; it measures how TT stretches area, and it gives the rr in polar and the ρ2sin⁡ϕ\rho^2 \sin\phi in spherical coordinates. Read more: Chapter 10: Calculus 3

This problem set practises the hand techniques behind those sections: integrating by parts and by substitution, improper integrals and the Gaussian, convergence of series, Taylor remainders, parametric and polar curves, and the simplest differential equations. It is pen-and-paper work with no code. It is best taken after the two sections of this chapter, and it assumes the derivatives, antiderivatives, and fundamental theorem practised in the Calculus 1 problem set.

The set has 52 problems: 48 with exact answers and 4 proofs (Problems 12, 18, 30, and 40). Every problem is followed by a collapsed worked answer with the final result, the derivation, and the common wrong answers and why they are wrong. Model proofs are also kept in course/solutions/solve/S-M02/. Try each problem before opening its answer.

Learning objectives

  • Choose and carry out substitution, integration by parts, partial fractions, or a trigonometric substitution for a given integral.
  • Decide whether an improper integral converges, and evaluate the Gaussian integral and simple Gaussian moments.
  • Apply the geometric, pp-series, integral, ratio, and alternating series tests, including at the endpoints of an interval of convergence.
  • Write Taylor polynomials, bound their error with the Lagrange remainder, and perform range reduction for exe^x.
  • Solve separable, linear, and logistic first-order ODEs, and connect Euler’s method to gradient descent.

The problems use the following notation:

SymbolMeaningType / shape
u,vu, vfunctions in integration by partsfunctions
∫a∞f\int_a^\infty fimproper integral, lim⁡b→∞∫abf\lim_{b \to \infty} \int_a^b freal or divergent
φ(z)\varphi(z)standard normal density, e−z2/2/2πe^{-z^2/2}/\sqrt{2\pi}function
∑nan\sum_{n} a_n, SNS_Na series and its partial sum SN=∑n≤NanS_N = \sum_{n \le N} a_nreal
RRradius of convergence of a power series ∑cnxn\sum c_n x^nnonnegative real
Tn(x)T_n(x)degree nn Taylor polynomial at 0, ∑k≤nf(k)(0) xk/k!\sum_{k \le n} f^{(k)}(0)\, x^k / k!polynomial
Rn(x)R_n(x)remainder f(x)−Tn(x)f(x) - T_n(x)real
r,θr, \thetapolar coordinates: x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\thetareals
y(t)y(t), y′y'an unknown function of time and its derivativefunction
hhthe step size of Euler’s methodpositive real

Substitution reverses the chain rule: ∫f(g(x)) g′(x) dx=∫f(u) du\int f(g(x))\,g'(x)\,dx = \int f(u)\,du with u=g(x)u = g(x), and you change the limits with it. Integration by parts reverses the product rule: ∫abuv′=[uv]ab−∫abu′v\int_a^b u v' = [uv]_a^b - \int_a^b u' v; pick uu to be the factor that gets simpler when differentiated (xx, ln⁡x\ln x). Partial fractions split a rational function into simple pieces: 1x2−1=12(1x−1−1x+1)\frac{1}{x^2 - 1} = \frac{1}{2}\left(\frac{1}{x - 1} - \frac{1}{x + 1}\right). Trigonometric identities such as sin⁡2x=1−cos⁡2x2\sin^2 x = \frac{1 - \cos 2x}{2} and substitutions such as x=2sin⁡θx = 2\sin\theta remove squares and square roots.

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: ∫1∞x−2=1\int_1^\infty x^{-2} = 1 but ∫1∞x−1=∞\int_1^\infty x^{-1} = \infty, and ∫01x−1/2=2\int_0^1 x^{-1/2} = 2 although the integrand is unbounded.

The Gaussian integral I=∫−∞∞e−x2dxI = \int_{-\infty}^\infty e^{-x^2} dx has no elementary antiderivative. The trick is that I2I^2 is a double integral over the plane, and in polar coordinates (dx dy=r dr dθdx\,dy = r\,dr\,d\theta) it becomes ∫02π∫0∞e−r2r dr dθ=π\int_0^{2\pi}\int_0^\infty e^{-r^2} r\,dr\,d\theta = \pi. Substituting x=z/2x = z/\sqrt{2} gives ∫e−z2/2dz=2π\int e^{-z^2/2} dz = \sqrt{2\pi}, the constant of the normal density. By symmetry, ∫0∞z2φ(z) dz\int_0^\infty z^2 \varphi(z)\,dz is half of ∫−∞∞z2φ(z) dz=1\int_{-\infty}^\infty z^2 \varphi(z)\,dz = 1.

A series ∑an\sum a_n converges to SS when its partial sums SN→SS_N \to S. The standard tests are these: a geometric series ∑n≥0rn=11−r\sum_{n \ge 0} r^n = \frac{1}{1 - r} for ∣r∣<1|r| < 1; the pp-series ∑n−p\sum n^{-p} converges exactly for p>1p > 1 (compare with ∫1∞x−p\int_1^\infty x^{-p}, the integral test); the ratio test gives convergence when ∣an+1/an∣→L<1|a_{n+1}/a_n| \to L < 1; and an alternating series with terms decreasing to 0 converges. A power series ∑cnxn\sum c_n x^n converges for ∣x∣<R|x| < R and diverges for ∣x∣>R|x| > R, and each endpoint x=±Rx = \pm R needs its own test.

Tn(x)=∑k=0nf(k)(0)k!xkT_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(0)}{k!} x^k matches ff and its first nn derivatives at 0. Lagrange’s form of the remainder says f(x)−Tn(x)=f(n+1)(c)(n+1)!xn+1f(x) - T_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!} x^{n+1} for some cc between 0 and xx, so a bound on f(n+1)f^{(n+1)} bounds the error. The error grows like ∣x∣n+1|x|^{n+1}, so implementations shrink xx first: range reduction writes x=kln⁡2+rx = k\ln 2 + r with ∣r∣≤12ln⁡2|r| \le \frac{1}{2}\ln 2 and computes ex=2kere^x = 2^k e^r, where a degree 6 polynomial in rr already reaches float32 precision.

A curve x(t),y(t)x(t), y(t) has slope dydx=y′(t)x′(t)\frac{dy}{dx} = \frac{y'(t)}{x'(t)} and arc length ∫x′(t)2+y′(t)2 dt\int \sqrt{x'(t)^2 + y'(t)^2}\,dt. In polar coordinates the area swept by r(θ)r(\theta) is ∫12r2 dθ\int \frac{1}{2} r^2\,d\theta, and multiplying an equation by rr converts it to Cartesian form with r2=x2+y2r^2 = x^2 + y^2, rcos⁡θ=xr\cos\theta = x, rsin⁡θ=yr\sin\theta = y.

y′=−kyy' = -k y has the solution y(t)=y(0) e−kty(t) = y(0)\,e^{-kt} (separate variables: dy/y=−k dtdy/y = -k\,dt). A linear equation y′+p y=q(t)y' + p\,y = q(t) is solved with the integrating factor e∫pe^{\int p}. The logistic equation y′=y(1−y)y' = y(1 - y) separates by partial fractions and gives the sigmoid. Euler’s method steps yk+1=yk+h f(tk,yk)y_{k+1} = y_k + h\,f(t_k, y_k). Gradient descent with learning rate hh is exactly Euler’s method on the gradient flow x′=−∇f(x)x' = -\nabla f(x), and The Optimizer protocol: SGD, momentum, Nesterov, weight decay shows that momentum is Euler’s method on the heavy-ball equation.

Before the set itself, here are two warm-ups. They are siblings of Problems 1 and 17, not problems of the set.

First, integration by parts applied twice. Compute ∫01x2e−x dx\int_0^1 x^2 e^{-x}\,dx. Take u=x2u = x^2, v′=e−xv' = e^{-x}, so u′=2xu' = 2x, v=−e−xv = -e^{-x}: the integral is [−x2e−x]01+2∫01xe−x dx=−e−1+2∫01xe−x dx[-x^2 e^{-x}]_0^1 + 2\int_0^1 x e^{-x}\,dx = -e^{-1} + 2\int_0^1 x e^{-x}\,dx. Apply parts again with u=xu = x: ∫01xe−x=[−xe−x]01+∫01e−x=−e−1+(1−e−1)=1−2e−1\int_0^1 x e^{-x} = [-x e^{-x}]_0^1 + \int_0^1 e^{-x} = -e^{-1} + (1 - e^{-1}) = 1 - 2e^{-1}. The total is −e−1+2−4e−1=2−5e−1≈0.1606-e^{-1} + 2 - 4e^{-1} = 2 - 5e^{-1} \approx 0.1606. Keep it exact as 2−5e−12 - 5e^{-1}; the decimal is only an approximation.

Second, a Gaussian moment. For a standard normal ZZ, E[∣Z∣]=2∫0∞z φ(z) dz\mathbb{E}[|Z|] = 2\int_0^\infty z\,\varphi(z)\,dz. Substitute u=z2/2u = z^2/2, du=z dzdu = z\,dz: ∫0∞ze−z2/2dz=∫0∞e−udu=1\int_0^\infty z e^{-z^2/2} dz = \int_0^\infty e^{-u} du = 1. So E[∣Z∣]=22π=2/π≈0.798\mathbb{E}[|Z|] = \frac{2}{\sqrt{2\pi}} = \sqrt{2/\pi} \approx 0.798.

Answers are exact (for example 12ln⁡32\frac12\ln\frac32, not 0.2027). The tag after each problem says what kind of answer is expected: [number], [expr in x], [interval], [bool], [proof], and so on. The problems are grouped by topic and run in the same order as the review above.

Problem 1. ∫01xex dx\displaystyle\int_0^1 x e^x\, dx (by parts). [number]

Answer

11. By parts with u=xu = x, v′=exv' = e^x: ∫01xex dx=[xex]01−∫01ex dx=e−(e−1)=1\int_0^1 x e^x\,dx = [x e^x]_0^1 - \int_0^1 e^x\,dx = e - (e - 1) = 1. A common mistake is e−1e - 1, which keeps only ∫ex\int e^x and drops the boundary term [xex][xe^x].

Problem 2. ∫1eln⁡x dx\displaystyle\int_1^e \ln x\, dx. [number]

Answer

11. By parts with u=ln⁡xu = \ln x, v′=1v' = 1: ∫1eln⁡x dx=[xln⁡x]1e−∫1e1 dx=e−(e−1)=1\int_1^e \ln x\,dx = [x\ln x]_1^e - \int_1^e 1\,dx = e - (e - 1) = 1. Answering ee forgets to subtract ∫1e1 dx\int_1^e 1\,dx.

Problem 3. ∫0π/2xcos⁡x dx\displaystyle\int_0^{\pi/2} x \cos x\, dx. [number]

Answer

π/2−1\pi/2 - 1. By parts with u=xu = x, v′=cos⁡xv' = \cos x: [xsin⁡x]0π/2−∫0π/2sin⁡x dx=π2−1[x\sin x]_0^{\pi/2} - \int_0^{\pi/2}\sin x\,dx = \frac{\pi}{2} - 1, since ∫0π/2sin⁡x dx=[−cos⁡x]0π/2=1\int_0^{\pi/2}\sin x\,dx = [-\cos x]_0^{\pi/2} = 1. A common mistake is π/2+1\pi/2 + 1, from taking the antiderivative of sin⁡\sin as +cos⁡+\cos.

Problem 4. ∫01x1+x2 dx\displaystyle\int_0^1 \frac{x}{1 + x^2}\, dx (substitution). [number]

Answer

12ln⁡2\frac12\ln 2. With u=1+x2u = 1 + x^2, du=2x dxdu = 2x\,dx, so x dx=12dux\,dx = \frac12 du and the limits become 1 and 2: 12∫12duu=12ln⁡2\frac12\int_1^2 \frac{du}{u} = \frac12\ln 2. Answering ln⁡2\ln 2 loses the 12\frac12 from du=2x dxdu = 2x\,dx.

Problem 5. ∫0π/2sin⁡2x dx\displaystyle\int_0^{\pi/2} \sin^2 x\, dx. [number]

Answer

π/4\pi/4. Use sin⁡2x=1−cos⁡2x2\sin^2 x = \frac{1 - \cos 2x}{2}: ∫0π/21−cos⁡2x2 dx=[x2−sin⁡2x4]0π/2=π4\int_0^{\pi/2} \frac{1 - \cos 2x}{2}\,dx = \left[\frac{x}{2} - \frac{\sin 2x}{4}\right]_0^{\pi/2} = \frac{\pi}{4}. Answering π/2\pi/2 forgets the halving in the identity.

Problem 6. ∫231x2−1 dx\displaystyle\int_2^3 \frac{1}{x^2 - 1}\, dx (partial fractions). [number]

Answer

12ln⁡32\frac12\ln\frac32. Partial fractions: 1x2−1=12(1x−1−1x+1)\frac{1}{x^2 - 1} = \frac12\left(\frac{1}{x - 1} - \frac{1}{x + 1}\right). Then 12[ln⁡(x−1)−ln⁡(x+1)]23=12[(ln⁡2−ln⁡4)−(ln⁡1−ln⁡3)]=12ln⁡2⋅34=12ln⁡32\frac12[\ln(x - 1) - \ln(x + 1)]_2^3 = \frac12[(\ln 2 - \ln 4) - (\ln 1 - \ln 3)] = \frac12\ln\frac{2 \cdot 3}{4} = \frac12\ln\frac32. Common mistakes: ln⁡32\ln\frac32 (the 12\frac12 of the decomposition lost) and 12ln⁡2\frac12\ln 2 (an evaluation slip at the limits).

Problem 7. Give the antiderivative FF of x2exx^2 e^x with F(0)=0F(0) = 0. [expr in x]

Answer

F(x)=ex(x2−2x+2)−2F(x) = e^x(x^2 - 2x + 2) - 2. By parts twice: ∫x2ex=x2ex−2∫xex=x2ex−2(xex−ex)=ex(x2−2x+2)+C\int x^2 e^x = x^2 e^x - 2\int x e^x = x^2 e^x - 2(xe^x - e^x) = e^x(x^2 - 2x + 2) + C. The condition F(0)=2+C=0F(0) = 2 + C = 0 gives C=−2C = -2. A common mistake is to stop at ex(x2−2x+2)e^x(x^2 - 2x + 2), which has F(0)=2F(0) = 2; x3ex/3x^3 e^x/3 treats exe^x as a constant.

Problem 8. ∫01x1−x2 dx\displaystyle\int_0^1 x \sqrt{1 - x^2}\, dx. [number]

Answer

1/31/3. With u=1−x2u = 1 - x^2, du=−2x dxdu = -2x\,dx: ∫01x1−x2 dx=12∫01u du=12⋅23=13\int_0^1 x\sqrt{1 - x^2}\,dx = \frac12\int_0^1 \sqrt{u}\,du = \frac12 \cdot \frac23 = \frac13 (the sign of dudu is absorbed by swapping the limits 1→01 \to 0). Answering 2/32/3 loses the 12\frac12.

Problem 9. ∫0πxsin⁡x dx\displaystyle\int_0^\pi x \sin x\, dx. [number]

Answer

π\pi. By parts with u=xu = x, v′=sin⁡xv' = \sin x: [−xcos⁡x]0π+∫0πcos⁡x dx=π+0=π[-x\cos x]_0^\pi + \int_0^\pi \cos x\,dx = \pi + 0 = \pi. Answering 0 drops the boundary term [−xcos⁡x]0π=π[-x\cos x]_0^\pi = \pi.

Problem 10. ∫01x3ex2 dx\displaystyle\int_0^1 x^3 e^{x^2}\, dx. [number]

Answer

1/21/2. With u=x2u = x^2, du=2x dxdu = 2x\,dx, write x3 dx=x2⋅x dx=12u dux^3\,dx = x^2 \cdot x\,dx = \frac12 u\,du. Then 12∫01ueu du=12[(u−1)eu]01=12(0−(−1))=12\frac12\int_0^1 u e^u\,du = \frac12[(u - 1)e^u]_0^1 = \frac12(0 - (-1)) = \frac12. Answering 1 loses the 12\frac12.

Problem 11. ∫0114−x2 dx\displaystyle\int_0^1 \frac{1}{\sqrt{4 - x^2}}\, dx (substitute x=2sin⁡θx = 2\sin\theta). [number]

Answer

π/6\pi/6. With x=2sin⁡θx = 2\sin\theta, dx=2cos⁡θ dθdx = 2\cos\theta\,d\theta and 4−x2=2cos⁡θ\sqrt{4 - x^2} = 2\cos\theta, so the integrand becomes dθd\theta. The limits are θ=0\theta = 0 and θ=arcsin⁡12=π6\theta = \arcsin\frac12 = \frac{\pi}{6}. Answering π/3\pi/3 uses arccos⁡12\arccos\frac12 for the upper limit.

Problem 12. Derive the integration by parts formula ∫abu v′ dx=[uv]ab−∫abu′ v dx\int_a^b u\,v'\,dx = \big[u v\big]_a^b - \int_a^b u'\,v\,dx from the product rule and the fundamental theorem of calculus. [proof]

Answer

Claim. If uu and vv are differentiable on [a,b][a, b] with u′vu'v and uv′uv' continuous (hence integrable) there, then ∫abu v′ dx=[uv]ab−∫abu′ v dx\int_a^b u\,v'\,dx = [uv]_a^b - \int_a^b u'\,v\,dx.

Proof. By the product rule, (uv)′=u′v+uv′(uv)' = u'v + uv' on [a,b][a, b]. Integrate both sides from aa to bb. The left side is the integral of the derivative of uvuv, so by the fundamental theorem of calculus it equals u(b)v(b)−u(a)v(a)=[uv]abu(b)v(b) - u(a)v(a) = [uv]_a^b. The right side splits by linearity: ∫abu′v dx+∫abuv′ dx\int_a^b u'v\,dx + \int_a^b uv'\,dx, both of which exist by the continuity assumption. So [uv]ab=∫abu′v dx+∫abuv′ dx[uv]_a^b = \int_a^b u'v\,dx + \int_a^b uv'\,dx, and subtracting ∫abu′v dx\int_a^b u'v\,dx gives the claim.

A complete proof states the product rule, applies the fundamental theorem to the left side, uses linearity to split the right side, and names the integrability assumption. Model proof also in q12.md.

Problem 13. ∫1∞1x2 dx\displaystyle\int_1^\infty \frac{1}{x^2}\, dx. [number]

Answer

11. ∫1bx−2 dx=1−1b→1\int_1^b x^{-2}\,dx = 1 - \frac1b \to 1. It converges because p=2>1p = 2 > 1; answering ∞\infty confuses it with ∫1∞x−1\int_1^\infty x^{-1}.

Problem 14. ∫0∞e−2x dx\displaystyle\int_0^\infty e^{-2x}\, dx. [number]

Answer

1/21/2. ∫0be−2x dx=1−e−2b2→12\int_0^b e^{-2x}\,dx = \frac{1 - e^{-2b}}{2} \to \frac12. Answering 2 multiplies by the rate instead of dividing.

Problem 15. ∫011x dx\displaystyle\int_0^1 \frac{1}{\sqrt{x}}\, dx (improper at 0). [number]

Answer

22. ∫δ1x−1/2 dx=2−2δ→2\int_\delta^1 x^{-1/2}\,dx = 2 - 2\sqrt\delta \to 2 as δ→0+\delta \to 0^+. The integrand is unbounded at 0, but the integral converges (p=12<1p = \frac12 < 1 near 0). Calling it ∞\infty is the common mistake.

Problem 16. ∫−∞∞e−x2 dx\displaystyle\int_{-\infty}^{\infty} e^{-x^2}\, dx. [number]

Answer

π\sqrt\pi. This is the Gaussian integral from the review above, proved in Problem 18: I2=∫02π∫0∞e−r2r dr dθ=πI^2 = \int_0^{2\pi}\int_0^\infty e^{-r^2} r\,dr\,d\theta = \pi. It matters because the normalizer of the normal density in Random variables, expectation, variance, and normal draws by Box-Muller is this integral rescaled. Common mistakes: 2π\sqrt{2\pi}, which is ∫e−x2/2\int e^{-x^2/2}, and π\pi, which is I2I^2.

Problem 17. ZZ is a standard normal with density φ(z)=e−z2/2/2π\varphi(z) = e^{-z^2/2}/\sqrt{2\pi}. Give E[max⁡(Z,0)2]=∫0∞z2φ(z) dz\mathbb{E}[\max(Z, 0)^2] = \displaystyle\int_0^\infty z^2 \varphi(z)\, dz, the second moment of a ReLU of a standard normal. [number]

Answer

1/21/2. z2φ(z)z^2\varphi(z) is even, so the half-line integral is half of the full one, and ∫−∞∞z2φ(z) dz=Var⁡(Z)=1\int_{-\infty}^\infty z^2\varphi(z)\,dz = \operatorname{Var}(Z) = 1. So E[max⁡(Z,0)2]=12\mathbb{E}[\max(Z, 0)^2] = \frac12. This is the factor Kaiming initialization (Variance propagation and initialization) undoes with gain 2\sqrt 2: a ReLU keeps half the second moment. Common mistakes: 1 (the full second moment) and 1/2π1/\sqrt{2\pi} (the value ∫0∞zφ(z) dz\int_0^\infty z\varphi(z)\,dz, a first moment).

Problem 18. Prove ∫−∞∞e−x2 dx=π\displaystyle\int_{-\infty}^{\infty} e^{-x^2}\, dx = \sqrt{\pi} by squaring the integral and changing to polar coordinates. [proof]

Answer

Claim. I=∫−∞∞e−x2 dx=πI = \int_{-\infty}^\infty e^{-x^2}\,dx = \sqrt\pi.

Proof. First, II converges: 0<e−x2≤e1−2∣x∣0 < e^{-x^2} \le e^{1 - 2|x|} for all xx (since x2≥2∣x∣−1x^2 \ge 2|x| - 1), and ∫e1−2∣x∣ dx\int e^{1 - 2|x|}\,dx is finite. Because the integral converges absolutely, the product of two copies is a double integral over the plane (Fubini): I2=∫−∞∞e−x2 dx∫−∞∞e−y2 dy=∬R2e−(x2+y2) dx dy.I^2 = \int_{-\infty}^\infty e^{-x^2}\,dx \int_{-\infty}^\infty e^{-y^2}\,dy = \iint_{\mathbb{R}^2} e^{-(x^2 + y^2)}\,dx\,dy . Change to polar coordinates x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta. The Jacobian determinant is rr, so dx dy=r dr dθdx\,dy = r\,dr\,d\theta, and x2+y2=r2x^2 + y^2 = r^2: I2=∫02π∫0∞e−r2 r dr dθ.I^2 = \int_0^{2\pi}\int_0^\infty e^{-r^2}\,r\,dr\,d\theta . The inner integral, with s=r2s = r^2, ds=2r drds = 2r\,dr, is 12∫0∞e−s ds=12\frac12\int_0^\infty e^{-s}\,ds = \frac12. The outer integral of 12\frac12 over [0,2π)[0, 2\pi) is π\pi. So I2=πI^2 = \pi, and since the integrand is positive, I>0I > 0 and I=πI = \sqrt\pi.

The steps a proof must contain: the double integral (with convergence), the area element r dr dθr\,dr\,d\theta, the evaluation of both integrals, and the sign argument for taking the positive root. Model proof also in q18.md.

Problem 19. Does ∑n=1∞1n2\displaystyle\sum_{n=1}^\infty \frac{1}{n^2} converge? [bool]

Answer

Yes. It is a pp-series with p=2>1p = 2 > 1; by the integral test it is bounded by 1+∫1∞x−2 dx=21 + \int_1^\infty x^{-2}\,dx = 2. (Its sum is π2/6\pi^2/6.)

Problem 20. Does ∑n=1∞1n\displaystyle\sum_{n=1}^\infty \frac{1}{n} converge? [bool]

Answer

No. The harmonic series diverges (proof in Problem 30), even though its terms go to 0. Terms tending to 0 is necessary for convergence, not sufficient.

Problem 21. ∑n=0∞(23)n\displaystyle\sum_{n=0}^\infty \left(\frac{2}{3}\right)^n. [number]

Answer

33. Geometric with r=23r = \frac23, starting at n=0n = 0: 11−2/3=3\frac{1}{1 - 2/3} = 3. Answering 2 starts the sum at n=1n = 1 (that sum is r1−r=2\frac{r}{1 - r} = 2). The EMA of Series convergence, the EMA as a geometric series, and bias correction is a truncated series of this kind.

Problem 22. ∑n=1∞1n(n+1)\displaystyle\sum_{n=1}^\infty \frac{1}{n(n + 1)} (telescoping). [number]

Answer

11. 1n(n+1)=1n−1n+1\frac{1}{n(n + 1)} = \frac1n - \frac{1}{n + 1}, so the partial sum telescopes to SN=1−1N+1→1S_N = 1 - \frac{1}{N + 1} \to 1. Answering 12\frac12 stops at the first term.

Problem 23. ∑n=1∞n2n\displaystyle\sum_{n=1}^\infty \frac{n}{2^n}. [number]

Answer

22. Differentiate ∑n≥0xn=11−x\sum_{n \ge 0} x^n = \frac{1}{1 - x} and multiply by xx: ∑n≥1nxn=x(1−x)2\sum_{n \ge 1} n x^n = \frac{x}{(1 - x)^2}. At x=12x = \frac12: 1/21/4=2\frac{1/2}{1/4} = 2. Answering 1 sums ∑(1/2)n\sum (1/2)^n instead.

Problem 24. Does ∑n=1∞n!nn\displaystyle\sum_{n=1}^\infty \frac{n!}{n^n} converge? (Ratio test.) [bool]

Answer

Yes. Ratio test: an+1an=(n+1)!(n+1)n+1⋅nnn!=(nn+1)n=(1+1n)−n→1e<1\frac{a_{n+1}}{a_n} = \frac{(n + 1)!}{(n + 1)^{n+1}} \cdot \frac{n^n}{n!} = \left(\frac{n}{n + 1}\right)^n = \left(1 + \frac1n\right)^{-n} \to \frac1e < 1.

Problem 25. Does the alternating series ∑n=1∞(−1)n+1n\displaystyle\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n} converge? [bool]

Answer

Yes. By the alternating series test: the terms 1n\frac1n decrease to 0, so the partial sums converge (conditionally; the absolute series is harmonic).

Problem 26. Give the sum ∑n=1∞(−1)n+1n\displaystyle\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n}. [number]

Answer

ln⁡2\ln 2. The series is ln⁡(1+x)=x−x22+x33−…\ln(1 + x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \dots at x=1x = 1, which is allowed because the series converges there (Problem 25) and Abel’s theorem carries the value to the endpoint. Common mistakes: −ln⁡2-\ln 2 (sign of the first term) and 1 (the first term alone).

Problem 27. Give the radius of convergence of ∑n=1∞xnn\displaystyle\sum_{n=1}^\infty \frac{x^n}{n}. [number]

Answer

11. Ratio test on xnn\frac{x^n}{n}: ∣xn+1/(n+1)xn/n∣=∣x∣nn+1→∣x∣\left|\frac{x^{n+1}/(n + 1)}{x^n/n}\right| = |x|\frac{n}{n + 1} \to |x|, so the series converges for ∣x∣<1|x| < 1 and diverges for ∣x∣>1|x| > 1. The 1n\frac1n does not change the radius; ∞\infty is the radius of ∑xn/n!\sum x^n/n!.

Problem 28. Give the interval of convergence of ∑n=1∞xnn\displaystyle\sum_{n=1}^\infty \frac{x^n}{n}, endpoints included or not. [interval]

Answer

[−1,1)[-1, 1). The radius is 1 (Problem 27). At x=1x = 1 the series is harmonic and diverges; at x=−1x = -1 it is ∑(−1)n/n=−ln⁡2\sum (-1)^n/n = -\ln 2, which converges by the alternating series test. Common mistakes: (−1,1)(-1, 1), which drops the convergent left endpoint, and [−1,1][-1, 1], which keeps the divergent right one.

Problem 29. Give the set of real pp for which ∑n=1∞1np\displaystyle\sum_{n=1}^\infty \frac{1}{n^p} converges. [interval]

Answer

p∈(1,∞)p \in (1, \infty). The integral test compares with ∫1∞x−p dx\int_1^\infty x^{-p}\,dx, finite exactly when p>1p > 1. Including p=1p = 1 (answering [1,∞)[1, \infty)) includes the harmonic series.

Problem 30. Prove that ∑n=1∞1n\displaystyle\sum_{n=1}^\infty \frac{1}{n} diverges. [proof]

Answer

Claim. ∑n=1∞1n\sum_{n=1}^\infty \frac1n diverges.

Proof (grouping). Let SN=∑n=1N1nS_N = \sum_{n=1}^N \frac1n. Group the terms after the first into blocks Bk={2k−1+1,…,2k}B_k = \{2^{k-1} + 1, \dots, 2^k\} for k=1,2,…k = 1, 2, \dots. Block BkB_k has 2k−12^{k-1} terms, and each n∈Bkn \in B_k satisfies n≤2kn \le 2^k, so 1n≥12k\frac1n \ge \frac{1}{2^k}. Hence each block sums to at least 2k−1⋅2−k=122^{k-1} \cdot 2^{-k} = \frac12. For N=2mN = 2^m, S2m≥1+m2.S_{2^m} \ge 1 + \frac{m}{2} . The partial sums increase (all terms are positive) and S2m→∞S_{2^m} \to \infty, so they are unbounded and have no finite limit. The series diverges, even though 1n→0\frac1n \to 0.

The integral test is an equally good route: SN≥∫1N+1dxx=ln⁡(N+1)S_N \ge \int_1^{N+1} \frac{dx}{x} = \ln(N + 1), since 1n≥∫nn+1dxx\frac1n \ge \int_n^{n+1}\frac{dx}{x}. Either proof needs a lower bound that grows without limit, a justification of each inequality, and the conclusion that unbounded partial sums mean divergence. Model proof also in q30.md.

Problem 31. Give the degree 3 Taylor polynomial of exe^x at 0. [expr in x]

Answer

1+x+x22+x361 + x + \frac{x^2}{2} + \frac{x^3}{6}. Every derivative of exe^x at 0 is 1, so the coefficients are 1k!\frac{1}{k!}. Common mistakes: 1+x+x2+x31 + x + x^2 + x^3 (factorials forgotten) and stopping at degree 2.

Problem 32. Give the Maclaurin series of ln⁡(1+x)\ln(1 + x) through the x3x^3 term. [expr in x]

Answer

x−x22+x33x - \frac{x^2}{2} + \frac{x^3}{3}. Integrate 11+x=1−x+x2−…\frac{1}{1 + x} = 1 - x + x^2 - \dots term by term from 0. Answering x+x22+x33x + \frac{x^2}{2} + \frac{x^3}{3} loses the alternating signs (that is −ln⁡(1−x)-\ln(1 - x)).

Problem 33. Give the coefficient of x5x^5 in the Maclaurin series of sin⁡x\sin x. [number]

Answer

1120\frac{1}{120}. sin⁡x=x−x33!+x55!−…\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \dots, and the signs alternate starting with ++, so the x5x^5 term is +1120+\frac{1}{120}. Common mistakes: −1120-\frac{1}{120} (sign) and 15\frac15 (dividing by 5 instead of 5!5!).

Problem 34. Give the degree 4 Taylor polynomial of cos⁡x\cos x at 0. [expr in x]

Answer

1−x22+x4241 - \frac{x^2}{2} + \frac{x^4}{24}. The derivatives of cos⁡\cos at 0 cycle 1,0,−1,0,11, 0, -1, 0, 1, divided by k!k!. Answering x44\frac{x^4}{4} divides by 4 instead of 4!=244! = 24.

Problem 35. With the Lagrange remainder, bound ∣ex−T3(x)∣|e^x - T_3(x)| for ∣x∣≤1/2|x| \le 1/2, where T3T_3 is the degree 3 Taylor polynomial at 0. Use ec≤e1/2e^c \le e^{1/2} for the unknown point cc and give the bound. [number]

Answer

e1/2384\frac{e^{1/2}}{384}. The Lagrange remainder of degree 3 is R3(x)=ec4!x4R_3(x) = \frac{e^c}{4!}x^4 with cc between 0 and xx. For ∣x∣≤12|x| \le \frac12, ec≤e1/2e^c \le e^{1/2} and x4≤116x^4 \le \frac{1}{16}, so ∣R3∣≤e1/224⋅16=e1/2384≈0.0043|R_3| \le \frac{e^{1/2}}{24 \cdot 16} = \frac{e^{1/2}}{384} \approx 0.0043. The exp polynomial of Taylor series, remainder bounds, and range reduction is checked against exactly this kind of bound. Common mistakes: a remainder of the wrong degree (such as e1/296\frac{e^{1/2}}{96}), and 1384\frac{1}{384}, which drops the ece^c factor and is too optimistic.

Problem 36. Give the smallest nn with 1(n+1)!<10−6\dfrac{1}{(n + 1)!} < 10^{-6}. [number]

Answer

n=9n = 9. 9!=362 8809! = 362\,880, so 19!≈2.8×10−6\frac{1}{9!} \approx 2.8 \times 10^{-6} (too big), while 10!=3 628 80010! = 3\,628\,800 gives 110!≈2.8×10−7<10−6\frac{1}{10!} \approx 2.8 \times 10^{-7} < 10^{-6}. So n+1=10n + 1 = 10 and n=9n = 9. Answering 10 reports n+1n + 1.

Problem 37. Give the degree 3 Taylor polynomial of 11−x\dfrac{1}{1 - x} at 0. [expr in x]

Answer

1+x+x2+x31 + x + x^2 + x^3. The geometric series 11−x=∑xn\frac{1}{1 - x} = \sum x^n; every derivative at 0 is k!k!, so every coefficient is 1. Answering 1−x+x2−x31 - x + x^2 - x^3 gives the series of 11+x\frac{1}{1 + x}.

Problem 38. Range reduction writes x=kln⁡2+rx = k \ln 2 + r with kk the integer nearest to x/ln⁡2x / \ln 2, so that ex=2kere^x = 2^k e^r with ∣r∣≤12ln⁡2|r| \le \frac{1}{2}\ln 2. For x=5x = 5, give rr. [number]

Answer

r=5−7ln⁡2r = 5 - 7\ln 2. 5/ln⁡2≈7.2135/\ln 2 \approx 7.213, so the nearest integer is k=7k = 7 and r=5−7ln⁡2≈0.148r = 5 - 7\ln 2 \approx 0.148, within 12ln⁡2≈0.347\frac12\ln 2 \approx 0.347. The exp_range_reduced of Taylor series, remainder bounds, and range reduction and the C tl_expf of Polynomial approximation and range reduction: expf in C use exactly this reduction. Common mistakes: 5−8ln⁡2≈−0.5455 - 8\ln 2 \approx -0.545 (rounding up, so ∣r∣>12ln⁡2|r| > \frac12\ln 2) and 5/ln⁡2−75/\ln 2 - 7 (the remainder in units of ln⁡2\ln 2, not in xx).

Problem 39. erf⁡(x)=2π∫0xe−t2 dt\operatorname{erf}(x) = \dfrac{2}{\sqrt{\pi}} \displaystyle\int_0^x e^{-t^2}\, dt. Give the first three nonzero terms of its Maclaurin series. [expr in x]

Answer

2π(x−x33+x510)\frac{2}{\sqrt\pi}\left(x - \frac{x^3}{3} + \frac{x^5}{10}\right). Expand e−t2=1−t2+t42−…e^{-t^2} = 1 - t^2 + \frac{t^4}{2} - \dots and integrate from 0 to xx: x−x33+x510x - \frac{x^3}{3} + \frac{x^5}{10}, then multiply by 2π\frac{2}{\sqrt\pi}. The erf_series of Taylor series, remainder bounds, and range reduction feeds the exact GELU of Activation Functions and Their Derivatives. Common mistakes: x55\frac{x^5}{5} (the 12\frac12 of t42\frac{t^4}{2} lost) and dropping the 2π\frac{2}{\sqrt\pi}.

Problem 40. Prove that ∣sin⁡x−(x−x36)∣≤∣x∣5120\left|\sin x - \left(x - \dfrac{x^3}{6}\right)\right| \le \dfrac{|x|^5}{120} for every real xx. [proof]

Answer

Claim. For every real xx, ∣sin⁡x−(x−x36)∣≤∣x∣5120\left|\sin x - \left(x - \frac{x^3}{6}\right)\right| \le \frac{|x|^5}{120}.

Proof. Let f=sin⁡f = \sin. Its derivatives at 0 are 0,1,0,−1,00, 1, 0, -1, 0 for orders 0 to 4, so the degree 4 Taylor polynomial is T4(x)=x−x36T_4(x) = x - \frac{x^3}{6} (the x4x^4 coefficient is 0, so it equals the degree 3 polynomial). Taylor’s theorem with the Lagrange remainder gives, for each x≠0x \ne 0, a point cc between 0 and xx with sin⁡x−T4(x)=f(5)(c)5!x5,f(5)=cos⁡.\sin x - T_4(x) = \frac{f^{(5)}(c)}{5!}x^5, \qquad f^{(5)} = \cos . Since ∣cos⁡c∣≤1|\cos c| \le 1 and 5!=1205! = 120, ∣sin⁡x−T4(x)∣≤∣x∣5120|\sin x - T_4(x)| \le \frac{|x|^5}{120}. At x=0x = 0 both sides are 0. So the inequality holds for every real xx.

The key step is using the degree 4 remainder: treating x−x36x - \frac{x^3}{6} as only a degree 3 polynomial gives the weaker bound x424\frac{x^4}{24}. Model proof also in q40.md.

Problem 41. The curve x=t2x = t^2, y=t3y = t^3. Give dy/dxdy/dx at t=1t = 1. [number]

Answer

3/23/2. dydx=y′(t)x′(t)=3t22t=3t2\frac{dy}{dx} = \frac{y'(t)}{x'(t)} = \frac{3t^2}{2t} = \frac{3t}{2}, which is 32\frac32 at t=1t = 1. Answering 23\frac23 computes dx/dydx/dy.

Problem 42. Give the arc length of x=cos⁡tx = \cos t, y=sin⁡ty = \sin t for 0≤t≤π/20 \le t \le \pi/2. [number]

Answer

π/2\pi/2. The speed is sin⁡2t+cos⁡2t=1\sqrt{\sin^2 t + \cos^2 t} = 1, so the length is the parameter range, a quarter of the unit circle. Answering 1 gives the radius, not the length of the arc.

Problem 43. Give the arc length of x=t2x = t^2, y=t3y = t^3 for 0≤t≤10 \le t \le 1. [number]

Answer

1313−827\frac{13\sqrt{13} - 8}{27}. The speed is (2t)2+(3t2)2=t4+9t2\sqrt{(2t)^2 + (3t^2)^2} = t\sqrt{4 + 9t^2}. With u=4+9t2u = 4 + 9t^2, du=18t dtdu = 18t\,dt: 118∫413u du=118⋅23(133/2−8)=1313−827≈1.440\frac{1}{18}\int_4^{13}\sqrt u\,du = \frac{1}{18}\cdot\frac23\left(13^{3/2} - 8\right) = \frac{13\sqrt{13} - 8}{27} \approx 1.440. Answering 131327\frac{13\sqrt{13}}{27} drops the lower limit 43/2=84^{3/2} = 8.

Problem 44. Give the area enclosed by the polar curve r=2cos⁡θr = 2\cos\theta, −π/2≤θ≤π/2-\pi/2 \le \theta \le \pi/2. [number]

Answer

π\pi. 12∫−π/2π/24cos⁡2θ dθ=2⋅π2=π\frac12\int_{-\pi/2}^{\pi/2} 4\cos^2\theta\,d\theta = 2 \cdot \frac{\pi}{2} = \pi. Check: r=2cos⁡θr = 2\cos\theta is the circle (x−1)2+y2=1(x - 1)^2 + y^2 = 1 of radius 1. Answering 2π2\pi forgets the 12\frac12 in 12r2 dθ\frac12 r^2\,d\theta.

Problem 45. Rewrite the polar curve r=2sin⁡θr = 2\sin\theta as an equation in xx and yy. [equation in x, y]

Answer

x2+y2=2yx^2 + y^2 = 2y. Multiply by rr: r2=2rsin⁡θr^2 = 2r\sin\theta, then substitute r2=x2+y2r^2 = x^2 + y^2 and rsin⁡θ=yr\sin\theta = y. It is the circle of radius 1 centred at (0,1)(0, 1). Answering x2+y2=2xx^2 + y^2 = 2x converts r=2cos⁡θr = 2\cos\theta instead.

Problem 46. Give the area enclosed by the cardioid r=1+cos⁡θr = 1 + \cos\theta, 0≤θ≤2π0 \le \theta \le 2\pi. [number]

Answer

3π/23\pi/2. 12∫02π(1+cos⁡θ)2 dθ=12∫02π(1+2cos⁡θ+cos⁡2θ) dθ=12(2π+0+π)=3π2\frac12\int_0^{2\pi}(1 + \cos\theta)^2\,d\theta = \frac12\int_0^{2\pi}(1 + 2\cos\theta + \cos^2\theta)\,d\theta = \frac12(2\pi + 0 + \pi) = \frac{3\pi}{2}. Answering 3π3\pi forgets the 12\frac12.

Problem 47. Solve y′=−2yy' = -2y with y(0)=3y(0) = 3. [expr in t]

Answer

y=3e−2ty = 3e^{-2t}. Separating, y=Ce−2ty = Ce^{-2t}, and y(0)=3y(0) = 3 fixes C=3C = 3. Answering e−2te^{-2t} ignores the initial condition.

Problem 48. Solve the logistic equation y′=y(1−y)y' = y(1 - y) with y(0)=1/2y(0) = 1/2. [expr in t]

Answer

y=11+e−ty = \frac{1}{1 + e^{-t}}. Separate with partial fractions: dyy(1−y)=(1y+11−y)dy=dt\frac{dy}{y(1 - y)} = \left(\frac1y + \frac{1}{1 - y}\right)dy = dt, so ln⁡y1−y=t+C\ln\frac{y}{1 - y} = t + C. y(0)=12y(0) = \frac12 gives C=0C = 0, and solving y1−y=et\frac{y}{1 - y} = e^t gives the sigmoid, the same function as in The op library and gradcheck_all (in AI Engineering) and Activation Functions and Their Derivatives. Common mistakes: et2\frac{e^t}{2} (solving y′=yy' = y) and 11+et\frac{1}{1 + e^t} (a sign slip, which decreases instead of increasing).

Problem 49. Solve y′+y=ty' + y = t with y(0)=0y(0) = 0. [expr in t]

Answer

y=t−1+e−ty = t - 1 + e^{-t}. The integrating factor is ete^t: (yet)′=tet(ye^t)' = te^t, so yet=(t−1)et+Cye^t = (t - 1)e^t + C and y=t−1+Ce−ty = t - 1 + Ce^{-t}. y(0)=−1+C=0y(0) = -1 + C = 0 gives C=1C = 1. Answering t−1t - 1 keeps only the particular solution and misses y(0)=0y(0) = 0.

Problem 50. A quantity decays by y′=−kyy' = -k y and halves every 10 time units. Give kk. [number]

Answer

k=ln⁡210k = \frac{\ln 2}{10}. y(10)=y(0)e−10k=12y(0)y(10) = y(0)e^{-10k} = \frac12 y(0), so 10k=ln⁡210k = \ln 2. Common mistakes: 120\frac{1}{20} (treating halving as linear decay) and 10ln⁡210\ln 2 (inverting the relation).

Problem 51. Euler’s method on y′=yy' = y, y(0)=1y(0) = 1, with step h=1/2h = 1/2: give the approximation of y(1)y(1) after two steps. [number]

Answer

9/49/4. Each Euler step on y′=yy' = y multiplies by 1+h1 + h: y1=1+12=32y_1 = 1 + \frac12 = \frac32, y2=32⋅32=94y_2 = \frac32 \cdot \frac32 = \frac94. The exact value e≈2.718e \approx 2.718 is not the Euler approximation; 2 is one step of size 1.

Problem 52. Gradient flow on f(x)=x2/2f(x) = x^2/2 is x′(t)=−f′(x)=−xx'(t) = -f'(x) = -x. Starting from x(0)=4x(0) = 4, give the time at which x(t)=1x(t) = 1. [number]

Answer

t=ln⁡4t = \ln 4. The solution is x(t)=4e−tx(t) = 4e^{-t}, and 4e−t=14e^{-t} = 1 gives t=ln⁡4≈1.386t = \ln 4 \approx 1.386. Answering 3 assumes constant speed 1; the speed ∣x∣|x| shrinks as xx approaches the minimum, which is why gradient descent slows near it.

## Common traps

Most wrong answers in this set come from a handful of recurring slips, and each has a habit that prevents it.

The most frequent is losing the constant from du=g′(x) dxdu = g'(x)\,dx, which leaves a substitution answer off by a factor of 2; writing dudu out in full before substituting avoids it (Problems 4, 6, and 10). A close second is treating an unbounded integrand as a divergent integral, reporting ∫01x−1/2\int_0^1 x^{-1/2} as infinite; take the limit δ→0+\delta \to 0^+ before deciding (Problem 15). Confusing the normalizers of e−x2e^{-x^2} and e−x2/2e^{-x^2/2} puts normal densities off by 2\sqrt{2}; keep the exponent’s scale in view: ∫e−x2=π\int e^{-x^2} = \sqrt\pi, ∫e−x2/2=2π\int e^{-x^2/2} = \sqrt{2\pi} (Problem 16).

With series, the classic error is concluding convergence from terms that go to 0, which calls the harmonic series convergent; bound the partial sums from below instead (Problems 20 and 30). Testing only the interior of an interval of convergence includes or drops an endpoint wrongly; test each endpoint with its own series test (Problems 28 and 29).

With Taylor polynomials, using the remainder of the wrong degree, or dropping its derivative factor, produces an error bound that is too optimistic; use the degree n+1n + 1 derivative and keep the ece^c bound (Problem 35). Rounding the range-reduction quotient the wrong way gives ∣r∣>12ln⁡2|r| > \frac{1}{2}\ln 2, and the polynomial loses accuracy; round x/ln⁡2x/\ln 2 to the nearest integer (Problem 38). Finally, ignoring the initial condition of an ODE leaves a family of solutions instead of one; apply y(0)y(0) to fix the constant (Problems 47 and 49).

The set looks backward to the Calculus 1 problem set for derivatives, antiderivatives, and the fundamental theorem, and forward to several sections that use its results directly:

  • OpenStax, Calculus Volume 2 (free), chapters 3 to 7.
  • Trefethen, Approximation Theory and Approximation Practice, chapters 1 to 3, for why a few Taylor terms after range reduction are enough.
  • Integration by parts is the product rule integrated; substitution is the chain rule integrated (Problems 1 to 12).
  • The Gaussian integral ∫e−x2=π\int e^{-x^2} = \sqrt{\pi} 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 (Problems 16 and 17).
  • A series converges when its partial sums do; terms going to 0 is necessary, not sufficient (Problems 20 and 30).
  • A Taylor polynomial plus a Lagrange remainder is an approximation with a guarantee; range reduction keeps the remainder small (Problems 35 and 38).
  • 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 (Problems 48, 51, and 52).