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 = x       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = 1       | c = Primitive of Power }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\d v} {\d x}       | r = \frac 1 {1 + \cos a x}       | c =  }} {{eqn | ll= \leadsto       | l = v       | r = \frac 1 a \tan \frac {a x} 2       | c = Primitive of $\dfrac 1 {1 + \cos a x}$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int \frac {x \rd x} {1 + \cos a x}       | r = \int u \rd v       | c =  }} {{eqn | r = x \paren {\frac 1 a \tan \frac {a x} 2} - \int \paren {\frac 1 a \tan \frac {a x} 2} \rd x + C       | c = Integration by Parts }} {{eqn | r = \frac x a \tan \frac {a x} 2 - \frac 1 a \paren {\frac {-2} a \ln \size {\cos a x} } + C       | c = Primitive of $\tan a x$ }} {{eqn | r = \frac x a \tan \frac {a x} 2 + \frac 2 {a^2} \ln \size {\cos \frac {a x} 2} + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\mathrm d x} {\left({1 - \cos a x}\right)^2}       | r = \int \left({\frac 1 2 \csc^2 \frac {a x} 2}\right)^2 \ \mathrm d x       | c = Reciprocal of One Minus Cosine }} {{eqn | r = \frac 1 4 \int \csc^4 \frac {a x} 2 \ \mathrm d x       | c = simplifying }} {{eqn | r = \frac 1 4 \left({\frac{-\csc^2 \dfrac {a x} 2 \cot \dfrac {a x} 2} {\dfrac {3 a} 2} + \frac 2 3 \int \csc^2 \frac {a x} 2 \ \mathrm d x}\right) + C       | c = Primitive of $\csc^n a x$ }} {{eqn | r = \frac {-1} {6 a} \csc^2 \frac {a x} 2 \cot \dfrac {a x} 2 + \frac 1 6 \int \csc^2 \frac {a x} 2 \ \mathrm d x + C       | c = simplifying }} {{eqn | r = \frac {-1} {6 a} \csc^2 \frac {a x} 2 \cot \dfrac {a x} 2 + \frac 1 6 \left({\frac {-2} a \cot \frac {a x} 2}\right) + C       | c = Primitive of $\csc^2 a x$ }} {{eqn | r = \frac {-1} {6 a} \left({1 + \cot^2 \frac {a x} 2}\right) \cot \dfrac {a x} 2 - \frac 2 {6 a} \cot \frac {a x} 2 + C       | c = Difference of Squares of Cosecant and Cotangent }} {{eqn | r = \frac {-1} {2a} \cot \frac {a x} 2 - \frac 1 {6 a} \cot^3 \frac {a x} 2 + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\mathrm d x} {\left({1 + \cos a x}\right)^2}       | r = \int \left({\frac 1 2 \sec^2 \frac {a x} 2}\right)^2 \ \mathrm d x       | c = Reciprocal of One Plus Cosine }} {{eqn | r = \frac 1 4 \int \sec^4 \frac {a x} 2 \ \mathrm d x       | c = simplifying }} {{eqn | r = \frac 1 4 \left({\frac{\sec^2 \dfrac {a x} 2 \tan \dfrac {a x} 2} {\dfrac {3 a} 2} + \frac 2 3 \int \sec^2 \frac {a x} 2 \ \mathrm d x}\right) + C       | c = Primitive of $\sec^n a x$ }} {{eqn | r = \frac 1 {6 a} \sec^2 \frac {a x} 2 \tan \dfrac {a x} 2 + \frac 1 6 \int \sec^2 \frac {a x} 2 \ \mathrm d x + C       | c = simplifying }} {{eqn | r = \frac 1 {6 a} \sec^2 \frac {a x} 2 \tan \dfrac {a x} 2 + \frac 1 6 \left({\frac 2 a \tan \frac {a x} 2}\right) + C       | c = Primitive of $\sec^2 a x$ }} {{eqn | r = \frac 1 {6 a} \left({1 + \tan^2 \frac {a x} 2}\right) \tan \dfrac {a x} 2 + \frac 2 {6 a} \tan \frac {a x} 2 + C       | c = Difference of Squares of Secant and Tangent }} {{eqn | r = \frac 1 {2a} \tan \frac {a x} 2 + \frac 1 {6 a} \tan^3 \frac {a x} 2 + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {p^2 + q^2 \cos^2 a x}       | r = \int \frac {\csc^2 a x \rd x} {p^2 \csc^2 a x + q^2 \cot^2 a x}       | c = multiplying the numerator and the denominator by $\sec^2 a x$. }} {{eqn | r = \int \frac {\csc^2 a x \rd x} {p^2 + \paren {p^2 + q^2} \cot^2 a x}       | c = Difference of Squares of Cosecant and Cotangent }} {{eqn | r = \int \frac {-\paren {\cot a x}' \rd x} {a p^2 + a \paren {p^2 + q^2} \cot^2 a x}       | c = Derivative of Cotangent Function }} {{eqn | r = \int \frac {-\d t} {a p^2 + a \paren {p^2 + q^2} t^2}       | c = putting $t = \cot a x$ }} {{eqn | r = \frac {-1} {a \paren {p^2 + q^2} } \int \frac {\d t} {\paren {\tfrac p {\sqrt {p^2 + q^2} } }^2 + t^2}       | c =  }} {{eqn | r = \frac {-1} {a \paren {p^2 + q^2} } \frac {\sqrt {p^2 + q^2} } p \, \map \arctan {\frac {\sqrt {p^2 + q^2} } p t } + C       | c = Primitive of $\dfrac 1 {x^2 + a^2}$ }} {{eqn | r = \frac {-1} {a p \sqrt {p^2 + q^2} } \map \arctan {\frac {\sqrt {p^2 + q^2} } p t} + C       | c =  }} {{eqn | r = \frac {-1} {a p \sqrt {p^2 + q^2} } \map \arctan {\frac {\sqrt {p^2 + q^2} } p \cot a x} + C       | c = substituting $t = \cot a x$ }} {{eqn | r = \frac {-1} {a p \sqrt {p^2 + q^2} } \map \arctan {\frac {\sqrt {p^2 + q^2} } {p \tan a x} } + C       | c =  }} {{eqn | r = \frac {-1} {a p \sqrt {p^2 + q^2} } \map \arccot {\frac {p \tan a x} {\sqrt {p^2 + q^2} } } + C       | c = Arctangent of Reciprocal equals Arccotangent }} {{eqn | r = \frac 1 {a p \sqrt {p^2 + q^2} } \paren {\map \arctan {\frac {p \tan a x} {\sqrt {p^2 + q^2} } } - \frac \pi 2} + C       | c = Sum of Arctangent and Arccotangent }} {{eqn | r = \frac 1 {a p \sqrt {p^2 + q^2} } \map \arctan {\frac {p \tan a x} {\sqrt {p^2 + q^2} } } + C       | c = absorbing into the arbitrary constant }} {{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 = x^m       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = m x^{m - 1}       | c = Power Rule for Derivatives }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\d v} {\d x}       | r = \cos a x       | c =  }} {{eqn | ll= \leadsto       | l = v       | r = \frac {\sin a x} a       | c = Primitive of $\cos a x$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int x^m \cos a x \rd x       | r = \paren {x^m} \paren {\frac {\sin a x} a} - \int \paren {\frac {\sin a x} a} \paren {m x^{m - 1} } \rd x + C       | c = Integration by Parts }} {{eqn | n = 1       | r = \frac {x^m \sin a x} a - \frac m a \int x^{m - 1} \sin a x \rd x + C       | c = Primitive of Constant Multiple of Function }} {{end-eqn}} Similarly, let: {{begin-eqn}} {{eqn | l = u       | r = x^{m - 1}       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = \paren {m - 1} x^{m - 2}       | c = Power Rule for Derivatives }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\d v} {\d x}       | r = \sin a x       | c =  }} {{eqn | ll= \leadsto       | l = v       | r = \frac {-\cos a x} a       | c = Primitive of $\sin a x$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int x^{m - 1} \sin a x \rd x       | r = \paren {x^{m - 1} } \paren {\frac {-\cos a x} a} - \int \paren {\frac {-\cos a x} a} \paren {m - 1} x^{m - 2} \rd x + C       | c = Integration by Parts }} {{eqn | n = 2       | r = \frac {-x^{m - 1} \cos a x} a + \frac {m - 1} a \int x^{m - 2} \cos a x \rd x + C       | c = Primitive of Constant Multiple of Function }} {{end-eqn}} So: {{begin-eqn}} {{eqn | l = \int x^m \cos a x \rd x       | r = \frac {x^m \sin a x} a - \frac m a \int x^{m - 1} \sin a x \rd x + C       | c = from $(1)$ }} {{eqn | r = \frac {x^m \sin a x} a - \frac m a \paren {\frac {-x^{m - 1} \cos a x} a + \frac {m - 1} a \int x^{m - 2} \cos a x \rd x} + C       | c = from $(2)$ }} {{eqn | r = \frac {x^m \sin a x} a + \frac {m x^{m - 1} \cos a x} {a^2} - \frac {m \paren {m - 1} } {a^2} \int x^{m - 2} \cos a x \rd x + C       | c = simplifying }} {{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 = \frac 1 {\cos^{n - 2} a x}       | c =  }} {{eqn | r = \cos^{- n + 2} a x       | c =  }} {{eqn | ll= \implies       | l = \frac {\mathrm d u} {\mathrm d x}       | r = -a \left({- n + 2}\right) \cos^{- n + 1} a x \sin a x       | c = Derivative of $\cos a x$, Derivative of Power, Chain Rule for Derivatives }} {{eqn | r = \frac {a \left({n - 2}\right) \sin a x} {\cos^{n - 1} a x}       | c = simplifying }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\mathrm d v} {\mathrm d x}       | r = \frac 1 {\cos^2 a x}       | c =  }} {{eqn | r = \sec^2 a x       | c = Secant is $\dfrac 1 \cos$ }} {{eqn | ll= \implies       | l = v       | r = \frac {\tan a x} a       | c = Primitive of $\sec^2 a x$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int \frac {\mathrm d x} {\cos^n a x}       | r = \int \frac {\mathrm d x} {\cos^{n - 2} a x \cos^2 a x}       | c =  }} {{eqn | r = \left({\frac 1 {\cos^{n - 2} a x} }\right) \left({\frac {\tan a x} a}\right) - \int \left({\frac {\tan a x} a}\right) \left({\frac {a \left({n - 2}\right) \sin a x} {\cos^{n - 1} a x} }\right) \ \mathrm d x       | c = Integration by Parts }} {{eqn | r = \frac {\sin a x} {a \cos^{n - 1} a x} - \int \frac {\left({n - 2}\right) \sin^2 a x} {\cos^n a x} \ \mathrm d x       | c = Tangent is $\dfrac {\sin}{\cos}$ }} {{eqn | r = \frac {\sin a x} {a \cos^{n - 1} a x} - \int \frac {\left({n - 2}\right) \left({1 - \cos^2 a x}\right)} {\cos^n a x} \ \mathrm d x       | c = Sum of $\sin^2$ and $\cos^2$ }} {{eqn | r = \frac {\sin a x} {a \cos^{n - 1} a x} - \left({n - 2}\right) \int \frac {\mathrm d x} {\cos^n a x} + \left({n - 2}\right) \int \frac {\mathrm d x} {\cos^{n - 2} a x}       | c = Linear Combination of Integrals }} {{eqn | ll= \implies       | l = \left({n - 1}\right) \int \frac {\mathrm d x} {\cos^n a x}       | r = \frac {\sin a x} {a \cos^{n - 1} a x} + \left({n - 2}\right) \int \frac {\mathrm d x} {\cos^{n - 2} a x}       | c = gathering terms }} {{eqn | ll= \implies       | l = \int \frac {\mathrm d x} {\cos^n a x}       | r = \frac {\sin a x} {a \left({n - 1}\right) \cos^{n - 1} a x} + \frac {n - 2} {n - 1} \int \frac {\mathrm d x} {\cos^{n - 2} a x}       | c = dividing by $n - 1$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \sin a x \cos a x \rd x       | r = \int \frac {\sin 2 a x} 2 \rd x       | c = Double Angle Formula for Sine }} {{eqn | r = \frac {-\cos 2 a x} {4 a} + C       | c = Primitive of $\cos a x$ }} {{eqn | r = \frac {-\paren {1 - 2 \sin^2 a x} } {4 a} + C       | c = Double Angle Formula for Cosine: Corollary 2 }} {{eqn | r = \frac {-1} {4 a} + \frac {\sin^2 a x} {2 a} + C       | c = separating fraction }} {{eqn | r = \frac {\sin^2 a x} {2 a} + C       | c = subsuming $\dfrac {-1} {4 a}$ into arbitrary constant }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \sin p x \cos q x \rd x       | r = \int \left({\dfrac {\sin \left({p x + q x}\right) + \sin \left({p x - q x}\right)} 2}\right) \rd x       | c = Simpson's Formula for Sine by Cosine }} {{eqn | r = \frac 1 2 \int \sin \left({p - q}\right) x \rd x + \frac 1 2 \int \sin \left({p + q}\right) x \rd x       | c = Linear Combination of Integrals }} {{eqn | r = \frac 1 2 \frac {-\cos \left({p - q}\right) x} {p - q} - \frac 1 2 \frac {\cos \left({p + q}\right) x} {p + q} + C       | c = Primitive of $\cos a x$ }} {{eqn | r = \frac {-\cos \left({p - q}\right) x} {2 \left({p - q}\right)} - \frac {\cos \left({p + q}\right) x} {2 \left({p + q}\right)} + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = z       | r = \sin a x       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d z} {\d x}       | r = a \cos a x       | c = Primitive of $\sin a x$ }} {{eqn | ll= \leadsto       | l = \int \sin^n a x \cos a x \rd x       | r = \int \frac {z^n \rd x} a       | c = Integration by Substitution }} {{eqn | r = \frac {z^{n + 1} } {\paren {n + 1} a} + C       | c = Primitive of Power }} {{eqn | r = \frac {\sin^{n + 1} a x} {\paren {n + 1} a} + C       | c = substituting for $z$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = z       | r = \cos a x       | c = Simpson's Formula for Sine by Cosine }} {{eqn | ll= \leadsto       | l = \frac {\d z} {\d x}       | r = -a \sin a x       | c = Primitive of $\cos a x$ }} {{eqn | ll= \leadsto       | l = \int \cos^n a x \sin a x \rd x       | r = \int \frac {-z^n \rd x} a       | c = Integration by Substitution }} {{eqn | r = \frac {-z^{n + 1} } {\paren {n + 1} a} + C       | c = Primitive of Power }} {{eqn | r = \frac {-\cos^{n + 1} a x} {\paren {n + 1} a} + C       | c = substituting for $z$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn	| l = \int \sin^2 a x \cos^2 a x \rd x 	| r = \int \paren {\sin a x \cos a x}^2 \rd x }} {{eqn	| r = \int \paren {\frac 1 2 \sin 2 a x}^2 \rd x 	| c = Double Angle Formula for Sine }} {{eqn	| r = \frac 1 4 \int \sin^2 2 a x \rd x }} {{eqn	| r = \frac 1 4 \paren {\frac x 2 - \frac {\map \sin {2 x \times 2 a} } {4 \times 2 a} } + C 	| c = Primitive of $\sin^2 a x$ }} {{eqn	| r = \frac x 8 - \frac {\sin 4 a x} {32 a} + C }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\mathrm d x} {\sin a x \cos a x}       | r = \int \frac {\sec a x \ \mathrm d x} {\sin a x}       | c = Secant is Reciprocal of Cosine }} {{eqn | r = \int \frac {\sec^2 a x \ \mathrm d x} {\sin a x \sec a x}       | c = multiplying top and bottom by $\sec a x$ }} {{eqn | r = \int \frac {\sec^2 a x \ \mathrm d x} {\frac {\sin a x} {\cos a x} }       | c = Secant is Reciprocal of Cosine }} {{eqn | r = \int \frac {\sec^2 a x \ \mathrm d x} {\tan a x}       | c = Tangent is Sine divided by Cosine }} {{eqn | r = \frac 1 a \ln \left\vert{\tan a x}\right\vert + C       | c = Primitive of $\dfrac {\sec^2 a x} {\tan a x}$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \frac {\mathrm d} {\mathrm d x} \tan x       | r = \sec^2 x       | c = Derivative of Tangent Function }} {{eqn | ll= \implies       | l = \int \frac {\sec^2 x \ \mathrm d x} {\tan x}       | r = \ln \left\vert{\tan a x}\right\vert + C       | c = Primitive of Function under its Derivative }} {{eqn | ll= \implies       | l = \int \frac {\sec^2 a x \ \mathrm d x} {\tan a x}       | r = \frac 1 a \ln \left\vert{\tan a x}\right\vert + C       | c = Primitive of Function of Constant Multiple }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {\sin^2 a x \cos a x}       | r = \int \frac {\paren {\sin^2 a x + \cos^2 a x} \rd x} {\sin^2 a x \cos a x}       | c = Sum of Squares of Sine and Cosine }} {{eqn | r = \int \frac {\sin^2 a x \rd x} {\sin^2 a x \cos a x} + \int \frac {\cos^2 a x \rd x} {\sin^2 a x \cos a x}       | c = Linear Combination of Integrals }} {{eqn | r = \int \frac {\d x} {\cos a x} + \int \frac {\cos a x \rd x} {\sin^2 a x}       | c = simplifying }} {{eqn | r = \int \sec a x \rd x + \int \frac {\cos a x \rd x} {\sin^2 a x}       | c = Secant is Reciprocal of Cosine }} {{eqn | r = \int \sec a x \rd x + \int \frac {\cot a x \rd x} {\sin a x}       | c = Cotangent is Cosine divided by Sine }} {{eqn | r = \int \sec a x \rd x + \int \csc a x \cot a x \rd x       | c = Cosecant is Reciprocal of Sine }} {{eqn | r = \frac 1 a \ln \size {\map \tan {\frac \pi 4 + \frac {a x} 2} } + \int \csc a x \cot a x \rd x + C       | c = Primitive of $\sec a x$ }} {{eqn | r = \frac 1 a \ln \size {\map \tan {\frac \pi 4 + \frac {a x} 2} } - \frac 1 {a \sin a x} + C       | c = Primitive of $\csc^n a x \cot a x$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = z       | r = \csc a x       | c = }} {{eqn | ll= \implies       | l = \frac {\mathrm d z} {\mathrm d x}       | r = -a \csc a x \cot a x       | c = Derivative of Cosecant Function, Chain Rule for Derivatives }} {{eqn | ll= \implies       | l = \int \csc^n a x \cot a x \ \mathrm d x       | r = \int \frac {-z^{n - 1} \ \mathrm d z} a       | c = Integration by Substitution }} {{eqn | r = \frac {-z^n} {n a}       | c = Primitive of Power }} {{eqn | r = \frac {-\csc^n a x} {n a} + C       | c = substituting for $z$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = z       | r = \sec a x       | c = }} {{eqn | ll= \implies       | l = \frac {\mathrm d z} {\mathrm d x}       | r = a \sec a x \tan a x       | c = Derivative of Secant Function, Chain Rule for Derivatives }} {{eqn | ll= \implies       | l = \int \sec^n a x \tan a x \ \mathrm d x       | r = \int \frac {z^{n - 1} \ \mathrm d z} a       | c = Integration by Substitution }} {{eqn | r = \frac {z^n} {n a}       | c = Primitive of Power }} {{eqn | r = \frac {\sec^n a x} {n a} + C       | c = substituting for $z$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {\sin^2 a x \cos^2 a x}       | r = \int \frac {\d x} {\left({\sin a x \cos a x}\right)^2}       | c =  }} {{eqn | r = \int \frac {\d x} {\left({\frac {\sin 2 a x} 2}\right)^2}       | c = Double Angle Formula for Sine }} {{eqn | r = 4 \int \frac {\d x} {\sin^2 2 a x}       | c = Primitive of Constant Multiple of Function }} {{eqn | r = 4 \int \csc^2 2 a x \rd x       | c = Cosecant is Reciprocal of Sine }} {{eqn | r = 4 \frac {-\cot 2 a x} {2 a} + C       | c = Primitive of Square of Cosecant of a x }} {{eqn | r = \frac {-2 \cot 2 a x} a + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\sin^2 a x \ \mathrm d x} {\cos a x}       | r = \int \frac {\paren {1 - \cos^2 a x} \rd x} {\cos a x}       | c = Sum of Squares of Sine and Cosine }} {{eqn | r = \int \frac {\mathrm d x} {\cos a x} - \int \cos a x \ \mathrm d x       | c = Linear Combination of Integrals }} {{eqn | r = \int \sec a x \ \mathrm d x - \int \cos a x \ \mathrm d x       | c = Secant is Reciprocal of Cosine }} {{eqn | r = \frac {-\sin a x} a + \int \sec a x \ \mathrm d x + C       | c = Primitive of $\cos a x$ }} {{eqn | r = \frac {-\sin a x} a + \frac 1 a \ln \size {\map \tan {\frac \pi 4 + \frac {a x} 2} } + C       | c = Primitive of $\sec a x$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\cos^2 a x \ \mathrm d x} {\sin a x}       | r = \int \frac {\left({1 - \sin^2 a x}\right) \ \mathrm d x} {\sin a x}       | c = Sum of Squares of Sine and Cosine }} {{eqn | r = \int \frac {\mathrm d x} {\sin a x} - \int \sin a x \ \mathrm d x       | c = Linear Combination of Integrals }} {{eqn | r = \int \csc a x \ \mathrm d x - \int \sin a x \ \mathrm d x       | c = Cosecant is Reciprocal of Sine }} {{eqn | r = \frac {\cos a x} a + \int \csc a x \ \mathrm d x + C       | c = Primitive of $\sin a x$ }} {{eqn | r = \frac {\cos a x} a + \frac 1 a \ln \left\vert{\tan \frac {a x} 2}\right\vert + C       | c = Primitive of $\csc a x$ }} {{end-eqn}} {{qed}}
Let: {{begin-eqn}} {{eqn | l = u       | r = \sin a x       | c =  }} {{eqn | l = \frac {\mathrm d u} {\mathrm d x}       | r = a \cos a x       | c = Derivative of $\sin a x$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int \frac {\mathrm d x} {\cos a x \left({1 + \sin a x}\right)}       | r = \int \frac {\cos a x \ \mathrm d x} {\cos^2 a x \left({1 + \sin a x}\right)}       | c = multiplying top and bottom by $\cos a x$ }} {{eqn | r = \int \frac {\cos a x \ \mathrm d x} {\left({1 - \sin^2 a x}\right) \left({1 + \sin a x}\right)}       | c = Sum of Squares of Sine and Cosine }} {{eqn | r = \frac 1 a \int \frac {\mathrm d u} {\left({1 - u^2}\right) \left({1 + u}\right)}       | c = Integration by Substitution }} {{eqn | r = \frac 1 a \int \frac {\mathrm d u} {\left({1 - u}\right) \left({1 + u}\right)^2}       | c = Difference of Two Squares }} {{eqn | r = \frac 1 a \left({\frac 1 {-2} \left({\frac 1 {1 + u} + \frac {-1} {-2} \ln \left\vert{\frac {1 - u} {1 + u} }\right\vert}\right)}\right) + C       | c = Primitive of $\dfrac 1 {\left({a x + b}\right)^2 \left({p x + q}\right)}$ }} {{eqn | r = \frac {-1} {2 a \left({1 + u}\right)} - \frac 1 {4 a} \ln \left\vert{\frac {1 - u} {1 + u} }\right\vert + C       | c = simplifying }} {{eqn | r = \frac {-1} {2 a \left({1 + \sin a x}\right)} - \frac 1 {4 a} \ln \left\vert{\frac {1 - \sin a x} {1 + \sin a x} }\right\vert + C       | c = substituting for $u$ }} {{eqn | r = \frac {-1} {2 a \left({1 + \sin a x}\right)} - \frac 1 {4 a} \ln \left\vert{\frac {\frac 1 2 \sec^2 \left({\frac \pi 4 - \frac {a x} 2}\right)} {\frac 1 2 \sec^2 \left({\frac \pi 4 + \frac {a x} 2}\right)} }\right\vert + C       | c = Reciprocal of $1 - \sin$ and Reciprocal of $1 + \sin$ }} {{eqn | r = \frac {-1} {2 a \left({1 + \sin a x}\right)} - \frac 1 {4 a} \ln \left\vert{\frac{\cos^2 \left({\frac \pi 4 + \frac {a x} 2}\right)} {\cos^2 \left({\frac \pi 4 - \frac {a x} 2}\right)} }\right\vert + C       | c = Secant is Reciprocal of Cosine }} {{eqn | r = \frac {-1} {2 a \left({1 + \sin a x}\right)} - \frac 1 {4 a} \ln \left\vert{\frac{\cos^2 \left({\frac \pi 4 + \frac {a x} 2}\right)} {\sin^2 \left({\frac \pi 2 - \left({\frac \pi 4 - \frac {a x} 2}\right)}\right)} }\right\vert + C       | c = Sine of Complement equals Cosine }} {{eqn | r = \frac {-1} {2 a \left({1 + \sin a x}\right)} - \frac 1 {4 a} \ln \left\vert{\frac{\cos^2 \left({\frac \pi 4 + \frac {a x} 2}\right)} {\sin^2 \left({\frac \pi 4 + \frac {a x} 2}\right)} }\right\vert + C       | c =  }} {{eqn | r = \frac {-1} {2 a \left({1 + \sin a x}\right)} + \frac 1 {4 a} \ln \left\vert{\frac {\sin^2 \left({\frac \pi 4 + \frac {a x} 2}\right)} {\cos^2 \left({\frac \pi 4 + \frac {a x} 2}\right)} }\right\vert + C       | c = Logarithm of Reciprocal }} {{eqn | r = \frac {-1} {2 a \left({1 + \sin a x}\right)} + \frac 1 {4 a} \ln \left\vert{\tan^2 \left({\frac \pi 4 + \frac {a x} 2}\right) }\right\vert + C       | c = Tangent is Sine divided by Cosine }} {{eqn | r = \frac {-1} {2 a \left({1 + \sin a x}\right)} + \frac 1 {2 a} \ln \left\vert{\tan \left({\frac \pi 4 + \frac {a x} 2}\right) }\right\vert + C       | c = Logarithm of Power }} {{end-eqn}} {{qed}}
Let: {{begin-eqn}} {{eqn | l = u       | r = \sin a x       | c =  }} {{eqn | l = \frac {\d u} {\d x}       | r = a \cos a x       | c = Derivative of $\sin a x$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int \frac {\d x} {\cos a x \paren {1 - \sin a x} }       | r = \int \frac {\cos a x \rd x} {\cos^2 a x \paren {1 - \sin a x} }       | c = multiplying top and bottom by $\cos a x$ }} {{eqn | r = \int \frac {\cos a x \rd x} {\paren {1 - \sin^2 a x} \paren {1 - \sin a x} }       | c = Sum of Squares of Sine and Cosine }} {{eqn | r = \frac 1 a \int \frac {\d u} {\paren {1 - u^2} \paren {1 - u} }       | c = Integration by Substitution }} {{eqn | r = \frac 1 a \int \frac {\d u} {\paren {1 + u} \paren {1 - u}^2}       | c = Difference of Two Squares }} {{eqn | r = \frac 1 a \paren {\frac 1 2 \paren {\frac 1 {1 - u} + \frac 1 2 \ln \size {\frac {1 + u} {1 - u} } } } + C       | c = Primitive of $\dfrac 1 {\paren {a x + b}^2 \paren {p x + q} }$ }} {{eqn | r = \frac 1 {2 a \paren {1 - u} } + \frac 1 {4 a} \ln \size {\frac {1 + u} {1 - u} } + C       | c = simplifying }} {{eqn | r = \frac 1 {2 a \paren {1 - \sin a x} } + \frac 1 {4 a} \ln \size {\frac {1 + \sin a x} {1 - \sin a x} } + C       | c = substituting for $u$ }} {{eqn | r = \frac 1 {2 a \paren {1 - \sin a x} } + \frac 1 {4 a} \ln \size {\frac {\frac 1 2 \map {\sec^2} {\frac \pi 4 + \frac {a x} 2} } {\frac 1 2 \map {\sec^2} {\frac \pi 4 - \frac {a x} 2} } } + C       | c = Reciprocal of $1 - \sin$ and Reciprocal of $1 + \sin$ }} {{eqn | r = \frac 1 {2 a \paren {1 - \sin a x} } + \frac 1 {4 a} \ln \size {\frac {\map {\cos^2} {\frac \pi 4 - \frac {a x} 2} } {\map {\cos^2} {\frac \pi 4 + \frac {a x} 2} } } + C       | c = Secant is Reciprocal of Cosine }} {{eqn | r = \frac 1 {2 a \paren {1 - \sin a x} } + \frac 1 {4 a} \ln \size {\frac {\map {\sin^2} {\frac \pi 2 - \paren {\frac \pi 4 - \frac {a x} 2} } } {\map {\cos^2} {\frac \pi 4 + \frac {a x} 2} } } + C       | c = Sine of Complement equals Cosine }} {{eqn | r = \frac 1 {2 a \paren {1 - \sin a x} } + \frac 1 {4 a} \ln \size {\frac {\map {\sin^2} {\frac \pi 4 + \frac {a x} 2} } {\map {\cos^2} {\frac \pi 4 + \frac {a x} 2} } } + C       | c =  }} {{eqn | r = \frac 1 {2 a \paren {1 - \sin a x} } + \frac 1 {4 a} \ln \size {\map {\tan^2} {\frac \pi 4 + \frac {a x} 2} } + C       | c = Tangent is Sine divided by Cosine }} {{eqn | r = \frac 1 {2 a \paren {1 - \sin a x} } + \frac 1 {2 a} \ln \size {\map \tan {\frac \pi 4 + \frac {a x} 2} } + C       | c = Logarithm of Power }} {{end-eqn}} {{qed}}