quality:correction, structural:reformatting
Definition via integration

Another way to define the trigonometric functions in analysis is using integration. For a real number t {\displaystyle t}, put θ (t) = ∫ 0 t d τ 1 + τ 2 = arctan t {\displaystyle \theta (t)=\int _{0}^{t}{\frac {d\tau }{1+\tau ^{2}}}=\arctan t} where this defines this inverse tangent function. Also, π {\displaystyle \pi } is defined by 1 2 π = ∫ 0 ∞ d τ 1 + τ 2 {\displaystyle {\frac {1}{2}}\pi =\int _{0}^{\infty }{\frac {d\tau }{1+\tau ^{2}}}} a definition that goes back to Karl Weierstrass.

On the interval − π / 2 < θ < π / 2 {\displaystyle -\pi /2<\theta <\pi /2}, the trigonometric functions are defined by inverting the relation θ = arctan t {\displaystyle \theta =\arctan t}. Thus we define the trigonometric functions by tan θ = t, cos θ = (1 + t 2) − 1 / 2, sin θ = t (1 + t 2) − 1 / 2 {\displaystyle \tan \theta =t,\quad \cos \theta =(1+t^{2})^{-1/2},\quad \sin \theta =t(1+t^{2})^{-1/2}} where the point (t, θ) {\displaystyle (t,\theta)} is on the graph of θ = arctan t {\displaystyle \theta =\arctan t} and the positive square root is taken.

This defines the trigonometric functions on (− π / 2, π / 2) {\displaystyle (-\pi /2,\pi /2)}. The definition can be extended to all real numbers by first observing that, as θ → π / 2 {\displaystyle \theta \to \pi /2}, t → ∞ {\displaystyle t\to \infty }, and so cos θ = (1 + t 2) − 1 / 2 → 0 {\displaystyle \cos \theta =(1+t^{2})^{-1/2}\to 0} and sin θ = t (1 + t 2) − 1 / 2 → 1 {\displaystyle \sin \theta =t(1+t^{2})^{-1/2}\to 1}. Thus cos θ {\displaystyle \cos \theta } and sin θ {\displaystyle \sin \theta } are extended continuously so that cos (π / 2) = 0, sin (π / 2) = 1 {\displaystyle \cos(\pi /2)=0,\sin(\pi /2)=1}. Now the conditions cos (θ + π) = − cos (θ) {\displaystyle \cos(\theta +\pi)=-\cos(\theta)} and sin (θ + π) = − sin (θ) {\displaystyle \sin(\theta +\pi)=-\sin(\theta)} define the sine and cosine as periodic functions with period 2 π {\displaystyle 2\pi }, for all real numbers.

Proving the basic properties of sine and cosine, including the fact that sine and cosine are analytic, one may first establish the addition formulae. First, arctan s + arctan t = arctan (s + t 1 − s t) {\displaystyle \arctan s+\arctan t=\arctan({\frac {s+t}{1-st}})} holds, provided arctan s + arctan t ∈ (− π / 2, π / 2) {\displaystyle \arctan s+\arctan t\in (-\pi /2,\pi /2)}, since arctan s + arctan t = ∫ − s t d τ 1 + τ 2 = ∫ 0 s + t 1 − s t d τ 1 + τ 2 {\displaystyle \arctan s+\arctan t=\int _{-s}^{t}{\frac {d\tau }{1+\tau ^{2}}}=\int _{0}^{\frac {s+t}{1-st}}{\frac {d\tau }{1+\tau ^{2}}}} after the substitution τ → s + τ 1 − s τ {\displaystyle \tau \to {\frac {s+\tau }{1-s\tau }}}. In particular, the limiting case as s → ∞ {\displaystyle s\to \infty } gives arctan t + π 2 = arctan (− 1 / t), t ∈ (− ∞, 0). {\displaystyle \arctan t+{\frac {\pi }{2}}=\arctan(-1/t),\quad t\in (-\infty,0).} Thus we have sin (θ + π 2) = − 1 t 1 + (− 1 / t) 2 = − 1 1 + t 2 = − cos (θ) {\displaystyle \sin \left(\theta +{\frac {\pi }{2}}\right)={\frac {-1}{t{\sqrt {1+(-1/t)^{2}}}}}={\frac {-1}{\sqrt {1+t^{2}}}}=-\cos(\theta)} and cos (θ + π 2) = 1 1 + (− 1 / t) 2 = t 1 + t 2 = sin (θ). {\displaystyle \cos \left(\theta +{\frac {\pi }{2}}\right)={\frac {1}{\sqrt {1+(-1/t)^{2}}}}={\frac {t}{\sqrt {1+t^{2}}}}=\sin(\theta).} So the sine and cosine functions are related by translation over a quarter period π / 2 {\displaystyle \pi /2}.