How we convert limits in following type of questions in definite integrals?
a.) $\int_0^{\pi} |\cos x| dx$
b.) $\int_0^{\frac{\pi}2} |\sin x \cos x| dx$
How know how to integrate but main problem is I want to know how limits converted?
How we convert limits in following type of questions in definite integrals?
a.) $\int_0^{\pi} |\cos x| dx$
b.) $\int_0^{\frac{\pi}2} |\sin x \cos x| dx$
How know how to integrate but main problem is I want to know how limits converted?
By definition: $$|f(x)|=\begin{cases} f(x) & f(x)\geq 0 \\ -f(x) & f(x)<0 \end{cases}\tag{1}$$ Therefore, when the value of your function is less than zero, you take the negative of your function $f(x)$. Let's do this with your first integral:
$$\int_0^{\pi}|\cos(x)|~dx$$ Let $f(x)=\cos(x)$. Now, note that: $$\cos(x)\geq 0, x\in [0,\frac{\pi}{2}]$$ And: $$\cos(x)<0, x\in (\frac{\pi}{2},\pi)$$ Applying definition $(1)$: $$\int_0^{\pi}|\cos(x)|~dx=\int_0^{\frac{\pi}{2}} \cos(x)~dx+\int_{\frac{\pi}{2}}^{\pi} -\cos(x)~dx$$
Try this with your second integral. Hint: $$\sin(2x)\equiv 2\sin(x)\cos(x)$$
Is my explanation clear? If you have any questions about my notation or anything related, feel free to ask.
Where ever ccosine changes its sign,the limits should be broken down accordingly. In this case, first limit is from $0$ uptil $\dfracπ2$ then putting a negative sign,integrate from $\dfracπ2$ to $π$. Similarly approach the second function by taking it as $\dfrac{\sin2x}{2}$