Question: How to evaluate ∫1sinxcosxdx
I know that the correct answer can be obtained by doing:
1sinxcosx=sin2(x)sinxcosx+cos2(x)sinxcosx=tan(x)+cot(x) and integrating.
However, doing the following gets a completely different answer:
∫1sinxcosxdx=∫sinxsin2(x)cosxdx=∫sinx(1−cos2(x))cosxdx.
let u=cosx,du=−sinxdx; then
∫1sinxcosxdx=∫−1(1−u2)udu=∫−1(1+u)(1−u)udu=∫(−1u−12(1−u)+12(1+u))du=−ln|cosx|+12ln|1−cosx|+12ln|1+cosx|+C
I tested both results in Mathematica, and the first method gets the correct answer, but the second method doesn't. Is there any reason why this second method doesn't work?
Answer
If I take the derivative of your second answer (call it g(x)), I get:
dgdx=−−sinxcosx+sinx2(1−cosx)+−sinx2(1+cosx)=sinx(1−cos2x+12cosx(1+cosx)−12cosx(1−cosx))cosx(1−cosx)(1+cosx)=sinx(1−cos2x+12cosx+12cos2x−12cosx+12cos2x)cosx(1−cos2x)=sinxcosxsin2x=1cosxsinx.
So I'm not sure why Mathematica says the second method is not "the right answer".
No comments:
Post a Comment