\sin \left(ax\right)\cos \left(ax\right)
x\sin \left(ax\right)\sin \left(bx\right)
\int \sin^2 \left(ax\right) \, \mathrm dx= \frac{x}{2} - \frac {\sin\left(2ax\right)}{4a} + C
Using the formula for half angles:
\cos(2\theta) = 1 - \sin^2(\theta)
so that:
\sin^2(\theta) = \frac{1}{2} \left[ 1 - \cos(2\theta) \right]
gives:
\int \sin^2 \left(ax\right) \, \mathrm dx = \frac{1}{2} \int \left[1 - \cos(2ax) \right]\mathrm dx = \frac{x}{2} - \frac{1}{2} \int \cos(2ax) \mathrm dx + C = \frac{x}{2} - \frac {\sin\left(2ax\right)}{4a} + C
\int \cos^2 \left(ax\right) \, \mathrm dx= \frac{x}{2} + \frac {\sin\left(2ax\right)}{4a} + C
Using the formula for half angles:
\cos(2\theta) = 2 \cos^2(\theta) - 1
so that:
\cos^2(\theta) = \frac{1}{2} \left[ 1 + \cos(2\theta) \right]
gives:
\int \cos^2 \left(ax\right) \, \mathrm dx = \frac{1}{2} \int \left[1 + \cos(2ax) \right]\mathrm dx = \frac{x}{2} + \frac{1}{2} \int \cos(2ax) \mathrm dx + C = \frac{x}{2} + \frac {\sin\left(2ax\right)}{4a} + C
\int x\sin \left(ax\right) \, \mathrm dx=\frac {\sin\left(ax\right)}{a^2}-\frac {x\cos \left(ax\right)}{a}+C
Using integration by parts:
\int f'(x)g(x)\mathrm dx = f(x)g(x) - \int f(x)g(x)'\mathrm dx + C
with:
\begin{aligned} & f(x)' = \sin\left(ax\right) \\ & g(x) = x \\ & f(x) = -\frac{1}{a}\cos\left(ax\right) \end{aligned}
gives:
\begin{aligned} \int x\sin \left(ax\right) \, \mathrm dx & = - \frac {x\cos \left(ax\right)}{a} + \frac{1}{a}\ \int \cos\left(ax\right) \, \mathrm dx + C \\ & = \frac {\sin\left(ax\right)}{a^2}-\frac {x\cos \left(ax\right)}{a}+C \end{aligned}
\int x\cos \left(ax\right) \, \mathrm dx=\frac {\cos\left(ax\right)}{a^2}+\frac {x\sin \left(ax\right)}{a}+C
Using integration by parts:
\int f'(x)g(x)\mathrm dx = f(x)g(x) - \int f(x)g(x)'\mathrm dx + C
with:
\begin{aligned} & f(x)' = \cos\left(ax\right) \\ & g(x) = x \\ & f(x) = \frac{1}{a}\sin\left(ax\right) \end{aligned}
gives:
\begin{aligned} \int x\cos \left(ax\right) \, \mathrm dx & = \frac {x\sin \left(ax\right)}{a} - \frac{1}{a}\ \int \sin\left(ax\right) \, \mathrm dx + C \\ & = \frac {\cos\left(ax\right)}{a^2}+\frac {x\sin \left(ax\right)}{a}+C \end{aligned}
\int x^2\sin \left(ax\right) \, \mathrm dx=\frac {2}{a^2}x\sin \left(ax\right) + \frac{2-a^2x^2}{a^3} \cos \left(ax\right)+C
Using integration by parts:
\int f'(x)g(x)\mathrm dx = f(x)g(x) - \int f(x)g(x)'\mathrm dx + C
with:
\begin{aligned} & f(x)' = \sin\left(ax\right) \\ & g(x) = x^2 \\ & f(x) = -\frac{1}{a}\cos\left(ax\right) \end{aligned}
gives:
\int x^2\sin \left(ax\right) \, \mathrm dx = - \frac {x^2\cos \left(ax\right)}{a} + \frac{2}{a}\ \int x\cos\left(ax\right) \, \mathrm dx + C
Then applying the integration by part formula for x\cos\left(ax\right) above to the second integral it gives the final result:
\begin{aligned} \int x^2\sin \left(ax\right) \, \mathrm dx & = - \frac {x^2\cos \left(ax\right)}{a} + 2\frac {\cos\left(ax\right)}{a^3}+2\frac {x\sin \left(ax\right)}{a^2} + C \\ & = \frac {2}{a^2}x\sin \left(ax\right) + \frac{2-a^2x^2}{a^3} \cos \left(ax\right) + C \end{aligned}
\int x^2\cos \left(ax\right) \, \mathrm dx=\frac {2}{a^2}x\cos \left(ax\right) + \frac{a^2x^2-2}{a^3} \sin \left(ax\right) + C
Using integration by parts:
\int f'(x)g(x)\mathrm dx = f(x)g(x) - \int f(x)g(x)'\mathrm dx + C
with:
\begin{aligned} & f(x)' = \cos\left(ax\right) \\ & g(x) = x^2 \\ & f(x) = \frac{1}{a}\sin\left(ax\right) \end{aligned}
gives:
\int x^2\cos \left(ax\right) \, \mathrm dx = \frac {x^2\sin \left(ax\right)}{a} - \frac{2}{a}\ \int x\sin\left(ax\right) \, \mathrm dx + C
Then applying the integration by part formula for x\sin\left(ax\right) above to the second integral it gives the final result:
\begin{aligned} \int x^2\cos \left(ax\right) \, \mathrm dx & = \frac {x^2\sin \left(ax\right)}{a} - \frac {2\sin\left(ax\right)}{a^3}+\frac {2x\cos \left(ax\right)}{a^2} + C\\ & = \frac {2}{a^2}x\cos \left(ax\right) + \frac{a^2x^2-2}{a^3} \sin \left(ax\right) + C \end{aligned}
\int x\sin^2 \left(ax\right) \, \mathrm dx=\frac{x^2}{4} - \frac {\cos\left(2ax\right)}{8a^2} - \frac {x\sin \left(2ax\right)}{4a} + C
Using the formula for half angles:
\cos(2\theta) = 1 - \sin^2(\theta)
so that:
\sin^2(\theta) = \frac{1}{2} \left[ 1 - \cos(2\theta) \right]
gives:
\int x\sin^2 \left(ax\right) \, \mathrm dx = \frac{1}{2} \int x\left[1 - \cos(2ax) \right]\mathrm dx = \frac{x^2}{4} - \frac{1}{2} \int x \cos(2ax) \mathrm dx + C
Then applying the integration by part formula for x\cos\left(ax\right) (noting that a above is 2a in this integral) gives the final result:
\begin{aligned} \int x^2\sin \left(ax\right) \, \mathrm dx & = \frac{x^2}{4} - \frac{1}{2}\left[ \frac {\cos\left(2ax\right)}{4a^2}+\frac {x\sin \left(2ax\right)}{2a}\right] + C \\ & = \frac{x^2}{4} - \frac {\cos\left(2ax\right)}{8a^2} - \frac {x\sin \left(2ax\right)}{4a} + C \end{aligned}
\int x^2\sin^2 \left(ax\right) \, \mathrm dx= \frac{x^3}{6} + \frac{1}{4a} x^2 \sin \left(2ax\right) - \frac {1}{4a^2}x\cos \left(2ax\right) -\frac{1}{8a^3} \sin \left(2ax\right) + C
Using the formula for half angles:
\cos(2\theta) = 1 - \sin^2(\theta)
so that:
\sin^2(\theta) = \frac{1}{2} \left[ 1 - \cos(2\theta) \right]
gives:
\int x^2\sin^2 \left(ax\right) \, \mathrm dx = \frac{1}{2} \int x^2\left[1 - \cos(2ax) \right]\mathrm dx = \frac{x^3}{6} - \frac{1}{2} \int x^2 \cos(2ax) \mathrm dx + C
Then applying the integration by part formula for x^2\cos\left(ax\right) (noting that a above is 2a in this integral) gives the final result:
\begin{aligned} \int x^2\sin \left(ax\right) \, \mathrm dx & = \frac{x^3}{6} - \frac{1}{2}\left[ \frac {2}{4a^2}x\cos \left(2ax\right) + \frac{4a^2x^2-2}{8a^3} \sin \left(2ax\right)\right] + C \\ & = \frac{x^3}{6} + \frac{1}{4a} x^2 \sin \left(2ax\right) - \frac {1}{4a^2}x\cos \left(2ax\right) -\frac{1}{8a^3} \sin \left(2ax\right) + C \end{aligned}
\int \sin \left(ax\right)\cos \left(ax\right) \, \mathrm dx= \frac{1}{2a} \sin^2 \left(ax\right) + C
Using the substitution method, let’s set u = \sin(ax). Then, the differential \mathrm du is given by \mathrm du = a \cos(ax) \, \mathrm dx. Rearranging for dx, it gives \mathrm dx = \frac{\mathrm du}{a \cos(ax)}.
Substituting into the integral:
\int \sin(ax) \cos(ax) \,\mathrm dx = \int u \cdot \frac{\mathrm du}{a}
Integrating with respect to u:
\int u \cdot \frac{\mathrm du}{a} = \frac{1}{a} \int u \,\mathrm du = \frac{1}{a} \cdot \frac{u^2}{2} + C = \frac{1}{2a} \sin^2(ax) + C
\int x \sin \left(ax\right)\sin \left(bx\right) \, \mathrm dx =\frac{1}{2}\left[\frac {x\sin \left((a-b)x\right)}{a-b} - \frac {x\sin \left((a+b)x\right)}{a+b} + \frac {\cos\left((a-b)x\right)}{(a-b)^2} - \frac {\cos\left((a+b)x\right)}{(a+b)^2} \right] + C
Using the formula for sum and differences angles:
\begin{aligned} \cos(\alpha - \beta ) & = \cos (\alpha) \cos (\beta) + \sin (\alpha) \sin (\beta) \\ \cos(\alpha + \beta ) & = \cos (\alpha) \cos (\beta) - \sin (\alpha) \sin (\beta) \end{aligned}
Subtracting:
\sin (\alpha) \sin (\beta) = \frac{\cos(\alpha - \beta ) - \cos(\alpha + \beta ) }{2}
Substituting:
\begin{aligned} \int x \sin \left(ax\right)\sin \left(bx\right) \, \mathrm dx = & \frac{1}{2} \int x\left[ \cos((a-b)x) - \cos((a+b)x) \right] \mathrm dx \\ = & \frac{1}{2}\left[\frac {\cos\left((a-b)x\right)}{(a-b)^2} + \frac {x\sin \left((a-b)x\right)}{a-b} - \frac {\cos\left((a+b)x\right)}{(a+b)^2} - \frac {x\sin \left((a+b)x\right)}{a + b} \right] + C \\ = & \frac{1}{2}\left[\frac {x\sin \left((a-b)x\right)}{a-b} - \frac {x\sin \left((a+b)x\right)}{a+b} + \frac {\cos\left((a-b)x\right)}{(a-b)^2} - \frac {\cos\left((a+b)x\right)}{(a+b)^2} \right] + C \\ \end{aligned}