hcju/proofwikiqa huggingface dataset:
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {x^m \ \left({x^n + a^n}\right)^r}       | r = \int \frac {a^n \rd x} {a^n x^m \ \left({x^n + a^n}\right)^r}       | c = multiplying top and bottom by $a^n$ }} {{eqn | r = \int \frac {\left({x^n + a^n - x^n}\right) \rd x} {a^n x^m \ \left({x^n + a^n}\right)^r}       | c = adding and subtracting $x^n$ }} {{eqn | r = \frac 1 {a^n} \int \frac {\left({x^n + a^n}\right) \rd x} {x^m \ \left({x^n + a^n}\right)^r} - \frac 1 {a^n} \int \frac {x^n \rd x} {x^m \ \left({x^n + a^n}\right)^r}       | c = Linear Combination of Integrals }} {{eqn | r = \frac 1 {a^n} \int \frac {\d x} {x^m \left({x^n + a^n}\right)^{r - 1} } - \frac 1 {a^n} \int \frac {\d x} {x^{m - n} \left({x^n + a^n}\right)^r}       | c = simplification }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = u       | r = \sqrt {x^n + a^n}       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = \frac {n x^{n - 1} } {2 \sqrt {x^n + a^n} }        | c = Derivative of Power, Chain Rule for Derivatives }} {{eqn | ll= \leadsto       | l = \int \frac {\d x} {x \sqrt {x^n + a^n} }       | r = \int \frac {2 \sqrt {x^n + a^n} \rd u} {n x^{n - 1} x \sqrt {x^n + a^n} }       | c = Integration by Substitution }} {{eqn | r = \int \frac {2 \rd u} {n \paren {u^2 - a^n} }       | c = completing substitution and simplifying }} {{eqn | r = \frac 2 n \int \frac {\d u} {\paren {u^2 - \paren {\sqrt {a^n} } ^2} }       | c = Linear Combination of Integrals }} {{eqn | r = \frac 2 n \paren {\frac 1 {2 \sqrt {a^n} } \ln \size {\frac {u - \sqrt {a^n} } {u + \sqrt {a^n} } } } + C       | c = Primitive of $\dfrac 1 {x^2 - a^2}$ }} {{eqn | r = \frac 1 {n \sqrt {a^n} } \ln \size {\frac {\sqrt {x^n + a^n} - \sqrt {a^n} } {\sqrt {x^n + a^n} + \sqrt {a^n} } } + C       | c = substituting for $u$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {x \paren {x^n - a^n} }       | r = \int \frac {a^n \rd x} {a^n x \paren {x^2 - a^2} }       | c = multiplying top and bottom by $a^n$ }} {{eqn | r = \int \frac {\paren {-\paren {x^n - a^n} + x^n} \rd x} {a^n x \paren {x^n - a^n} }       | c = adding and subtracting $x^n$ }} {{eqn | r = \frac {-1} {a^n} \int \frac {\paren {x^n - a^n} \rd x} {x \paren {x^n - a^n} } + \frac 1 {a^n} \int \frac {x^n \rd x} {x \paren {x^n - a^n} }       | c = Linear Combination of Integrals }} {{eqn | r = \frac {-1} {a^n} \int \frac {\d x} x + \frac 1 {a^n} \int \frac {x^{n - 1} \rd x} {x^n - a^n}       | c = simplifying }} {{eqn | r = \frac {-1} {a^n} \ln \size x + \frac 1 {a^n} \int \frac {x^{n - 1} \rd x} {x^n - a^n} + C       | c = Primitive of Reciprocal }} {{eqn | r = \frac {-1} {a^n} \ln \size x + \frac 1 {a^n} \paren {\frac 1 n \ln \size {x^n - a^n} } + C       | c = Primitive of $\dfrac {x^{n - 1}} {x^n - a^n}$ }} {{eqn | r = \frac {-1} {n a^n} \ln \size {x^n} + \frac 1 {n a^n} \ln \size {x^n - a^n} + C       | c = Logarithm of Power }} {{eqn | r = \frac 1 {n a^n} \ln \size {\frac {x^n - a^n} {x^n} } + C       | c = Difference of Logarithms }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = u       | r = x^n - a^n       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = n x^{n - 1}        | c = Power Rule for Derivatives and Derivative of Constant }} {{eqn | ll= \leadsto       | l = \int \frac {x^{n - 1} \rd x} {x^n - a^n}       | r = \frac 1 n \ln \size {x^n - a^n} + C       | c = Primitive of Function under its Derivative }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = u       | r = \sqrt {x^n - a^n}       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = \frac {n x^{n - 1} } {2 \sqrt {x^n - a^n} }        | c = Derivative of Power, Chain Rule for Derivatives }} {{eqn | ll= \leadsto       | l = \int \frac {\d x} {x \sqrt {x^n - a^n} }       | r = \int \frac {2 \sqrt {x^n - a^n} \rd u} {n x^{n - 1} x \sqrt {x^n - a^n} }       | c = Integration by Substitution }} {{eqn | r = \int \frac {2 \rd u} {n \paren {u^2 + a^n} }       | c = completing substitution and simplifying }} {{eqn | r = \frac 2 n \int \frac {\d u} {\paren {u^2 + \paren {\sqrt {a^n} }^2} }       | c = Linear Combination of Integrals }} {{eqn | r = \frac 2 n \paren {\frac 1 {\sqrt {a^n} } \arctan \frac u {\sqrt {a^n} } } + C       | c = Primitive of $\dfrac 1 {x^2 + a^2}$ }} {{eqn | n = 1       | r = \frac 2 {n \sqrt {a^n} } \arctan \frac {\sqrt {x^n - a^n} } {\sqrt {a^n} } + C       | c = substituting for $u$ }} {{end-eqn}} Now: {{begin-eqn}} {{eqn | l = y       | r = \arctan \frac {\sqrt {x^n - a^n} } {\sqrt {a^n} }       | c =  }} {{eqn | ll= \leadsto       | l = \tan y       | r = \frac {\sqrt {x^n - a^n} } {\sqrt {a^n} }       | c = {{Defof|Arctangent}} }} {{eqn | ll= \leadsto       | l = \tan^2 y       | r = \frac {x^n - a^n} {a^n}       | c = squaring both sides }} {{eqn | ll= \leadsto       | l = \tan^2 y       | r = \frac {x^n} {a^n} - 1       | c =  }} {{eqn | ll= \leadsto       | l = 1 + \tan^2 y       | r = \frac {x^n} {a^n}       | c =  }} {{eqn | ll= \leadsto       | l = \sec^2 y       | r = \frac {x^n} {a^n}       | c = Difference of Squares of Secant and Tangent }} {{eqn | ll= \leadsto       | l = \cos^2 y       | r = \frac {a^n} {x^n}       | c = {{Defof|Secant Function}} }} {{eqn | ll= \leadsto       | l = \cos y       | r = \frac {\sqrt {a^n} } {\sqrt {x^n} }       | c =  }} {{eqn | ll= \leadsto       | l = y       | r = \arccos \frac {\sqrt {a^n} } {\sqrt {x^n} }       | c = {{Defof|Arccosine}} }} {{eqn | ll= \leadsto       | l = \int \frac {\d x} {x \sqrt {x^n - a^n} }       | r = \frac 2 {n \sqrt {a^n} } \arccos \sqrt {\frac {a^n} {x^n} }       | c = substituting in $(1)$ }} {{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       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = 1       | c = Derivative of Identity Function }} {{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 \map \sin {a x} \rd x       | r = x \paren {-\frac {\cos a x} a} - \int \paren {-\frac {\cos a x} a} \times 1 \rd x + C       | c = Integration by Parts }} {{eqn | r = -\frac {x \cos a x} a + \frac 1 a \int \cos a x \rd x + C       | c = Linear Combination of Primitives }} {{eqn | r = -\frac {x \cos a x} a + \frac 1 a \paren {\frac {\sin a x} a} + C       | c = Primitive of $\cos a x$ }} {{eqn | r = \frac {\sin a x} {a^2} - \frac {x \cos a x} a + C       | c = simplification }} {{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^2       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = 2 x       | c = Derivative of Power }} {{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^2 \sin a x \rd x       | r = x^2 \paren {-\frac {\cos a x} a} - \int 2 x \paren {-\frac {\cos a x} a} \rd x + C       | c = Integration by Parts }} {{eqn | r = -\frac {x^2} a \cos a x + \frac 2 a \int x \cos a x \rd x + C       | c = Linear Combination of Integrals }} {{eqn | r = -\frac {x^2} a \cos a x + \frac 2 a \paren {\frac {\cos a x} {a^2} + \frac {x \sin a x} a} + C       | c = Primitive of $x \cos a x$ }} {{eqn | r = \frac {2 x \sin a x} {a^2} + \paren {\frac 2 {a^3} - \frac {x^2} a} \cos a x + C       | c = simplification }} {{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^3       | c =  }} {{eqn | ll= \leadsto       | l = \frac {\d u} {\d x}       | r = 3 x^2       | c = Derivative of Power }} {{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^3 \sin a x \rd x       | r = x^3 \paren {-\frac {\cos a x} a} - \int 3 x^2 \paren {-\frac {\cos a x} a} \rd x + C       | c = Integration by Parts }} {{eqn | r = -\frac {x^3} a \cos a x + \frac 3 a \int x^2 \cos a x \rd x + C       | c = Linear Combination of Integrals }} {{eqn | r = -\frac {x^3} a \cos a x + \frac 3 a \paren {\frac {2 x} {a^2} \cos a x + \paren {\frac {x^2} a - \frac 2 {a^3} } \sin a x} + C       | c = Primitive of $x^2 \cos a x$ }} {{eqn | r = \paren {\frac {3 x^2} {a^2} - \frac 6 {a^4} } \sin a x + \paren {\frac {6 x} {a^3} - \frac {x^3} a} \cos a x + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\sin a x \rd x} x       | r = \int \frac 1 x \paren {\sum_{k \mathop = 0}^\infty \paren {-1}^k \frac {\paren {a x}^{2 k + 1} } {\paren {2 k + 1}!} } \rd x       | c = {{Defof|Real Sine Function}} }} {{eqn | n = 1       | r = \sum_{k \mathop = 0}^\infty \frac {\paren {-1}^k a^{2 k + 1} } {\paren {2 k + 1}!} \int \frac 1 x \paren {x^{2 k + 1} } \rd x       | c = Linear Combination of Integrals }} {{eqn | r = \sum_{k \mathop = 0}^\infty \frac {\paren {-1}^k a^{2 k + 1} } {\paren {2 k + 1}!} \int x^{2 k} \rd x       | c = simplifying }} {{eqn | r = \sum_{k \mathop = 0}^\infty \frac {\paren {-1}^k a^{2 k + 1} } {\paren {2 k + 1}!} \frac {x^{2 k + 1} } {2 k + 1} + C       | c = Primitive of Power }} {{eqn | r = \sum_{k \mathop \ge 0} \frac {\paren {-1}^k \paren {a x}^{2 k + 1} } {\paren {2 k + 1} \paren {2 k + 1}!} + C       | c = simplifying }} {{end-eqn}} The validity of $(1)$ follows from Sine Function is Absolutely Convergent. {{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 = \sin a x       | c =  }} {{eqn | ll= \implies       | l = \frac {\mathrm d u} {\mathrm d x}       | r = a \cos a x       | c = Derivative of $\sin a x$ }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\mathrm d v} {\mathrm d x}       | r = \frac 1 {x^2}       | c =  }} {{eqn | ll= \implies       | l = v       | r = - \frac 1 x       | c = Primitive of Power }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int \frac {\sin a x \ \mathrm d x} {x^2}       | r = \int \sin a x \frac 1 {x^2} \ \mathrm d x       | c =  }} {{eqn | r = \sin a x \left({- \frac 1 x}\right) - \int \left({- \frac 1 x}\right) a \cos a x \ \mathrm d x       | c = Integration by Parts }} {{eqn | r = -\frac {\sin a x} x + a \int \frac {\cos a x \ \mathrm d x} x       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {\sin x}       | r = \int \csc x \rd x       | c = {{Defof|Real Cosecant Function}} }} {{eqn | r = \ln \size {\csc x - \cot x} + C       | c = Primitive of $\csc x$: Cosecant minus Cotangent Form }} {{eqn | ll= \leadsto       | l = \int \frac {\d x} {\sin a x}       | r = \frac 1 a \ln \size {\csc a x - \cot a x} + C       | c = Primitive of Function of Constant Multiple }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {\sin x}       | r = \int \csc x \rd x       | c = {{Defof|Real Cosecant Function}} }} {{eqn | r = \ln \size {\tan \frac x 2} + C       | c = Primitive of $\csc x$: Tangent Form }} {{eqn | ll= \leadsto       | l = \int \frac {\d x} {\sin a x}       | r = \frac 1 a \ln \size {\tan \frac {a x} 2} + C       | c = Primitive of Function of Constant Multiple }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \csc x       | r = \sum_{n \mathop = 0}^\infty \dfrac {B_{2 n} \paren {-1}^{n - 1} x^{2 n - 1} 2 \paren {2^{2 n - 1} - 1} } {\paren {2 n}!}       | c = Power Series Expansion for Cosecant Function }} {{eqn | ll= \leadsto       | l = \dfrac x {\sin a x}       | r = x \sum_{n \mathop = 0}^\infty \dfrac {B_{2 n} \paren {-1}^{n - 1} \paren {a x}^{2 n - 1} 2 \paren {2^{2 n - 1} - 1} } {\paren {2 n}!}       | c = Cosecant is Reciprocal of Sine }} {{eqn | r = \dfrac 1 a \sum_{n \mathop = 0}^\infty \dfrac {B_{2 n} \paren {-1}^{n - 1} \paren {a x}^{2 n} 2 \paren {2^{2 n - 1} - 1} } {\paren {2 n}!} }} {{eqn | ll= \leadsto       | l = \int \dfrac x {\sin a x} \rd x       | r = \dfrac 1 {a^2} \sum_{n \mathop = 0}^\infty \dfrac {B_{2 n} \paren {-1}^{n - 1} \paren {a x}^{2 n + 1} 2 \paren {2^{2 n - 1} - 1} } {\paren {2 n + 1}!}       | c = Primitive of Power, Linear Combination of Integrals }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \sin^2 x \rd x       | r = \frac x 2 - \frac {\sin 2 x} 4 + C       | c = Primitive of $\sin^2 x$ }} {{eqn | ll= \leadsto       | l = \int \sin^2 a x \rd x       | r = \frac 1 a \paren {\frac {a x} 2 - \frac {\sin 2 a x} 4} + C       | c = Primitive of Function of Constant Multiple }} {{eqn | r = \frac x 2 - \frac {\sin 2 a x} {4 a} + C       | c = simplifying }} {{end-eqn}} {{qed}}
With a view to expressing the primitive in the form: :$\ds \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 = Derivative of Identity Function }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\d v} {\d x}       | r = \sin^2 a x       | c =  }} {{eqn | ll= \leadsto       | l = v       | r = \frac x 2 - \frac {\sin 2 a x} {4 a}       | c = Primitive of $\sin^2 a x$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int x \sin^2 a x \rd x       | r = x \paren {\frac x 2 - \frac {\sin 2 a x} {4 a} } - \int \paren {\frac x 2 - \frac {\sin 2 a x} {4 a} } \times 1 \rd x + C       | c = Integration by Parts }} {{eqn | r = \frac {x^2} 2 - \frac {x \sin 2 a x} {4 a} - \frac 1 2 \int x \rd x + \frac 1 {4 a} \int \sin 2 a x \rd x + C       | c = Linear Combination of Integrals }} {{eqn | r = \frac {x^2} 2 - \frac {x \sin 2 a x} {4 a} - \frac {x^2} 4 + \frac 1 {4 a} \int \sin 2 a x \rd x + C       | c = Primitive of Power }} {{eqn | r = \frac {x^2} 2 - \frac {x \sin 2 a x} {4 a} - \frac {x^2} 4 + \frac 1 {4 a} \frac {\paren {-\cos 2 a x} } {2 a} + C       | c = Primitive of $\sin a x$ }} {{eqn | r = \frac {x^2} 4 - \frac {x \sin 2 a x} {4 a} - \frac {\cos 2 a x} {8 a^2} + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \sin^3 a x \rd x       | r = \int \paren {\frac {3 \sin a x - \sin 3 a x} 4} \rd x       | c = Power Reduction Formula for Cube of Sine }} {{eqn | r = \frac 3 4 \int \sin a x \rd x - \frac 1 4 \int \sin 3 a x \rd x       | c = Linear Combination of Integrals }} {{eqn | r = \frac 3 4 \paren {\frac {-\cos a x} a} - \frac 1 4 \paren {\frac {-\cos 3 a x} {3 a} } + C       | c = Primitive of $\sin a x$ }} {{eqn | r = \frac {-3 \cos a x} {4 a} + \frac 1 {12 a} \paren {\cos 3 a x} + C       | c = simplifying }} {{eqn | r = \frac {-3 \cos a x} {4 a} + \frac 1 {12 a} \paren {4 \cos^3 a x - 3 \cos a x} + C       | c = Triple Angle Formula for Cosine }} {{eqn | r = \frac {-3 \cos a x} {4 a} + \frac {\cos^3 a x} {3 a} - \frac {\cos a x} {4 a} + C       | c = multipying out }} {{eqn | r = -\frac {\cos a x} a + \frac {\cos^3 a x} {3 a} + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \sin^4 a x \ \mathrm d x       | r = \int \left({\frac {3 - 4 \cos 2 a x + \cos 4 a x} 8}\right) \ \mathrm d x       | c = Power Reduction Formula for $\sin^4$ }} {{eqn | r = \frac 3 8 \int \mathrm d x - \frac 1 2 \int \cos 2 a x \ \mathrm d x + \frac 1 8 \int \cos 4 a x \ \mathrm d x       | c = Linear Combination of Integrals }} {{eqn | r = \frac {3 x} 8 - \frac 1 2 \int \cos 2 a x \ \mathrm d x + \frac 1 8 \int \cos 4 a x \ \mathrm d x + C       | c = Primitive of Constant }} {{eqn | r = \frac {3 x} 8 - \frac 1 2 \left({\frac {\sin 2 a x} {2 a} }\right) + \frac 1 8 \left({\frac {\sin 4 a x} {4 a} }\right) + C       | c = Primitive of $\cos a x$ }} {{eqn | r = \frac {3 x} 8 - \frac {\sin 2 a x} {4 a} + \frac {\sin 4 a x} {32 a} + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \csc^2 x \ \mathrm d x       | r = -\cot x + C       | c = Primitive of $\csc^2 x$ }} {{eqn | ll= \implies       | l = \int \csc^2 a x \ \mathrm d x       | r = \frac 1 a \left({-\cot a x}\right) + C       | c = Primitive of Function of Constant Multiple }} {{eqn | r = -\frac {\cot a x} a + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\mathrm d x} {\sin^2 a x}       | r = \int \csc^2 a x \ \mathrm d x       | c = Definition of Cosecant }} {{eqn | r = \frac {-\cot a x} a + C       | c = Primitive of $\csc^2 a x$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\mathrm d x} {\sin^3 a x}       | r = \int \csc^3 a x \ \mathrm d x       | c = Cosecant is $\dfrac 1 \sin$ }} {{eqn | r = \frac{-\csc a x \cot a x} {2 a} + \frac 1 2 \int \csc a x \ \mathrm d x       | c = Primitive of $\csc^n a x$ }} {{eqn | r = \frac {-\cos a x} {2 a \sin^2 a x} + \frac 1 2 \int \csc a x \ \mathrm d x       | c = Cosecant is $\dfrac 1 \sin$ and Cotangent is $\dfrac \cos \sin$ }} {{eqn | r = \frac {-\cos a x} {2 a \sin^2 a x} + \frac 1 {2 a} \ln \left\vert{\tan \frac {a x} 2}\right\vert + C       | c = Primitive of $\csc a x$ }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \sin p x \sin q x \rd x       | r = \int \paren {\frac {\map \cos {p x - q x} - \map \cos {p x + q x} } 2} \rd x       | c = Simpson's Formula for Sine by Sine }} {{eqn | r = \frac 1 2 \int \map \cos {p - q} x \rd x - \frac 1 2 \int \map \cos {p + q} x \rd x       | c = Linear Combination of Integrals }} {{eqn | r = \frac 1 2 \frac {\map \sin {p - q} x} {p - q} - \frac 1 2 \frac {\map \sin {p + q} x} {p + q} + C       | c = Primitive of $\cos a x$ }} {{eqn | r = \frac {\map \sin {p - q} x} {2 \paren {p - q} } - \frac {\map \sin {p + q} x} {2 \paren {p + q} } + C       | c = simplifying }} {{end-eqn}} {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {1 - \sin a x}       | r = \int \sec^2 \left({\frac \pi 4 + \frac {a x} 2}\right) \rd x       | c = Reciprocal of One Minus Sine }} {{eqn | n = 1       | r = \frac 1 2 \int \sec^2 \left({\frac \pi 4 + \frac {a x} 2}\right) \rd x       | c = Primitive of Constant Multiple of Function }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = z       | r = \frac \pi 4 + \frac {a x} 2 }} {{eqn | l = \frac {\d z} {\d x}       | r = \frac a 2       | c = Derivative of Power }} {{eqn | ll= \implies       | l = \int \frac {\d x} {1 - \sin a x}       | r = \frac 1 2 \int \frac 2 a \sec^2 z \rd z       | c = Integration by Substitution from $(1)$ }} {{eqn | r = \frac 1 2 \frac 2 a \tan z + C       | c = Primitive of Square of Secant Function }} {{eqn | r = \frac 1 a \tan \left({\frac \pi 4 + \frac {a x} 2}\right) + C       | c = simplifying }} {{end-eqn}} {{qed}}
With a view to expressing the primitive in the form: :$\ds \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 = Derivative of Identity Function }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\d v} {\d x}       | r = \frac 1 {1 - \sin a x}       | c =  }} {{eqn | ll= \leadsto       | l = v       | r = \frac 1 a \map \tan {\frac \pi 4 + \frac {a x} 2}       | c = Primitive of Reciprocal of 1 minus Sine of a x }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int \frac {x \rd x} {1 - \sin a x}       | r = x \paren {\frac 1 a \map \tan {\frac \pi 4 + \frac {a x} 2} } - \int \paren {\frac 1 a \map \tan {\frac \pi 4 + \frac {a x} 2} } \times 1 \rd x + C       | c = Integration by Parts }} {{eqn | r = \frac x a \map \tan {\frac \pi 4 + \frac {a x} 2} - \frac 1 a \int \map \tan {\frac \pi 4 + \frac {a x} 2} \rd x + C       | c = simplifying }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = z       | r = \frac \pi 4 + \frac {a x} 2 }} {{eqn | l = \frac {\d z} {\d x}       | r = \frac a 2       | c = Derivative of Power }} {{eqn | ll= \implies       | l = \frac 1 a \int \map \tan {\frac \pi 4 + \frac {a x} 2} \rd x       | r = \frac 1 a \int \frac 2 a \tan z \rd z       | c = Integration by Substitution }} {{eqn | r = -\frac 2 {a^2} \ln \size {\cos z} + C       | c = Primitive of $\tan z$: Cosine Form }} {{eqn | r = -\frac 2 {a^2} \ln \size {\map \cos {\frac \pi 4 + \frac {a x} 2} } + C       | c = substituting back for $z$ }} {{eqn | r = -\frac 2 {a^2} \ln \size {\map \sin {\frac \pi 2 - \paren {\frac \pi 4 + \frac {a x} 2} } } + C       | c = Sine of Complement equals Cosine }} {{eqn | r = -\frac 2 {a^2} \ln \size {\map \sin {\frac \pi 4 - \frac {a x} 2} } + C       | c =  }} {{end-eqn}} Putting it all together: :$\ds \int \frac {x \rd x} {1 - \sin a x} = \frac x a \map \tan {\frac \pi 4 + \frac {a x} 2} + \frac 2 {a^2} \ln \size {\map \sin {\frac \pi 4 - \frac {a x} 2} } + C$ {{qed}}
{{begin-eqn}} {{eqn | l = \int \frac {\d x} {1 + \sin a x}       | r = \int \frac 1 2 \map {\sec^2} {\frac \pi 4 - \frac {a x} 2} \rd x       | c = Reciprocal of One Plus Sine }} {{eqn | n = 1       | r = \frac 1 2 \int \map {\sec^2} {\frac \pi 4 - \frac {a x} 2} \rd x       | c = Primitive of Constant Multiple of Function }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = z       | r = \frac \pi 4 - \frac {a x} 2 }} {{eqn | l = \frac {\d z} {\d x}       | r = -\frac a 2       | c = Derivative of Power }} {{eqn | ll= \leadsto       | l = \int \frac {\d x} {1 + \sin a x}       | r = -\frac 1 2 \int \frac 2 a \sec^2 z \rd z       | c = Integration by Substitution from $(1)$ }} {{eqn | r = -\frac 1 2 \frac 2 a \tan z + C       | c = Primitive of Square of Secant Function }} {{eqn | r = -\frac 1 a \map \tan {\frac \pi 4 - \frac {a x} 2} + C       | c = substituting for $z$ }} {{end-eqn}} {{qed}}
With a view to expressing the primitive in the form: :$\ds \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 = Derivative of Identity Function }} {{end-eqn}} and let: {{begin-eqn}} {{eqn | l = \frac {\d v} {\d x}       | r = \frac 1 {1 + \sin a x}       | c =  }} {{eqn | ll= \leadsto       | l = v       | r = -\frac 1 a \map \tan {\frac \pi 4 - \frac {a x} 2}       | c = Primitive of $\dfrac 1 {1 + \sin a x}$ }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = \int \frac {x \rd x} {1 + \sin a x}       | r = x \paren {-\frac 1 a \map \tan {\frac \pi 4 - \frac {a x} 2} } - \int \paren {-\frac 1 a \map \tan {\frac \pi 4 - \frac {a x} 2} } \times 1 \rd x + C       | c = Integration by Parts }} {{eqn | r = -\frac x a \map \tan {\frac \pi 4 - \frac {a x} 2} + \frac 1 a \int \map \tan {\frac \pi 4 - \frac {a x} 2} \rd x + C       | c = simplifying }} {{end-eqn}} Then: {{begin-eqn}} {{eqn | l = z       | r = \frac \pi 4 - \frac {a x} 2 }} {{eqn | l = \frac {\d z} {\d x}       | r = -\frac a 2       | c = Derivative of Power }} {{eqn | ll= \leadsto       | l = \frac 1 a \int \map \tan {\frac \pi 4 - \frac {a x} 2} \rd x       | r = -\frac 1 a \int \frac 2 a \tan z \rd z       | c = Integration by Substitution }} {{eqn | r = -\frac {-2} {a^2} \ln \size {\cos z} + C       | c = Primitive of $\tan z$: Cosine Form }} {{eqn | r = \frac 2 {a^2} \ln \size {\map \cos {\frac \pi 4 - \frac {a x} 2} } + C       | c = substituting back for $z$ }} {{eqn | r = \frac 2 {a^2} \ln \size {\map \sin {\frac \pi 2 - \paren {\frac \pi 4 - \frac {a x} 2} } } + C       | c = Sine of Complement equals Cosine }} {{eqn | r = \frac 2 {a^2} \ln \size {\map \sin {\frac \pi 4 + \frac {a x} 2} } + C       | c =  }} {{end-eqn}} Putting it all together: :$\ds \int \frac {x \rd x} {1 - \sin a x} = -\frac x a \map \tan {\frac \pi 4 - \frac {a x} 2} + \frac 2 {a^2} \ln \size {\map \sin {\frac \pi 4 + \frac {a x} 2} } + C$ {{qed}}