Antiderivatives and Initial-Value Problems

Published on 2026-11-04·v1.0

Learning Objectives

  • Define an antiderivative on an interval and explain why the general antiderivative is F(x)+CF(x) + C on that interval, and only there.
  • Compute antiderivatives of the basic families and check every answer by differentiating it.
  • Solve first-order and second-order initial-value problems for y′=f(x)y' = f(x), using the conditions to fix the constants.
  • Recognize situations where an antiderivative does not exist, is not elementary, or is only valid on part of the domain.

Context & Motivation

Differentiation answers "how fast is it changing?" Antidifferentiation asks the opposite: given the rate, what was the quantity? Given the velocity of a falling object, find its position. Given the rate at which requests arrive at a server, find the number served so far. Given the marginal cost of one more unit, find the total cost. In each case the rate pins down the answer only up to a constant, and a measurement (the starting position, the initial count) selects one function from the family. That pairing of an equation with a starting value is an initial-value problem, and it is the simplest case of the differential equations in differential-equations-and-initial-value-problems.

This lesson is the reverse reading of the rules in differentiation-rules-and-the-chain-rule and derivatives-of-exponentials-logarithms-and-trigonometric-functions, and it needs the monotonicity facts from the-mean-value-theorem-and-monotonicity, which are exactly what justify the "+ C+\,C". It prepares the-definite-integral-and-riemann-sums, where area appears, and the-fundamental-theorem-of-calculus, where the two ideas meet.

Core Theory

Definition and the constant of integration

A function FF is an antiderivative of ff on an interval II if F′(x)=f(x)F'(x) = f(x) for every x∈Ix \in I. If FF is one antiderivative, so is F+CF + C for any constant CC, since the derivative of a constant is 00.

Conversely, if FF and GG are both antiderivatives of ff on an interval II, then (F−G)′=0(F - G)' = 0 on II, and the Mean Value Theorem consequence from the-mean-value-theorem-and-monotonicity says F−GF - G is constant on II. So on an interval, every antiderivative has the form F(x)+CF(x) + C. The notation

∫f(x) dx=F(x)+C\int f(x)\,dx = F(x) + C

stands for this entire family, called the indefinite integral. The word "interval" is essential. For f(x)=1xf(x) = \frac1x, whose domain is (−∞,0)∪(0,∞)(-\infty, 0) \cup (0, \infty), the function

F(x)={ln⁡x+1x>0ln⁡∣x∣+5x<0F(x) = \begin{cases} \ln x + 1 & x > 0 \\ \ln\lvert x\rvert + 5 & x < 0 \end{cases}

is differentiable everywhere on the domain with F′=1xF' = \frac1x, yet it does not have the form ln⁡∣x∣+C\ln\lvert x\rvert + C for a single CC. On each of the two intervals there is its own constant.

The basic table, read backwards

Each row is a derivative formula run in reverse. Every answer can and should be checked by differentiating it.

  • ∫xn dx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C for n≠−1n \ne -1 (on (0,∞)(0, \infty) if nn is not an integer; for a negative integer nn the formula holds on (−∞,0)(-\infty, 0) and on (0,∞)(0, \infty) separately, with an independent constant on each).
  • ∫1x dx=ln⁡∣x∣+C\int \frac1x\,dx = \ln\lvert x\rvert + C on each of (−∞,0)(-\infty, 0) and (0,∞)(0, \infty). The absolute value is needed because ddxln⁡(−x)=1x\frac{d}{dx}\ln(-x) = \frac1x as well.
  • ∫ex dx=ex+C\int e^x\,dx = e^x + C, ∫cos⁡x dx=sin⁡x+C\int \cos x\,dx = \sin x + C, ∫sin⁡x dx=−cos⁡x+C\int \sin x\,dx = -\cos x + C, ∫sec⁡2x dx=tan⁡x+C\int \sec^2 x\,dx = \tan x + C, ∫dx1+x2=arctan⁡x+C\int \frac{dx}{1 + x^2} = \arctan x + C. The formula for sec⁡2x\sec^2 x holds on each interval (−π2+kπ,π2+kπ)\left(-\frac\pi2 + k\pi, \frac\pi2 + k\pi\right) separately, again with an independent constant on each, for the same reason as 1x\frac1x.
  • Linearity: ∫(af+bg) dx=a∫f dx+b∫g dx\int (a f + b g)\,dx = a\int f\,dx + b\int g\,dx.
  • For a linear inside function, ∫cos⁡(kx) dx=sin⁡(kx)k+C\int \cos(kx)\,dx = \frac{\sin(kx)}{k} + C for k≠0k \ne 0: the factor 1k\frac1k undoes the factor kk the chain rule produces.

There is no simple formula for the integral of a product: ∫fg dx≠∫f dx⋅∫g dx\int f g\,dx \ne \int f\,dx \cdot \int g\,dx. Integration by parts is the product rule in reverse, but it is a method with its own bookkeeping, not a formula for ∫fg dx\int fg\,dx. Methods for products and compositions arrive in integration-by-substitution-and-by-parts.

When no antiderivative is available

Not every function has one. A function with a jump cannot be an antiderivative's derivative on an interval containing the jump. Take f(x)=sgn⁡(x)f(x) = \operatorname{sgn}(x), which is −1-1 for x<0x < 0 and 11 for x>0x > 0. If F′=fF' = f on R\mathbb{R}, then FF is differentiable and hence continuous, and on each side FF is ∣x∣\lvert x\rvert plus a constant, so continuity at 00 forces the same constant: F(x)=∣x∣+CF(x) = \lvert x\rvert + C. But ∣x∣\lvert x\rvert has a corner at 00, so F′(0)F'(0) does not exist. No antiderivative exists on R\mathbb{R}.

Continuous functions always have antiderivatives (this is guaranteed by the-fundamental-theorem-of-calculus), but the antiderivative may have no formula in elementary functions. The classic case is e−x2e^{-x^2}, whose antiderivatives are π2erf⁡(x)+C\frac{\sqrt\pi}{2}\operatorname{erf}(x) + C, where the error function erf⁡\operatorname{erf} is defined by an integral rather than a closed form. This is why probabilities for the Normal density are looked up in tables or computed numerically.

Initial-value problems

An initial-value problem pairs y′=f(x)y' = f(x) with a condition y(x0)=y0y(x_0) = y_0. Integrate to get y=F(x)+Cy = F(x) + C, then substitute the condition to solve for CC. The solution is unique on any interval containing x0x_0 on which ff has an antiderivative, because two solutions differ by a constant that the condition forces to be 00. For a second-order problem y′′=f(x)y'' = f(x), integrate twice to get two constants, and supply two conditions, such as y(0)y(0) and y′(0)y'(0).

Worked Examples

Example 1: antiderivatives, checked

Find the general antiderivative of f(x)=3x+cos⁡3x−e−xf(x) = 3\sqrt x + \cos 3x - e^{-x} on (0,∞)(0, \infty). Term by term: ∫3x1/2 dx=2x3/2\int 3x^{1/2}\,dx = 2x^{3/2}, ∫cos⁡3x dx=13sin⁡3x\int \cos 3x\,dx = \frac13\sin 3x, and ∫−e−x dx=e−x\int -e^{-x}\,dx = e^{-x} (the derivative of e−xe^{-x} is −e−x-e^{-x}). So

F(x)=2x3/2+13sin⁡3x+e−x+C.F(x) = 2x^{3/2} + \tfrac13\sin 3x + e^{-x} + C.

Check: F′(x)=3x1/2+cos⁡3x−e−xF'(x) = 3x^{1/2} + \cos 3x - e^{-x}. This is the original, as required.

Example 2: a first-order initial-value problem

Solve F′(x)=3x2−4x+5F'(x) = 3x^2 - 4x + 5 with F(1)=2F(1) = 2. Integrate: F(x)=x3−2x2+5x+CF(x) = x^3 - 2x^2 + 5x + C. The condition gives F(1)=1−2+5+C=4+C=2F(1) = 1 - 2 + 5 + C = 4 + C = 2, so C=−2C = -2 and F(x)=x3−2x2+5x−2F(x) = x^3 - 2x^2 + 5x - 2. Check both requirements: F(1)=1−2+5−2=2F(1) = 1 - 2 + 5 - 2 = 2 and F′(x)=3x2−4x+5F'(x) = 3x^2 - 4x + 5.

Example 3: motion under constant acceleration

A ball is thrown upward from a height of 55 m at 2020 m/s. With acceleration s′′(t)=−9.8s''(t) = -9.8 m/s$^2$ (ignoring air resistance), find the position. Integrate once: s′(t)=−9.8t+C1s'(t) = -9.8t + C_1, and s′(0)=20s'(0) = 20 gives C1=20C_1 = 20. Integrate again: s(t)=−4.9t2+20t+C2s(t) = -4.9t^2 + 20t + C_2, and s(0)=5s(0) = 5 gives C2=5C_2 = 5. So

s(t)=−4.9t2+20t+5.s(t) = -4.9t^2 + 20t + 5.

The peak occurs where s′(t)=0s'(t) = 0: t=209.8≈2.041t = \frac{20}{9.8} \approx 2.041 s, at height s≈25.41s \approx 25.41 m. The ball lands when s(t)=0s(t) = 0. The quadratic has roots t≈4.318t \approx 4.318 and t≈−0.236t \approx -0.236. Only the positive root matters, since the model begins at t=0t = 0. Each condition fixes its own constant: s′(0)s'(0) fixes C1C_1 after the first integration, and s(0)s(0) fixes C2C_2 after the second.

Example 4: an initial condition on a split domain

Solve y′=1xy' = \frac1x with y(−2)=3y(-2) = 3. The condition lives at a negative xx, so the interval containing x0=−2x_0 = -2 on which 1x\frac1x is defined is (−∞,0)(-\infty, 0). There y=ln⁡∣x∣+Cy = \ln\lvert x\rvert + C, and y(−2)=ln⁡2+C=3y(-2) = \ln 2 + C = 3 gives C=3−ln⁡2≈2.307C = 3 - \ln 2 \approx 2.307. So y=ln⁡∣x∣+3−ln⁡2y = \ln\lvert x\rvert + 3 - \ln 2 on (−∞,0)(-\infty, 0). The problem says nothing about what happens for x>0x > 0, and the solution cannot be extended across x=0x = 0, where 1x\frac1x is undefined. Quoting y=ln⁡x+3−ln⁡2y = \ln x + 3 - \ln 2 would be wrong twice: ln⁡x\ln x is undefined where the condition is given, and the constant on the other side is unconstrained.

Example 5: exact antiderivative versus a step-by-step simulation

A game loop updates the ball from Example 3 in steps of size Δt\Delta t. Explicit Euler uses the old velocity for the position update, s←s+v Δts \leftarrow s + v\,\Delta t, then v←v−9.8 Δtv \leftarrow v - 9.8\,\Delta t. Semi-implicit Euler updates vv first. At t=2t = 2 the exact result from the antiderivative is s(2)=−19.6+40+5=25.4s(2) = -19.6 + 40 + 5 = 25.4 and s′(2)=0.4s'(2) = 0.4.

text
dt explicit Euler semi-implicit Euler exact 0.1 26.380 24.420 25.400 0.01 25.498 25.302 25.400

Both methods get the velocity exactly (constant acceleration), while the position error at t=2t = 2 is ±9.8 Δt\pm 9.8\,\Delta t (plus for explicit, minus for semi-implicit): it shrinks in proportion to Δt\Delta t. When the antiderivative is available in closed form, it is the reference against which a numerical integrator is judged.

Common Misconceptions & Pitfalls

  • Forgetting + C+\,C. Without it you have named one antiderivative, and an initial condition has nothing to adjust.
  • "∫1x dx=ln⁡x+C\int \frac1x\,dx = \ln x + C." Valid only for x>0x > 0. The general statement is ln⁡∣x∣+C\ln\lvert x\rvert + C on each interval, with possibly different constants.
  • One constant for a disconnected domain. The uniqueness of CC comes from the Mean Value Theorem and needs an interval.
  • Reverse chain rule without the inner derivative. The derivative of sin⁡(x2)\sin(x^2) is 2xcos⁡(x2)2x\cos(x^2), so ∫cos⁡(x2) dx\int \cos(x^2)\,dx is not sin⁡(x2)\sin(x^2) up to a constant factor. The shortcut sin⁡(kx)k\frac{\sin(kx)}{k} works only because kxkx has a constant derivative.
  • "Every initial-value problem has exactly one solution." For y′=f(x)y' = f(x) with ff continuous on an interval, it does: existence from the antiderivative, uniqueness from the constant. Without continuity, existence can fail: y′=sgn⁡(x)y' = \operatorname{sgn}(x) with y(0)=0y(0) = 0 has no solution on R\mathbb{R}. For equations where the right side depends on yy, uniqueness can fail: y′=3y2/3y' = 3y^{2/3} (with y2/3y^{2/3} read as the square of the real cube root) with y(0)=0y(0) = 0 has both y=0y = 0 and y=x3y = x^3 as solutions. Existence and uniqueness are taken up in differential-equations-and-initial-value-problems.
  • Antiderivative versus definite integral. An indefinite integral is a family of functions. A definite integral is a number, introduced in the next lessons.

Summary

An antiderivative of ff on an interval is a function whose derivative is ff there. By the Mean Value Theorem, any two antiderivatives on an interval differ by a constant, so the general antiderivative is F+CF + C, and the interval requirement is real: 1x\frac1x gives independent constants on (−∞,0)(-\infty, 0) and (0,∞)(0, \infty). The basic table is the derivative table read backwards, and every answer is verified by differentiating it. Some functions have no antiderivative on an interval (a jump, like sgn⁡(x)\operatorname{sgn}(x)), and some have one that no elementary formula expresses (e−x2e^{-x^2}). An initial-value problem uses conditions to fix the constants, one per integration, and the solution it selects lives on the interval containing the initial point. Antiderivatives of constant acceleration give exact motion and serve as the benchmark for numerical integrators. The next lesson, the-definite-integral-and-riemann-sums, introduces area, and later the-fundamental-theorem-of-calculus explains how it connects to what you did here.

Documentation Links