tanxdx


By Liwei Deng (P2942) on Monday, February 5, 2001 - 10:54 pm :

I tried to integrate tan x using integration by parts, but got some strange results.

tanxdx=sinxsecxdx

Let sinx be du/dx, and secx be v

so u=-cosx, and dv/dx=tanx×secx
using integration by parts,

sinxsecx=-cosx×secx--cosx×tanx×secxdx
it simplifies to

tanx=-1+tanx
so 0 = -1 !!!

What is going on here? Can anyone spot any mistakes in the calculations?


By James Lingard (Jchl2) on Monday, February 5, 2001 - 11:30 pm :
Hi,

When you integrate by parts, as with any other (indefinite, i.e. without limits specified in the integral) integration, you have to introduce an arbitrary constant, so all that will happen is that the constant will cancel with the -1 - you've managed to prove that tanxdx=tanxdx!

If you want to integrate tanx, the best way is to notice that tanx=sinx/cosx, where sinx=-d/dx(cosx), so you can substitute t=cosx, and you get

tanxdx=-ln(cosx)+c

James.


By Liwei Deng (P2942) on Wednesday, February 7, 2001 - 08:11 am :

thanks, James,
but surely there should be a constant of integration on each side, and they cancel out, so the result is still -1=0?


By James Lingard (Jchl2) on Wednesday, February 7, 2001 - 09:33 am :
No. There should be a constant of integration on each side, but they don't have to be the same, so they don't cancel out. So it is conventional to amalgamate them and just put in one constant.

For example, when solving the differential equation dy/dx=x, you get

dy/dxdx=xdx

y+ c1 =(1/2) x2 + c2

y=(1/2) x2 +( c2 - c1 )

y=(1/2) x2 +c

where we write c for the c2 - c1 , the combined constant of integration.

Here's another simple ''example'', which is essentially the same as your first problem:

x+1=d/dx(x+1)dx

x+1=1dx

x+1=x

1=0

This shows why you really do need the constant of integration. And here's another ''example'' where we integrate on both sides:

d/dx(x)dx+1=d/dx(x+1)dx

1dx+1=1dx

x+1=x

1=0

So here we need a constant of integration, which is not the same on both sides.

James.


By Liwei Deng (P2942) on Wednesday, February 7, 2001 - 10:30 am :

Thanks, James.
I think I understand now.