0

I just graduated high school and was doing some math in my spare time, but I can't seem to figure out why when I integrate this particular integral,

$I = \int{\frac{x}{3-x}}dx$

I get different answers.

My method:

$\ { u = 3 - x} $

$\ { \frac{du}{dx} = -1} $

Therefore:

$\ { I = -\int{\frac{3-u}{u}}du = u - 3ln(u) + C} $

So my result becomes:

$\ I = 3 - x - 3ln(3 - x) + C $

What I don't understand is: when I solved this using Wolfram Alpha I got this answer, where they simply just divided the 2 polynomials, and reaching the answer:

$\ {I = -x - 3ln(3-x) + C} $

I'm trying to understand why I reach a different answer, when I do the integral using u-sub. Please be gentle with me, I am nowhere near as decorated as the mathematicians here, and I'm just trying to find my way around, so I can hopefully be like you guys one day. Thank you in advance!

Emre
  • 19

1 Answers1

2

There exists infinitely many functions $F(x)$ such that $F'(x)=\frac{x}{x-3}.$ The important thing is that all such functions $F$ are on the form $$F(x)=-x-3\ln |3-x|+C,$$ where $C$ is a constant. You have obtained such two functions $F$, the first one $$F_1(x)=-x-3\ln |3-x|+C_1,$$ and $$F_2(x)=3-x-3\ln|3-x|+C_2.$$ Both are solutions and the only difference is that $C_1=3+C_2.$ Also don't forget the absolute value on $\ln |3-x|$, since we want to have the logarithm well defined

  • 1
    Thank you very much! This makes a lot of sense. I guess I need to really just focus on what an indefinite integral really is. This was very helpful. Thank you all for being very kind. – Emre Aug 30 '24 at 11:23
  • Yeah! Is important to know the basics. You are welcome :) – Guillermo García Sáez Aug 30 '24 at 11:26
  • No worries! We (not just decorated, but casual mathematicians like myself :-) ) are here to help people who make the effort to ask the questions and ask where they went wrong - your question and how it's presented is a perfect case of that (although there may be times where your question was answered elsewhere, and the question you asked may be closed). – bjcolby15 Aug 30 '24 at 12:21