Integral $\int_0^{\pi/2} \sin(ax)\cos(x)\,dx$ I have to evaluate an integral $I(a) = \sin(ax)\cos(x)$ from $0$ to $\pi/2$.The variable of $a$ is not is greater than $1$:
$$\int_0^{\pi/2} \sin(ax)\cos(x)\,dx$$
I attempted to change the function to $[\sin(ax+x)+\sin(ax-x)]/2$ and then integrate, but I am left with  (-)cosines with a zero in the denominator. How do I remedy this? Am I missing something conceptual.
 A: You can find the indefinite integral via integration by parts:
$$\int \cos x \sin (ax)dx = \sin x \sin (ax) -\int a \sin x \cos (ax)dx$$
$$= \sin x \sin (ax) - a\left(-\cos x \cos(ax)-a\int\cos x \sin(ax)dx \right),$$
which leads to 
$$\int \cos x \sin (ax)dx = a^2 \int \cos x \sin (ax)dx +\sin x \sin (ax) + a \cos x \cos(ax),$$and hence
$$\int \cos x \sin (ax)dx =\frac{\sin x \sin (ax) + a \cos x \cos(ax)}{1-a^2}.$$
A: When you change the function and integrate you get
$$\frac{1}{2}\int\sin(ax+x)+\sin(ax-x)dx$$
Then the integral of each term is, for example:
$$\int\sin(ax+x)dx=-\frac{\cos(ax+x)}{a+1}.$$
Unless $a+1=0$ or $a-1=0$ (For the other integral) you shouldn't have any problem integrating it with respect to $x$.
When you evaluate the integral at $x=0$ you get
$$-\frac{\cos(0)}{a+1}=\frac{-1}{a+1}.$$

For the case in which $a+1=0$ you get the integral
$$\frac{1}{2}\int\sin(0)+\sin(-2x)dx=\frac{1}{2}\int\sin(-2x)dx$$
which is also easy to calculate. The case $a-1=0$ can be treated the same way.
A: Your approach is good. Integrate the following identity term-wise:
$$
   \sin(a x) \cos(x) = \frac{1}{2} \sin\left(\left(1+a\right)x\right) - \frac{1}{2} \sin\left(\left(1-a\right) x\right)
$$
getting
$$
   \int_0^{\pi/2} \sin(a x) \cos(x) \mathrm{d}x = \frac{1}{2} \int_0^{\pi/2} \sin\left(\left(1+a\right)x\right)\mathrm{d}x - \frac{1}{2} \int_0^{\pi/2} \sin\left(\left(1-a\right)x\right)\mathrm{d}x
$$
And using $\int \sin(\omega x) \mathrm{d}x = -\frac{1}{\omega} \cos(\omega x)$, hence
$$
  \frac{1}{2} \int_0^{\pi/2} \sin\left(\left(1\pm a\right)x\right)\mathrm{d}x = \left. -\frac{1}{2(1 \pm a)} \cos\left(\left(1 \pm a\right) x \right)  \right|_{x = 0}^{x = \pi/2} = \frac{1}{2 \left(1\pm a\right)} \left(1- \cos\left(\frac{\pi}{2} \left(1 \pm a\right)\right)\right) = \frac{\sin^2\left(\frac{\pi}{2} \frac{1 \pm a}{2}\right)}{ 1\pm a} 
$$
Further simplifying the difference of $+$ and $-$ parts we get
$$
  \int_0^{\pi/2} \sin(a x) \cos(x) \mathrm{d}x = \frac{\sin\left(\frac{\pi}{2} a \right) - a}{1-a^2}
$$
A: $I(a)=\int_0^{\pi/2} \sin (ax) \cos (x) dx= \frac{1}{2}\int_0^{\pi/2} \sin(x(a+1))+\sin(x(a-1)) dx=$
$$\frac{1}{2}\left[\int_0^{\pi/2} \sin(x(a+1))dx+\int_0^{\pi/2} \sin(x(a-1)) dx\right]$$
I'm going to start by calculating antiderivatives, and apply the bounds later. For the first integral, let $u=x(a+1)$ and $du=a+1 dx$. For the second, let $v=a(x-1)$ and $dv=a-1 dx$. We thus have
$$\frac{1}{2}\left[\frac{1}{a+1}\int \sin(u)du+\frac{1}{a-1}\int \sin(v) dv\right]$$
We can integrate to find the antiderivative 
$$\frac{1}{2}\left[\frac{-\cos(u)}{a+1} +\frac{-\cos(v)}{a-1} \right]$$
Back substituting for $u$ and $v$ gives us $$\frac{1}{2}\left[\frac{-\cos(x(a+1))}{a+1} +\frac{-\cos(x(a-1))}{a-1} \right]+C$$
However, we must still apply our bounds of $0$ and $\frac{\pi}{2}$.
$$\frac{1}{2}\left[\frac{-\cos(x(a+1))}{a+1} +\frac{-\cos(x(a-1))}{a-1} \right]_0^{\pi/2}.$$
Now, you just need to apply the bounds and you'll have your answer!
