# Integration of Trigonometric Functions.

Beneath this mask there is more than flesh. Beneath this mask there is an idea, Mr. Creedy, and ideas are bulletproof, V for Vendetta

In calculus, an antiderivative or indefinite integral, G, of a function g, is the function that can be differentiated to obtain the original function, that is, G’ = f.

G(x) = $\int f(x)dx$

Trigonometry is a branch of mathematics that deals with the relationships between the sides and angles of triangles.

Well-known formulas: sin2(θ) + cos2(θ) = 1, cos(2θ) = cos2(θ) -sin2(θ), sin(2θ) = 2sin(θ)cos(θ). $sec(θ) = \frac{1}{cos(θ)}, tan(θ)=\frac{sin(θ)}{cos(θ)}, csc(θ) = \frac{1}{sin(θ)}, ctn(θ)=\frac{cos(θ)}{sin(θ)}$.

cos(2θ) = cos2(θ) -sin2(θ) =[sin2(θ) + cos2(θ) = 1] cos2(θ) -(1 - cos2(θ)) = 2cos2(θ) -1 ⇒ cos2(θ) = (1 + cos(2θ))2. Similarly, sin2(θ) = (1 - cos(2θ))2.

Futhermore, sin’(x) = cos(x), cos’(x) = -sin(x), sec2(x) = 1 + tan2(x), tan’(x) = sec2(x), sec’(x) = sec(x)tan(x), ∫sin(x)dx = -cos x + C, ∫cos(x)dx = sin(x) + C, ∫sec2(x)dx = tan(x) + C, ∫cosec2(x)dx = -cot(x) + C, ∫sec(x)tan(x)dx = sec(x) + C, ∫cosec(x)cot(x)dx = -cosec(x) + C, ∫tan(x)dx = -ln|cos(x)| + C.

Let’s check sec2(x) = $\frac{1}{cos^2(x)} = \frac{cos^2(x)+sin^2(x)}{cos^2(x)} = 1 + tan^2(x)$. Similarly, $\frac{d}{dx}tan(x) = \frac{d}{dx}\frac{sin(x)}{cos(x)} = \frac{cos^2(x)+sin^2(x)}{cos^2(x)} = \frac{1}{cos^2(x)}=sec^2(x)$. Besides, $\frac{d}{dx} sec(x) = \frac{d}{dx} \frac{1}{cos(x)} = \frac{sin(x)}{cos^2(x)} = sec(x)tan(x).$

$\int tan(x)dx = \int \frac{sin(x)}{cos(x)}dx$ [Substitution, u = cos(x), du = -sin(x)dx] =$\int \frac{-du}{u}dx = -ln|u| + C = -ln|cos(x)| + C.$

$\int sec(x)dx$ [u = sec(x)+tan(x), (sec(x)+tan(x))’=(sec(x)tan(x)+sec2(x))=(sec(x) +tan(x))·sec(x), u’ = u·sec(x) ⇒ sec(x) = u’u = dduln|u|] = ln|sec(x) + tan(x)| + C.

Let’s try to solve $\int sin^n(x)cos^m(x)dx$, e.g., $\int sin^n(x)cos(x)dx$ =[Substitution u = sin(x), du = cos(x)dx] $\int u^ndu = \frac{u^{n+1}}{n+1} + C = \frac{sin^{n+1}(x)}{n+1} + C.$

$\int sin^3(x)cos^2(x)dx$ =[sin2(θ) + cos2(θ) = 1] =$\int (1-cos^2(x))sin(x)cos^2(x)dx = \int (cos^2(x)-cos^4(x))sin(x)dx$ =[Substitution u = cos(x), du = -sin(x)dx] $\int (u^2-u^4)(-du) = -\frac{u^3}{3}+\frac{u^5}{5} + C= -\frac{cos^3(x)}{3}+\frac{cos^5(x)}{5} + C$.

$\int sin^3(x)dx$ =[sin2(θ) + cos2(θ) = 1] =$\int (1-cos^2(x))sin(x)dx$ =[Substitution u = cos(x), du = -sin(x)dx] $\int (1-u^2)(-du) = -u + \frac{u^3}{3} + C = -cos(x)+\frac{cos^3(x)}{x} + C$.

$\int cos^2(x)dx$ =[cos2(θ) = (1 + cos(2θ))2] $\int \frac{1+cos(2x)}{2}dx = \frac{x}{2} + \frac{sin(2x)}{4} + C$

$\int sin^2(x)cos^2(x)dx$ =[$sin^2(x)cos^2(x) = \frac{1-cos(2x)}{2} \frac{1+cos(2x)}{2} = \frac{1-cos^2(2x)}{4} = \frac{1}{4}-\frac{1+cos(4x)}{8} = \frac{1}{8}-\frac{cos(4x)}{8}$] $\int \frac{1}{8}-\frac{cos(4x)}{8}dx = \frac{x}{8}-\frac{sin(x)}{8·4} + C = \frac{1}{8}(x -\frac{1}{4}sin(4x)) + C.$

Alternatively, $sin^2(x)cos^2(x) = (sin(x)cos(x))^2 = (\frac{sin(2x)}{2})^2 = \frac{sin^2(2x)}{4} = \frac{1}{4}(\frac{1-cos(4x)}{2})$.

Let’s compute the area of the section inside the circle with radius a and height b (Figure 1.a.).

Area = $\int_{0}^{b} \sqrt{a^2-y^2}dy$ =[y = asin(θ), $\sqrt{a^2-y^2} = \sqrt{a^2-a^2sin^2(θ)}$ = acos(θ) = x, dy = acos(θ)dθ] $\int acos(θ)(acos(θ)dθ) = a^2\int cos^2(θ)dθ =$[It was previously calculated] $a^2(\frac{θ}{2}+\frac{sin(2θ)}{4}) = a^2(\frac{θ}{2}+\frac{sin(θ)cos(θ)}{2}) = \frac{a^2arcsin(y/a)}{2}+ \frac{y(\sqrt{a^2-y^2})}{2}\bigg|_{0}^{b} = \frac{a^2arcsin(b/a)}{2}+ \frac{b(\sqrt{a^2-b^2})}{2} = \frac{a^2θ_0}{2}+ \frac{b(\sqrt{a^2-b^2})}{2}$ where $θ_0 = arcsin(\frac{b}{a})$.

Geometric interpretation. If you have a circle with radius r and a central angle θ (measured in radians), the area of the sector, aka Area1, is given by $\frac{1}{2}r^2θ = \frac{1}{2}a^2θ_0$. Area2 = $\frac{b(\sqrt{a^2-b^2})}{2}$ is the area of the upper triangle.

$\int sec^4(x)dx$ =[Recall sec2(x) = 1 + tan2(x)] $\int (1 + tan^2(x))sec^2(x)dx$ [Apply substitution, u = tan(x), du = sec2(x)dx] $\int (1 + u^2)du = u + \frac{u^3}{3} + C = tan(x) + \frac{tan^3(x)}{3} + C.$

$\int \frac{dx}{x^2\sqrt{1+x^2}}$ [Recall that sec2(x) = 1 + tan2(x), let’s apply substitution x = tan(θ), 1 + x2 = sec2(θ), dx = sec2(θ)dθ] $\int \frac{sec^2(θ)dθ}{(tan(θ))^2sec(θ)} = \int \frac{sec(θ)dθ}{(tan(θ))^2} = \int \frac{cos^2(θ)dθ}{cos(θ)sin^2(θ)} = \int \frac{cos(θ)dθ}{sin^2(θ)}$ [u = sin(θ), du = cos(θ)dθ] $\int \frac{du}{u^2} = \frac{-1}{u} + C = \frac{-1}{sin(θ)} + C = -csc(θ) + C$ [Figure 1.b.] = $-\frac{\sqrt{1+x^2}}{x}+C$

# Trigonometry substitution for integrals.

Trigonometric substitution is a powerful technique used in calculus to simplify and solve integrals involving radical expression.

1. Identify the form of the radical expression in the integral.
2. Choose a trigonometric function based on the form of the expression, e.g., if $\sqrt{a^2-x^2}$ is present consider using x = acos(θ) or x = asin(θ) to get asin(θ) or acos(θ) respectively. Similarly, if $\sqrt{a^2+x^2}$ is present, consider taking x = atan(θ) to get asec(θ) -Recall sec2(x) = 1 + tan2(x)-. Finally, if $\sqrt{x^2-a^2}$ is present consider using x = asec(θ), because x2-a2 = a2sec2(θ) -a2 = a2(sec2(θ)-1) = a2tan2(θ).
3. Substitute the chosen trigonometric function into the expression, expressing the indefinite variable x in terms of the trigonometric function.
4. Adjust the differential dx based on the chosen substitution, e.g., if x = asin(θ), dx = acos(θ)dθ.
5. Substitute and simplify the expression involving trigonometric functions and the adjusted differential into the original integral.
6. Integrate the simplified expression with respect to the new variable ($\theta$). After integration, back-substitute the original variable x in terms of θ. Simplify the expression further, if necessary, and include any constants of integration.

# Completing the square

It is another technique often used in calculus to simplify complex expressions to make integration more manageable.

1. Identify the quadratic expression, e.g., $\int \frac{dx}{\sqrt{x^2+4x}}$ is x2 + 4x.
2. If the coefficient of the quadratic term is not 1, factor it out, that is, divide every term by the coefficient of the quadratic term.
3. Complete the square, rewrite our expression as (x + a)2 + c, e.g., x2 + 4x = (x + 2)2 -4.
4. Make the substitution u = x +2, du = dx, so x2 + 4x = (x + 2)2 -4 = u2 -4, and rewrite the integral, $\frac{du}{\sqrt{u^2-4}}$.
5. Simplify the integral, integrate, and back-substitute the original variable. In our case, we use trigonometric substitution, as it was previously mentioned, u = 2sec(θ), du = 2sec(θ)tan(θ)dθ. $\int \frac{du}{\sqrt{u^2-4}} = \int \frac{2sec(θ)tan(θ)dθ}{\sqrt{4tan^2(θ)}} = \int \frac{2sec(θ)tan(θ)dθ}{2tan(θ)} = \int sec(θ)dθ = ln|sec(θ)+tan(θ)| + C = ln|\frac{u}{2}+\frac{\sqrt{u^2-4}}{2}| + C = ln|\frac{x+2}{2}+\frac{\sqrt{x^2+4x}}{2}|+C.$

# Bibliography

1. NPTEL-NOC IITM, Introduction to Galois Theory.
2. Algebra, Second Edition, by Michael Artin.
3. LibreTexts, Calculus. Abstract and Geometric Algebra, Abstract Algebra: Theory and Applications (Judson).
4. Field and Galois Theory, by Patrick Morandi. Springer.
5. Michael Penn, and MathMajor.
6. Contemporary Abstract Algebra, Joseph, A. Gallian.
7. YouTube’s Andrew Misseldine: Calculus. College Algebra and Abstract Algebra.
8. MIT OpenCourseWare 18.01 Single Variable Calculus, Fall 2007 and 18.02 Multivariable Calculus, Fall 2007.
9. Calculus Early Transcendentals: Differential & Multi-Variable Calculus for Social Sciences.
Bitcoin donation