\[\int\limits_{0}^{\pi}1/2(\cos x+\left| \cos x \right|)dx\]=?
\[\int\limits_{0}^{\pi}1/2(\cos x+\left| \cos x \right|)dx\]
I know the answer is 1. But how to get the answer?
\[\frac{1}{2} \int_0^{\pi } \cos (x) \, dx\] +\[\frac{1}{2} \int_0^{\frac{\pi }{2}} \cos (x) \, dx\]+\[-\frac{1}{2} \int_{\frac{\pi }{2}}^{\pi } \cos (x) \, dx\]
\[=\frac{1}{2}\int\limits_{0}^{\pi}cosx dx+\frac{1}{2}\int\limits_{0}^{\pi}\left| cosx \right|\]Now, the first integral is easy:\[\frac{1}{2}sinx|_{0}^{\pi}=0\]
\[\int_0^{\pi } |\cos (x)| \, dx=\int_{\frac{\pi }{2}}^{\pi } -\cos (x) \, dx+\int_0^{\frac{\pi }{2}} \cos (x) \, dx\]
Why become ∫ππ2−cos(x)dx+∫π20cos(x)dx ?
because value of cos is negative between pi/2 to pi
but if we integrate we get sin right?
So, we are left with the absolute value integral. We note that \[cosx \ge0\]When,\[0\le x \le \frac{\pi}{2}\]So we can split the integral into:\[\frac{1}{2}\int\limits_{0}^{\frac{\pi}{2}}cosx dx + \frac{1}{2}\int\limits_{\frac{\pi}{2}}^{\pi}\left| \cos x \right|dx\]Since cosx is negative in the second interval we write:\[\frac{1}{2}\int\limits_{0}^{\frac{\pi}{2}}cosx dx - \frac{1}{2}\int\limits_{\frac{\pi}{2}}^{\pi}cos x dx\]This gives:\[\frac{1}{2}sinx|_{0}^{?\frac{\pi}{2}}-\frac{1}{2}sinx|_{\frac{\pi}{2}}^{\pi}\]This gives:\[\frac{1}{2}-\frac{1}{2}(0-1)=1\]
we want value of cos to be positive all through out. So when Cos[x] is positive we leave it as it is. When it is negative, we negate it to turn it into positive
do you remember the definition |x|=x when x>0 =-x when x<0 ?
I only know that |-x|=x. But I think I understand. Thanks all.
so is |-x|=x true for all x? what about if x=-3 |-(-3)|=-3 <-this is not true distance can't be negative so |-x|=x is untrue
I remember that cos is positive for 0 to 90 degree and 270 to 360 degree. So I think I understand how to do it.Thanks.
ok well its also good that you know that definition i mention too everywhere you see an x you can put cosx instead
What I mean is the value inside|| will be all positive.
or neutral lol
Ya. Thanks a lot.
let us know if you have anymore questions steven we haven't gotten alot of calculus questions and cal questions are more fun
today anyways
Join our real-time social learning platform and learn together with your friends!