0
$\begingroup$

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?

2 Answers 2

0

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.

  • 0
    First one is clear. Can you please explain second?2017-02-12
  • 0
    @Amar Well, under what values of $x$ is $\sin(x)\cos(x)\geq 0$ and under what values is it $<0$? My hint should help determine these values of $x$.2017-02-12
  • 0
    Sorry but I am not understand this one at all.2017-02-12
  • 0
    @Amar Ok, no problem. Note that $\sin(x)\cos(x)\equiv \frac{\sin(2x)}{2}$ from my hint. From that, you know that $\sin(x)\cos(x) \geq 0$ for $x \in [0,\frac{\pi}{2}]$, which is the full domain you have considered on your limits of integration. Therefore, there is no need to separate the limits, since it does not transition between cases on definition $(1)$. Clear?2017-02-12
  • 0
    But can we multiply and divide terms in magnitude with 2.2017-02-12
  • 0
    @Amar Yes. Therefore, the integral you should be solving is: $$\int_{0}^{\frac{\pi}{2}} |\sin(x)\cos(x)|~dx=\int_{0}^{\frac{\pi}{2}} \sin(x)\cos(x)~dx=\int_{0}^{\frac{\pi}{2}} \frac{\sin(2x)}{2}~dx$$ Since $\sin(x)\cos(x)\geq 0$ throughout the full domain ($0\leq x \leq \frac{\pi}{2}$) considered on your limits of integration, i.e, $|f(x)|=f(x)$ if $f(x)\geq 0$2017-02-12
  • 0
    I have one more question if you don't have any problem. $\int_{\frac{\pi}2}^{\frac{\pi}2} 2 sin |x| dx$2017-02-12
  • 0
    Here only x in magnitude. How this can be solved.2017-02-12
  • 0
    @Amar Your bounds are both set at $\frac{\pi}{2}$. Do you mean: $$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} 2\sin|x|~dx$$2017-02-12
  • 0
    @Amar Well, in this case, we know that $\sin(x)$ is an odd function (i.e. $f(-x)=-f(x)$). Therefore, it is reasonable to state that: $$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} 2\sin{|x|}~dx=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}|2\sin(x)|~dx$$ This can be separated as: $$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}|2\sin(x)|~dx=\int_{-\frac{\pi}{2}}^0 -2\sin{x}~dx+\int_0^{\frac{\pi}{2}} 2\sin{x}~dx$$2017-02-12
  • 0
    Can we write sin|x| into |sin x|? Are you sure?2017-02-12
  • 0
    @Amar Yes, we can in this exceptional case since it is an odd function: $f(-x)=-f(x)$. However, this cannot be done for all functions.2017-02-12
  • 0
    For example, we cannot do this for: $$\int_{-2}^2 2(6|x|+3)~dx\neq \int_{-2}^2 |2(6x+3)|~dx$$2017-02-12
  • 0
    If you have knowledge about this topic can you please answer. http://math.stackexchange.com/questions/2141196/doubts-in-integration-of-greatest-integer-function?noredirect=1#comment4404160_21411962017-02-13
0

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}$

  • 0
    Not clear. Can you please explain.2017-02-12
  • 0
    What I meant to say was, since there is a modulus, the sign changes need to be handled separately. Wherever the function becomes positive or negative, limits should be separately dealt with. I cant simplify more.2017-02-12