BRAGA

02 Writing02-02 Notes02-02-297

Inverse Tangent Output

Published 16 Apr 20263 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
  3. 03Real-world use
  4. 04The formula, piece by piece
  5. 05The formula in words
  6. 06Critical Concepts
  7. 07Step-by-step calculation (tiny example)
  8. 08Code examples
∫1a2+x2 dx=1aarctan⁡ ⁣(xa)+C\int \frac{1}{a^2 + x^2}\,dx = \frac{1}{a}\arctan\!\left(\frac{x}{a}\right) + C
(1)

Deep Breakdown

What it tells me (Situation Awareness): This antiderivative is the Lorentzian / Cauchy-shaped pattern: denominator sums squares (a2+x2a^2+x^2), not subtracts them. It is central in probability (Cauchy density), signal processing (frequency responses), and ODE solutions (arctan shows up in first-order rational flows). The scaling 1/a1/a in front of arctan⁡(x/a)\arctan(x/a) is easy to drop; always differentiate to verify.

Flowchart

Integrand ~1/(a^2 + x^2)Factor a^2:1/(a^2(1+(x/a)^2))Substitute u =x/a, du = dx/aIntegralbecomes (1/a)int du/(1+u^2)Antiderivative(1/a) arctan(u) +CBack-substituteu = x/a

Real-world use

Where it is used

Bayesian updating with certain conjugate structures, kernel-style rational features, and any model where bell-like tails appear as rational functions rather than Gaussians.

Problem it solves

Turns a rational integrand into a log-free closed form (contrast with log rules for linear denominators).

How it solves the problem

Uses ddxarctan⁡(x/a)=aa2+x2\dfrac{d}{dx}\arctan(x/a)=\dfrac{a}{a^2+x^2}; adjust the prefactor 1/a1/a to match your integrand.

Example in a business

A survival-analysis derivation produces ∫11+t2 dt\int \frac{1}{1+t^2}\,dt after nondimensionalizing time; the result is arctan⁡(t)+C\arctan(t)+C, used to express a closed-form segment of a cumulative hazard in a prototype.

The formula, piece by piece

Symbol Meaning
aa Nonzero constant; usually a>0a>0
xx Integration variable
arctan⁡(x/a)\arctan(x/a) Inverse tangent, radians
∫1a2+x2 dx=1aarctan⁡ ⁣(xa)+C(a≠0)\int \frac{1}{a^2 + x^2}\,dx = \frac{1}{a}\arctan\!\left(\frac{x}{a}\right) + C \quad (a \neq 0)
(2)

The formula in words

The “+x2+x^2” denominator pairs with arctan, just as the “−x2-x^2” under a square root pairs with arcsin.

Critical Concepts

  • Missing 1/a1/a factor is the most common algebra mistake.
  • For ∫1x2+1 dx\int \frac{1}{x^2+1}\,dx, take a=1a=1: result is arctan⁡(x)+C\arctan(x)+C.
  • Definite integrals over (−∞,∞)(-\infty,\infty) tie to π\pi (Cauchy normalization).

Step-by-step calculation (tiny example)

Step 1: Standardize ∫14+x2 dx\displaystyle \int \frac{1}{4+x^2}\,dx: here a=2a=2.

Step 2: Apply formula

∫14+x2 dx=12arctan⁡ ⁣(x2)+C\int \frac{1}{4+x^2}\,dx = \frac{1}{2}\arctan\!\left(\frac{x}{2}\right) + C
(3)

Step 3: Derivative check ddx[12arctan⁡(x/2)]=12⋅11+(x/2)2⋅12=14+x2\dfrac{d}{dx}\left[\frac{1}{2}\arctan(x/2)\right] =\frac{1}{2}\cdot\frac{1}{1+(x/2)^2}\cdot\frac{1}{2} =\frac{1}{4+x^2}.

Code examples

Beginner example (Python)

python
import numpy as np
a = 2.0
xs = np.linspace(-5, 5, num=11)
F = (1 / a) * np.arctan(xs / a)
dF = np.gradient(F, xs)
integrand = 1.0 / (a**2 + xs**2)
print(np.allclose(dF, integrand, rtol=0.03))

Beginner example (R)

r
a <- 2
xs <- seq(-5, 5, length.out = 11)
F <- (1 / a) * atan(xs / a)
dF <- diff(F) / diff(xs)
xmid <- xs[-1] - diff(xs) / 2
integrand <- 1 / (a^2 + xmid^2)
print(mean(abs(dF - integrand)) < 0.04)

Professional example (Python)

python
import numpy as np

RANDOM_SEED = 42


def arctan_antiderivative(x: np.ndarray, a: float) -> np.ndarray:
    if a == 0:
        raise ValueError("a must be nonzero")
    return (1.0 / a) * np.arctan(x / a)


if __name__ == "__main__":
    rng = np.random.default_rng(RANDOM_SEED)
    a = 1.5
    x = rng.normal(size=4)
    print(np.round(arctan_antiderivative(x, a), 4))

Professional example (R)

r
set.seed(42)
a <- 1.5
x <- rnorm(4)
print(round((1 / a) * atan(x / a), 4))

Source: domain knowledge

#calculus#integral-calculus#standard-integrals

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close