Weird integral - what's wrong?

  • #1

Main Question or Discussion Point

Heya...

I just stumbled upon this integral while doing ODEs...

∫x*(x-2)-2dx

I used integration by parts

u=x
du/dx=1
dv/dx=(x-2)-2
v=-(x-2)-1

Thus

∫x*(x-2)-2dx=-x(x-2)-1-∫1*-(x-2)-1dx=-x*(x-2)-1+ln(x-2)+C

Now... I don't see anything wrong with this...

But every single online integration calculator as well as the ODE solution solves this integral by doing 1/(x-2)+2/(x-2)2 and they all get

-2*(x-2)-1+ln(x-2)+C

as a result...

What am I doing wrong in my integration by parts? What am I missing? Oo
 
  • Like
Likes eifphysics

Answers and Replies

  • #2
mathman
Science Advisor
7,839
439
There is nothing wrong. The two results are equivalent.

[itex]\frac{x}{x-2}=\frac{x-2+2}{x-2}=1+\frac{2}{x-2}[/itex].

The difference is only in the constant of integration.
 
  • Like
Likes QuickQThrowaway and mrnike992
  • #3
There is nothing wrong. The two results are equivalent.

[itex]\frac{x}{x-2}=\frac{x-2+2}{x-2}=1+\frac{2}{x-2}[/itex].

The difference is only in the constant of integration.
Thank you!
The maths department screwed up then because the question asked to verify that C=2 but with the above integration it equals 3... So they omitted one result... >.<
 

Related Threads on Weird integral - what's wrong?

  • Last Post
Replies
9
Views
2K
Replies
3
Views
983
  • Last Post
Replies
18
Views
4K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
1
Views
945
Replies
1
Views
1K
Replies
4
Views
2K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
3
Views
856
Top