hcju/proofwikiqa huggingface dataset:
With a view to expressing the primitive in the form: :$\displaystyle \int u \frac {\d v} {\d x} \rd x = u v - \int v \frac {\d u} {\d x} \rd x$ let: {{begin-eqn}} {{eqn | l = u       | r = \sin^{m - 1} a x       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = \paren {m - 1} a \sin^{m - 2} a x \cos a x       | c = Derivative of $\sin a x$, Derivative of Power, Chain Rule for Derivatives }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\d v} {\d x}       | r = \frac {\sin a x} {\cos^n a x}       | c =  }} {{eqn | r = \cos^{-n} a x \sin a x       | c =  }} {{eqn | ll= \leadsto       | l = v       | r = \frac {-\cos^{-n + 1} a x} {a \paren {-n + 1} }       | c = Primitive of $\cos^n a x \sin a x$ }} {{eqn | r = \frac 1 {a \paren {n - 1} \cos^{n - 1} a x}       | c =  }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int \frac {\sin^m a x} {\cos^n a x} \rd x       | r = \int \sin^{m - 1} a x \frac {\sin a x} {\cos^n a x} \rd x        | c =  }} {{eqn | r = \paren {\sin^{m - 1} a x} \paren {\frac 1 {a \paren {n - 1} \cos^{n - 1} a x} }       | c = Integration by Parts }} {{eqn | o =        | ro= -       | r = \int \paren {\frac 1 {a \paren {n - 1} \cos^{n - 1} a x} } \paren {\paren {m - 1} a \sin^{m - 2} a x \cos a x} \rd x + C       | c =  }} {{eqn | r = \frac {\sin^{m - 1} a x} {a \paren {n - 1} \cos^{n - 1} a x} - \frac {m - 1} {n - 1} \int \frac {\sin^{m - 2} a x} {\cos^{n - 2} a x} \rd x + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | r = \frac {\sin^{m + 1} a x} {a \left({n - 1}\right) \cos^{n - 1} a x} - \frac {m + 1} {n - 1} \int \frac {\sin^m a x} {\cos^{n - 2} a x} \ \mathrm d x + C       | o =        | c =  }} {{eqn | r = \int \frac {\sin^{m + 2} a x} {\cos^n a x} \ \mathrm d x       | c = Primitive of $\dfrac {\sin^m a x} {\cos^n a x}$: Reduction of Both Powers }} {{eqn | r = \int \frac {\sin^m a x \left({1 - \cos^2 a x}\right)} {\cos^n a x} \ \mathrm d x       | c = Sum of Squares of Sine and Cosine }} {{eqn | r = \int \frac {\sin^m a x} {\cos^n a x} \ \mathrm d x - \int \frac {\sin^m a x \cos^2 a x} {\cos^n a x} \ \mathrm d x       | c = Linear Combination of Integrals }} {{eqn | r = \int \frac {\sin^m a x} {\cos^n a x} \ \mathrm d x - \int \frac {\sin^m a x} {\cos^{n - 2} a x} \ \mathrm d x       | c = simplifying }} {{end-eqn}} Hence, rearranging: {{begin-eqn}} {{eqn | l = \int \frac {\sin^m a x} {\cos^n a x} \ \mathrm d x       | r = \frac {\sin^{m + 1} a x} {a \left({n - 1}\right) \cos^{n - 1} a x} - \frac {m + 1} {n - 1} \int \frac {\sin^m a x} {\cos^{n - 2} a x} \ \mathrm d x + \int \frac {\sin^m a x} {\cos^{n - 2} a x} \ \mathrm d x + C       | c =  }} {{eqn | r = \frac {\sin^{m + 1} a x} {a \left({n - 1}\right) \cos^{n - 1} a x} - \frac {m + 1} {n - 1} \int \frac {\sin^m a x} {\cos^{n - 2} a x} \ \mathrm d x - \frac {-n + 1} {n - 1} \int \frac {\sin^m a x} {\cos^{n - 2} a x} \ \mathrm d x + C       | c = common denominator }} {{eqn | r = \frac {\sin^{m + 1} a x} {a \left({n - 1}\right) \cos^{n - 1} a x} - \frac {m - n + 2} {n - 1} \int \frac {\sin^m a x} {\cos^{n - 2} a x} \ \mathrm d x + C       | c =  }} {{end-eqn}} {{qed}}
With a view to expressing the primitive in the form: :$\displaystyle \int u \frac {\d v} {\d x} \rd x = u v - \int v \frac {\d u} {\d x} \rd x$ let: {{begin-eqn}} {{eqn | l = u       | r = \cos^{m - 1} a x       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = -\paren {m - 1} a \cos^{m - 2} a x \sin a x       | c = Derivative of $\cos a x$, Derivative of Power, Chain Rule for Derivatives }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\d v} {\d x}       | r = \frac {\cos a x} {\sin^n a x}       | c =  }} {{eqn | r = \sin^{-n} a x \cos a x       | c =  }} {{eqn | ll= \leadsto       | l = v       | r = \frac {\sin^{-n + 1} a x} {a \paren {-n + 1} }       | c = Primitive of $\sin^n a x \cos a x$ }} {{eqn | r = \frac {-1} {a \paren {n - 1} \sin^{n - 1} a x}       | c =  }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int \frac {\cos^m a x} {\sin^n a x} \rd x       | r = \int \cos^{m - 1} a x \frac {\cos a x} {\sin^n a x} \rd x        | c =  }} {{eqn | r = \paren {\cos^{m - 1} a x} \paren {\frac {-1} {a \paren {n - 1} \sin^{n - 1} a x} }       | c = Integration by Parts }} {{eqn | o =        | ro= -       | r = \int \paren {\frac {-1} {a \paren {n - 1} \sin^{n - 1} a x} } \paren {-\paren {m - 1} a \cos^{m - 2} a x \sin a x } \rd x + C       | c =  }} {{eqn | r = \frac {-\cos^{m - 1} a x} {a \paren {n - 1} \sin^{n - 1} a x} - \frac {m - 1} {n - 1} \int \frac {\cos^{m - 2} a x} {\sin^{n - 2} a x} \rd x + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | r = \frac {-\cos^{m + 1} a x} {a \paren {n - 1} \sin^{n - 1} a x} - \frac {m + 1} {n - 1} \int \frac {\cos^m a x} {\sin^{n - 2} a x} \rd x + C       | o =        | c =  }} {{eqn | r = \int \frac {\cos^{m + 2} a x} {\sin^n a x} \rd x       | c = Primitive of $\dfrac {\cos^m a x} {\sin^n a x}$: Reduction of Both Powers }} {{eqn | r = \int \frac {\cos^m a x \paren {1 - \sin^2 a x} } {\sin^n a x} \rd x       | c = Sum of Squares of Sine and Cosine }} {{eqn | r = \int \frac {\cos^m a x} {\sin^n a x} \rd x - \int \frac {\cos^m a x \sin^2 a x} {\sin^n a x} \rd x       | c = Linear Combination of Integrals }} {{eqn | r = \int \frac {\cos^m a x} {\sin^n a x} \rd x - \int \frac {\cos^m a x} {\sin^{n - 2} a x} \rd x       | c = simplifying }} {{end-eqn}} Hence, rearranging: {{begin-eqn}} {{eqn | l = \int \frac {\cos^m a x} {\sin^n a x} \rd x       | r = \frac {-\cos^{m + 1} a x} {a \paren {n - 1} \sin^{n - 1} a x} - \frac {m + 1} {n - 1} \int \frac {\cos^m a x} {\sin^{n - 2} a x} \rd x + \int \frac {\cos^m a x} {\sin^{n - 2} a x} \rd x + C       | c =  }} {{eqn | r = \frac {-\cos^{m + 1} a x} {a \paren {n - 1} \sin^{n - 1} a x} - \frac {m + 1} {n - 1} \int \frac {\cos^m a x} {\sin^{n - 2} a x} \rd x - \frac {-n + 1} {n - 1} \int \frac {\cos^m a x} {\sin^{n - 2} a x} \rd x + C       | c = common denominator }} {{eqn | r = \frac {-\cos^{m + 1} a x} {a \paren {n - 1} \sin^{n - 1} a x} - \frac {m - n + 2} {n - 1} \int \frac {\cos^m a x} {\sin^{n - 2} a x} \rd x + C       | c =  }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\mathrm d x} {\sin^m a x \cos^n a x}       | r = \int \frac {\sin^{-m} a x \ \mathrm d x} {\cos^n a x}       | c =  }} {{eqn | r = \frac {\sin^{-m + 1} a x} {a \left({n - 1}\right) \cos^{n - 1} a x} - \frac {-m - n + 2} {n - 1} \int \frac {\sin^{-m} a x} {\cos^{n - 2} a x} \ \mathrm d x + C       | c = Primitive of $\dfrac {\sin^m a x} {\cos^n a x}$ }} {{eqn | r = \frac 1 {a \left({n - 1}\right) \sin^{m - 1} a x \cos^{n - 1} a x} + \frac {m + n - 2} {n - 1} \int \frac {\mathrm d x} {\sin^m a x \cos^{n - 2} a x} + C       | c =  }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {\sin^m a x \cos^n a x}       | r = \int \frac {\cos^{-n} a x \rd x} {\sin^m a x}       | c =  }} {{eqn | r = \frac {-\cos^{-n + 1} a x} {a \paren {m - 1} \sin^{m - 1} a x} - \frac {-n - m + 2} {m - 1} \int \frac {\cos^{-n} a x} {\sin^{m - 2} a x} \rd x + C       | c = Primitive of $\dfrac {\cos^m a x} {\sin^n a x}$ }} {{eqn | r = \frac {-1} {a \paren {n - 1} \sin^{m - 1} a x \cos^{n - 1} a x} + \frac {m + n - 2} {m - 1} \int \frac {\d x} {\sin^{m - 2} a x \cos^n a x} + C       | c =  }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \tan x \rd x       | r = -\ln \size {\cos x}       | c = Primitive of $\tan x$: Cosine Form }} {{eqn | ll= \leadsto       | l = \int \tan a x \rd x       | r = \frac 1 a \paren {-\ln \size {\cos a x} } + C       | c = Primitive of Function of Constant Multiple }} {{eqn | r = \frac {-\ln \size {\cos a x} } a + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \tan x \rd x       | r = \ln \size {\sec x}       | c = Primitive of $\tan x$: Secant Form }} {{eqn | ll= \leadsto       | l = \int \tan a x \rd x       | r = \frac 1 a \paren {\ln \size {\sec a x} } + C       | c = Primitive of Function of Constant Multiple }} {{eqn | r = \frac {\ln \size {\sec a x} } a + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \tan^2 x \ \mathrm d x       | r = \tan x - x + C       | c = Primitive of $\tan^2 x$ }} {{eqn | ll= \implies       | l = \int \tan^2 a x \ \mathrm d x       | r = \frac 1 a \left({\tan a x - a x}\right)+ C       | c = Primitive of Function of Constant Multiple }} {{eqn | r = \frac {\tan a x} a - x  + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \tan^3 a x \rd x       | r = \int \tan a x \tan^2 a x \rd x       | c =  }} {{eqn | r = \int \tan a x \paren {\sec^2 a x - 1} \rd x       | c = Difference of Squares of Secant and Tangent }} {{eqn | r = \int \tan a x \sec^2 a x \rd x - \int \tan a x \rd x       | c = Linear Combination of Integrals }} {{eqn | r = \frac {\tan^2 a x} {2 a} - \int \tan a x \rd x + C       | c = Primitive of $\tan^n a x \sec^2 a x$: $n = 1$ }} {{eqn | r = \frac {\tan^2 a x} {2 a} - \paren {\frac {-\ln \size {\cos a x} } a} + C       | c = Primitive of $\tan a x$ }} {{eqn | r = \frac {\tan^2 a x} {2 a} + \frac 1 a \ln \size {\cos a x} + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn	| l = I_n 	| r = \int \map {\tan^n} {a x} \rd x }} {{eqn	| r = \frac {\map {\tan^{n - 1} } {a x} } {a \paren {n - 1} } - I_{n - 2}  	| c = Reduction Formula for Integral of Power of Tangent }} {{eqn	| l = I_1 	| r = -\frac 1 a \ln \size {\map \cos {a x} } + C 	| c = Primitive of $\tan a x$: Cosine Form }} {{eqn	| ll = \leadsto 	| l = I_3 	| r = \frac {\map {\tan^2} {a x} } {2 a} + \frac 1 a \ln \size {\map \cos {a x} } + C' }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = z       | r = \tan a x       | c =  }} {{eqn | ll= \implies       | l = \frac {\d z} {\d x}       | r = a \sec^2 a x       | c = Derivative of Tangent Function: Corollary }} {{eqn | ll= \implies       | l = \int \tan^n a x \sec^2 a x \rd x       | r = \int \frac 1 a z^n \rd z       | c = Integration by Substitution }} {{eqn | r = \frac 1 a \frac {z^{n + 1} } {n + 1}       | c = Primitive of Power }} {{eqn | r = \frac {\tan^{n + 1} a x} {\paren {n + 1} a} + C       | c = substituting for $z$ and simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \cot x \rd x       | r = \ln \size {\sin x}       | c = Primitive of $\cot x$ }} {{eqn | ll= \leadsto       | l = \int \cot a x \rd x       | r = \frac 1 a \paren {\ln \size {\sin a x} } + C       | c = Primitive of Function of Constant Multiple }} {{eqn | r = \frac {\ln \size {\sin a x} } a + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {\tan a x}       | r = \int \cot a x \rd x       | c = Cotangent is Reciprocal of Tangent }} {{eqn | r = \frac 1 a \ln \size {\sin a x} + C       | c = Primitive of $\cot a x$ }} {{end-eqn}} {{qed}}
From Power Series Expansion for Tangent Function: {{:Power Series Expansion for Tangent Function}} {{begin-eqn}} {{eqn | l = x \tan ax       | r = \sum_{n \mathop = 1}^\infty \frac {\paren {-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} a^{2 n - 1} x^{2 n} } {\paren {2 n}!}       | c = }} {{eqn | ll= \leadsto       | l = \int x \tan a x \rd x       | r = \int \sum_{n \mathop = 1}^\infty \frac {\paren {-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} a^{2 n - 1} x^{2 n} } {\paren {2 n}!} \rd x       | c = }} {{eqn | r = \sum_{n \mathop = 1}^\infty \paren {\int \frac {\paren{-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} a^{2 n - 1} x^{2 n} } {\paren {2 n}!} \rd x}       | c = }} {{eqn | r = \sum_{n \mathop = 1}^\infty \paren {\frac {\paren {-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} a^{2 n - 1} } {\paren {2 n}!} \times \int x^{2 n} \rd x}       | c = }} {{eqn | r = \sum_{n \mathop = 1}^\infty \paren {\frac {\paren {-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} a^{2 n - 1} } {\paren {2 n}!} \times \frac {x^{2 n + 1} } {2 n + 1} + C}       | c = Primitive of Power }} {{eqn | r = \sum_{n \mathop = 1}^\infty \frac {\paren {-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} a^{2 n - 1} x^{2 n + 1} } {\paren {2 n + 1}!} + C       | c = }} {{eqn | ll= \leadsto       | l = \int x \tan a x \rd x       | r = \frac 1 {a ^ 2} \sum_{n \mathop = 1}^\infty \frac {\paren {-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} \paren {a x}^{2 n + 1} } {\paren {2 n + 1}!} + C       | c = }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\tan a x} x \ \mathrm d x       | r = \int \frac 1 x \sum_{n \mathop = 1}^\infty \frac {\paren {-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} \paren {a x}^{2 n - 1} } {\paren {2 n}!} \ \mathrm d x       | c = Power Series Expansion for Tangent Function }} {{eqn | r = \sum_{n \mathop = 1}^\infty \frac {\paren {-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} a^{2 n - 1} } {\paren {2 n}!} \int  x^{2 n - 2} \ \mathrm d x       | c = Primitive of Constant Multiple of Function }} {{eqn | r = \sum_{n \mathop = 1}^\infty \frac {\paren {-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} a^{2 n - 1} } {\paren {2 n}!} \paren {\frac {x^{2 n - 1} } {2 n - 1} } + C       | c = Primitive of Power }} {{eqn | r = \sum_{n \mathop = 1}^\infty \frac {\paren {-1}^{n - 1} 2^{2 n} \paren {2^{2 n} - 1} B_{2 n} \paren {a x}^{2 n - 1} } {\paren {2 n - 1} \paren {2 n}!} + C       | c =  }} {{end-eqn}} {{qed}}
With a view to expressing the primitive in the form: :$\displaystyle \int u \frac {\mathrm d v}{\mathrm d x} \ \mathrm d x = u v - \int v \frac {\mathrm d u}{\mathrm d x} \ \mathrm d x$ let: {{begin-eqn}} {{eqn | l = u       | r = x       | c =  }} {{eqn | ll= \implies       | l = \frac {\mathrm d u} {\mathrm d x}       | r = 1       | c = Primitive of Power }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\mathrm d v} {\mathrm d x}       | r = \tan^2 a x       | c =  }} {{eqn | ll= \implies       | l = v       | r = \frac {\tan a x} a - x       | c = Primitive of $\tan^2 a x$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int x \tan^2 a x \ \mathrm d x       | r = x \left({\frac {\tan a x} a - x}\right) - \int \left({\frac {\tan a x} a - x}\right) \ \mathrm d x + C       | c = Integration by Parts }} {{eqn | r = \frac {x \tan a x} a - x^2 - \int \left({\frac {\tan a x} a - x}\right) \ \mathrm d x + C       | c = simplifying }} {{eqn | r = \frac {x \tan a x} a - x^2 - \frac 1 a \int \tan a x \ \mathrm d x + \int x \ \mathrm d x + C       | c = Linear Combination of Integrals }} {{eqn | r = \frac {x \tan a x} a - x^2 - \frac 1 a \left({\frac {-\ln \left\vert {\cos a x}\right\vert} a}\right) + \int x \ \mathrm d x + C       | c = Primitive of $\tan a x$ }} {{eqn | r = \frac {x \tan a x} a - x^2 + \frac 1 {a^2} \ln \left\vert {\cos a x}\right\vert + \frac {x^2} 2 + C       | c = Primitive of Power }} {{eqn | r = \frac {x \tan a x} a + \frac 1 {a^2} \ln \left\vert{\cos a x}\right\vert - \frac {x^2} 2 + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \tan^n a x \ \mathrm d x       | r = \int \tan^{n - 2} a x \tan^2 a x \ \mathrm d x       | c =  }} {{eqn | r = \int \tan^{n - 2} a x \left({\sec^2 a x - 1}\right) \ \mathrm d x       | c = Difference of Squares of Secant and Tangent }} {{eqn | r = \int \tan^{n - 2} a x \sec^2 a x \ \mathrm d x - \int \tan^{n - 2} \ \mathrm d x       | c = Linear Combination of Integrals }} {{eqn | r = \frac {\tan^{n - 1} a x} {\left({n - 1}\right) a} - \int \tan^{n - 2} \ \mathrm d x + C       | c = Primitive of $\tan^n a x \sec^2 a x$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \cot^2 x \rd x       | r = -\cot x - x       | c = Primitive of $\cot^2 x$ }} {{eqn | ll= \leadsto       | l = \int \cot a x \rd x       | r = \frac 1 a \paren {-\cot a x - a x} + C       | c = Primitive of Function of Constant Multiple }} {{eqn | r = \frac {-\cot a x} a - x + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \cot^3 x \rd x       | r = \int \cot a x \cot^2 a x \rd x       | c =  }} {{eqn | r = \int \cot a x \paren {\csc^2 a x - 1} \rd x       | c = Difference of Squares of Cosecant and Cotangent }} {{eqn | r = \int \cot a x \csc^2 a x \rd x - \int \cot a x \rd x       | c = Linear Combination of Integrals }} {{eqn | r = \frac {-\cot^2 a x} {2 a} - \int \cot a x \rd x + C       | c = Primitive of $\cot^n a x \csc^2 a x$: $n = 1$ }} {{eqn | r = \frac {-\cot^2 a x} {2 a} - \paren {\frac {\ln \size {\sin a x} } a} + C       | c = Primitive of $\cot a x$ }} {{eqn | r = \frac {-\cot^2 a x} {2 a} - \frac 1 a \ln \size {\sin a x} + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = z       | r = \cot a x       | c =  }} {{eqn | ll= \implies       | l = \frac {\mathrm d z} {\mathrm d x}       | r = -a \csc^2 a x       | c = Derivative of Cotangent Function: Corollary }} {{eqn | ll= \implies       | l = \int \cot^n a x \csc^2 a x \ \mathrm d x       | r = \int \frac {-1} a z^n \ \mathrm d z       | c = Integration by Substitution }} {{eqn | r = \frac {-1} a \frac {z^{n + 1} } {n + 1}       | c = Primitive of Power }} {{eqn | r = \frac {-\cot^{n + 1} a x} {\left({n + 1}\right) a} + C       | c = substituting for $z$ and simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \frac {\mathrm d} {\mathrm d x} \cot x       | r = -\csc^2 x       | c = Derivative of Cotangent Function }} {{eqn | ll= \implies       | l = \int \frac {\csc^2 x \ \mathrm d x} {\cot x}       | r = -\ln \left\vert{\cot a x}\right\vert + C       | c = Primitive of Function under its Derivative }} {{eqn | ll= \implies       | l = \int \frac {\csc^2 a x \ \mathrm d x} {\cot a x}       | r = \frac 1 a \left({-\ln \left\vert{\cot a x}\right\vert}\right) + C       | c = Primitive of Function of Constant Multiple }} {{eqn | r = \frac {-\ln \left\vert{\cot a x}\right\vert} a + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {\cot a x}       | r = \int \tan a x \rd x       | c = Cotangent is Reciprocal of Tangent }} {{eqn | r = \frac {-\ln \size {\cos a x} } a + C       | c = Primitive of $\tan a x$ }} {{end-eqn}} {{qed}}
From Power Series Expansion for Cotangent Function: {{:Power Series Expansion for Cotangent Function}} {{begin-eqn}} {{eqn | l = x \cot ax       | r = \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} x^{2 n} } {\paren {2 n}!}       | c = }} {{eqn | ll= \leadsto       | l = \int x \cot a x \rd x       | r = \int \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} x^{2 n} } {\paren {2 n}!} \rd x       | c = }} {{eqn | r = \sum_{n \mathop = 0}^\infty \paren {\int \frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} x^{2 n} } {\paren {2 n}!} \rd x}       | c = }} {{eqn | r = \sum_{n \mathop = 0}^\infty \paren {\frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} } {\paren {2 n}!} \times \int x^{2 n} \rd x}       | c = }} {{eqn | r = \sum_{n \mathop = 0}^\infty \paren {\frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} } {\paren {2 n}!} \times \frac {x^{2 n + 1} } {2 n + 1} + C}       | c = Primitive of Power }} {{eqn | r = \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} x^{2 n + 1} } {\paren {2 n + 1}!} + C       | c = }} {{eqn | ll= \leadsto       | l = \int x \cot a x \rd x       | r = \frac 1 {a^2} \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} \paren {a x}^{2 n + 1} } {\paren {2 n + 1}!} + C       | c = }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\csc a x} x \ \mathrm d x       | r = \int \frac 1 x \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} \paren {a x}^{2 n - 1} } {\paren {2 n}!} \ \mathrm d x       | c = Power Series Expansion for Cosecant Function }} {{eqn | r = \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} } {\paren {2 n}!} \int  x^{2 n - 2} \ \mathrm d x       | c = Primitive of Constant Multiple of Function }} {{eqn | r = \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} } {\paren {2 n}!} \paren {\frac {x^{2 n - 1} } {2 n - 1} } + C       | c = Primitive of Power }} {{eqn | r = \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} \paren {a x}^{2 n - 1} } {\paren {2 n - 1} \paren {2 n}!} + C       | c =  }} {{end-eqn}} {{qed}}
With a view to expressing the primitive in the form: :$\displaystyle \int u \frac {\mathrm d v}{\mathrm d x} \ \mathrm d x = u v - \int v \frac {\mathrm d u}{\mathrm d x} \ \mathrm d x$ let: {{begin-eqn}} {{eqn | l = u       | r = x       | c =  }} {{eqn | ll= \implies       | l = \frac {\mathrm d u} {\mathrm d x}       | r = 1       | c = Primitive of Power }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\mathrm d v} {\mathrm d x}       | r = \cot^2 a x       | c =  }} {{eqn | ll= \implies       | l = v       | r = \frac {-\cot a x} a - x       | c = Primitive of $\cot^2 a x$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int x \cot^2 a x \ \mathrm d x       | r = x \left({\frac {-\cot a x} a - x}\right) - \int \left({\frac {-\cot a x} a - x}\right) \ \mathrm d x + C       | c = Integration by Parts }} {{eqn | r = \frac {-x \cot a x} a - x^2 + \int \left({\frac {\cot a x} a + x}\right) \ \mathrm d x + C       | c = simplifying }} {{eqn | r = \frac {-x \cot a x} a - x^2 + \frac 1 a \int \cot a x \ \mathrm d x + \int x \ \mathrm d x + C       | c = Linear Combination of Integrals }} {{eqn | r = \frac {-x \cot a x} a - x^2 + \frac 1 a \left({\frac {\ln \left\vert {\sin a x}\right\vert} a}\right) + \int x \ \mathrm d x + C       | c = Primitive of $\cot a x$ }} {{eqn | r = \frac {-x \cot a x} a - x^2 + \frac 1 {a^2} \ln \left\vert {\sin a x}\right\vert + \frac {x^2} 2 + C       | c = Primitive of Power }} {{eqn | r = \frac {-x \cot a x} a + \frac 1 {a^2} \ln \left\vert{\sin a x}\right\vert - \frac {x^2} 2 + C       | c = simplifying }} {{end-eqn}} {{qed}}
We have: :$\dfrac \d {\d x} \paren {p \sin a x + q \cos a x} = a p \cos a x - a q \sin a x$ Thus: {{begin-eqn}} {{eqn | l = \int \frac {\d x} {p + q \cot a x}       | r = \int \frac {\d x} {p + q \dfrac {\cos a x} {\sin a x} }       | c = Cotangent is Cosine divided by Sine }} {{eqn | r = \int \frac {\sin a x \rd x} {p \sin a x + q \cos a x}       | c =  }} {{eqn | r = \frac 1 {p^2 + q^2} \int \frac {\paren {p^2 + q^2} \sin a x \rd x} {p \sin a x + q \cos a x}       | c =  }} {{eqn | r = \frac 1 {p^2 + q^2} \int \frac {p^2 \sin a x + p q \cos a x - p q \cos a x + q^2 \sin a x} {p \sin a x + q \cos a x} \rd x       | c =  }} {{eqn | r = \frac 1 {p^2 + q^2} \paren {\int \frac {p^2 \sin a x + p q \cos a x} {p \sin a x + q \cos a x} \rd x + \int \frac {- p q \cos a x + q^2 \sin a x} {p \sin a x + q \cos a x} \rd x}       | c =  }} {{eqn | r = \frac 1 {p^2 + q^2} \paren {\int p \rd x - \frac q a \int \frac {\map \d {p \sin a x + q \cos a x} } {p \sin a x + q \cos a x} }       | c =  }} {{eqn | r = \frac {p x} {p^2 + q^2} - \frac q {a \paren {p^2 + q^2} } \ln \size {p \sin a x + q \cos a x} + C       | c = Primitive of Constant and Primitive of Reciprocal }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \cot^n a x \ \mathrm d x       | r = \int \cot^{n - 2} a x \cot^2 a x \ \mathrm d x       | c =  }} {{eqn | r = \int \cot^{n - 2} a x \left({\csc^2 a x - 1}\right) \ \mathrm d x       | c = Difference of Squares of Cosecant and Cotangent }} {{eqn | r = \int \cot^{n - 2} a x \csc^2 a x \ \mathrm d x - \int \cot^{n - 2} \ \mathrm d x       | c = Linear Combination of Integrals }} {{eqn | r = \frac {-\cot^{n - 1} a x} {\left({n - 1}\right) a} - \int \cot^{n - 2} \ \mathrm d x + C       | c = Primitive of $\cot^n a x \csc^2 a x$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \sec^3 x \rd x       | r = \frac {\sec a x \tan a x} {2 a} + \frac 1 2 \int \sec a x \rd x       | c = Primitive of $\sec^n a x$ where $n = 3$ }} {{eqn | r = \frac {\sec a x \tan a x} {2 a} + \frac 1 2 \paren {\frac 1 a \ln \size {\sec a x + \tan a x} }       | c = Primitive of $\sec a x$ }} {{eqn | r = \frac 1 {2 a} \paren {\sec a x \tan a x + \ln \size {\sec a x + \tan a x} } + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {\sec a x}       | r = \int \cos a x \rd x       | c = Secant is Reciprocal of Cosine }} {{eqn | r = \frac {\sin a x} a + C       | c = Primitive of $\cos a x$ }} {{end-eqn}} {{qed}}