# Definite integral question

Tags:
1. Mar 15, 2015

1. The problem statement, all variables and given/known data
$$\int_0^{\pi/2}(sinx-cosx)ln(sinx)dx$$

2. Relevant equations
$int_0^af(x)dx=int_0^af(a-x)dx$

3. The attempt at a solution
Using above equation, you get (without integral sign):
$(sinx-cosx)ln(tanx)$ but it did not make any difference.
I got the answer by splitting the integral to $sinxln(sinx)$ and $cosxln(cosx)$ and then using integration by parts.(Answer verified without limits in wolfram alpha)
But the answer was long and time taking. Also the question is objective type and there has to be a shorter method. Can you provide a shorter method?

2. Mar 15, 2015

### haruspex

There's a way to express sin(x)-cos(x) as A sin(y).

3. Mar 15, 2015

Yes. Multiply and divide by $\sqrt{2}$ and put $\frac{1}{\sqrt{2}}$ as cos or sine to get $cosAsinB-sinAcosB$ which can be expressed as $sin(B-A)$.
So $sinx-cosx=\sqrt{2}sin(x-\frac{\pi}{4})$

4. Mar 15, 2015

### haruspex

Right. Does that suggest a change of variable?

5. Mar 15, 2015

Change in variable? The variable is still x.​

6. Mar 15, 2015

### haruspex

I was suggesting you make a change of variable to simplify the sin expression, but what I had in mind doesn't work.
Another way is to go to half angles, x=2u. In the original integral, the cos(x)ln(sin(x)).dx term is no problem, since that's like ln(y)dy. Expanding sin(2u) in the other term gets you to integrals like y.ln(y)dy. Whether this is simpler than the method you found is doubtful.

7. Mar 15, 2015

### SammyS

Staff Emeritus
I assume you are to evaluate the given definite integral by making use of the integral equivalence that's given.

You then have a = π/2 , so that $\displaystyle f(a - x) = \left(\sin(\pi/2-x)-\cos(\pi/2-x)\right)\ln\left(\sin(\pi/2-x)\right)$

However, $\sin(\pi/2-x)=\cos(x)\$ and $\cos(\pi/2-x)=\sin(x)\$ .

Make those substitutions & see what you get.

It looks like this is what you did to get $(\sin x-\cos x)\ln(\tan x)\$, so, never mind.

Last edited: Mar 15, 2015
8. Mar 15, 2015