Why I'm Getting Wrong Answer With This Method: f(x)=\int\frac{x+1}{x^2+2x}

  • Thread starter Thread starter e^(i Pi)+1=0
  • Start date Start date
  • Tags Tags
    Method
e^(i Pi)+1=0
Messages
246
Reaction score
1

Homework Statement


f(x)=\int\frac{x+1}{x^2+2x}


The Attempt at a Solution



I know that this can be solved with substitution. I'm wondering why I get the wrong answer when using this other method...

f(x)=\int\frac{x+1}{x^2+2x}

=\int\frac{x}{x^2+2x}+\frac{1}{x^2+2x}


=\int\frac{1}{x+2}+\int\frac{1}{x^2+2}

=ln(x+2)+ln(x^2+2) + c

I could simplify more, but it's wrong. It should be .5(x^2+2) + c

I'm guessing that \int\frac{1}{x^2+2}\neq ln(x^2+2) so in what cases does \int \frac{1}{x} = ln(x) + c not hold?? I just learned this stuff today so any answers will have to be rather explicit please.
 
Physics news on Phys.org
e^(i Pi)+1=0 said:
I'm guessing that ∫ 1/(x2+2) dx ≠ ln(x2+2)

This.

d/dx ln(x2+2) = 2x/(x2+2), which is obviously not equal to 1/(x2+2). Never forget the chain rule.

To integrate 1/(x2+2), you need to use trigonometric substitution.
 
Last edited by a moderator:
Don't know that yet. So I guess that any time there's a nested function then ∫(1/x) dx=ln(x)+c doesn't hold?
 
Last edited by a moderator:
Do you know of the chain rule?
 
Last edited by a moderator:
e^(i Pi)+1=0 said:
Don't know that yet. So I guess that any time there's a nested function then ∫(1/x) dx=ln(x)+c doesn't hold?
Of course \displaystyle \int \frac{1}{x}\,dx=\ln|x|+C always holds.

What doesn't hold in general is \displaystyle \int \frac{1}{f(x)}\,dx=\ln|f(x)|+C
 
Last edited by a moderator:
Harrisonized said:
Do you know of the chain rule?

Yes, I meant I don't know trig substitution.
 
Last edited by a moderator:
SammyS said:
Of course \displaystyle \int \frac{1}{x}\,dx=\ln|x|+C always holds.

What doesn't hold in general is \displaystyle \int \frac{1}{f(x)}\,dx=\ln|f(x)|+C

Could you provide a few examples please?
 
Last edited by a moderator:
You did this problem the hard way, by splitting in into two integrals. An easy substitution will do the trick.

Let u = x2 + 2x, so du = (2x + 2)dx
Notice any similarity to the numerator of your original integral?
 
Last edited:
e^(i Pi)+1=0 said:
Yes, I meant I don't know trig substitution.

It's not a trig substitution. It's a u substitution. Try putting u=x^2+2x. What is du?
 
  • #10
To the above two posts -

I know it's not trig substitution, I only mentioned I don't know that because it was mentioned by someone else. U-sub is easy, but I was trying to solve it this way because I'm trying to get a handle on derivatives and integrals of ln(x)
 
  • #11
e^(i Pi)+1=0 said:
To the above two posts -

I know it's not trig substitution, I only mentioned I don't know that because it was mentioned by someone else. U-sub is easy, but I was trying to solve it this way because I'm trying to get a handle on derivatives and integrals of ln(x)

If you don't want to do it the easy way using U-sub, then you'll need to do partial fractions on the second integral. Do you know that?
 
  • #12
Dick said:
If you don't want to do it the easy way using U-sub, then you'll need to do partial fractions on the second integral.

Or complete the square and use a trig substitution?
 
  • #13
Bohrok said:
Or complete the square and use a trig substitution?

If doing it the hard way isn't enough and you want to do it the REALLY hard way, that should work.
 
  • #14
SammyS said:
Of course \displaystyle \int \frac{1}{x}\,dx=\ln|x|+C always holds.

What doesn't hold in general is \displaystyle \int \frac{1}{f(x)}\,dx=\ln|f(x)|+C

e^(i Pi)+1=0 said:
Could you provide a few examples please?

For instance, if f(x) = x2, then

\displaystyle \int \frac{1}{f(x)}\,dx=\int\frac{1}{x^2}\,dx=\int x^{-2}\,dx=-x^{-1}+C\ne\ln(x^2)+C
 
  • #15
e^(i Pi)+1=0 said:
Could you provide a few examples please?

\int\frac{1}{x}dx=\ln|x|+c only holds because \frac{d}{dx}\left(\ln|x|+c\right)=\frac{1}{x}\cdot \frac{d}{dx}(x)=\frac{1}{x} by use of the chain rule, while, in general, \frac{d}{dx}\left(\ln|f(x)|+c\right)=\frac{1}{f(x)}\cdot\frac{d}{dx}f(x)=\frac{f'(x)}{f(x)}

So if you have some f(x) in the denominator that needs integrating, unless the numerator is the derivative of the denomintor (or at least a constant multiplied by the derivative) then you can't take the log.
 
Back
Top