# parting integral into two parts, is this correct?

I have:

$$\int_2^5 \mathrm{\frac{x-2}{x}}\,\mathrm{d}x$$

I tried:

$$\int_2^5 \mathrm{\frac{x-2}{x}}\,\mathrm{d}x = \int_2^5 \mathrm{(x-2)}\,\mathrm{d}x \cdot \int_2^5 \mathrm{\frac{1}{x}}\,\mathrm{d}x = [\frac{x^2}{2}+2x]_2^5 \cdot [ln(x)]_2^5$$

is this correct? i have the feeling, i am messing up the borders of integrals..

-
Technically $\displaystyle \int \limits_2^5 \mathrm{\dfrac{x-2}{x}}\,\mathrm{d}x=\mathrm{\dfrac{x-2}{x}}\int \limits_2^5 \mathrm 1 \,\mathrm{d}x=\mathrm{3\dfrac{x-2}{x}}$ . –  Git Gud Jun 8 '14 at 10:32

Yes, sorry to say that, but you misunderstood some integral properties...First of all $$\int_2^5 \mathrm{\frac{x-2}{x}}\,\mathrm{d}x = \int_2^5 1-\frac2x\,\mathrm{d}x=\int_2^5 \,\mathrm{d}x-2\int_2^5 \frac1x\,\mathrm{d}x=[x]_2^5-2[\ln x]_2^5=5-2-2(\ln 5 -\ln 2)=3-2\ln\left(\frac52\right)$$ Your method is wrong, as it is not always true that $$\int f(x)\cdot g(x) \,\mathrm{d}x = \int f(x) \,\mathrm{d}x \cdot \int g(x) \,\mathrm{d}x$$

-
"Not always" — as in "almost never". –  Anton Tykhyy Jun 8 '14 at 15:05

No. Instead you can write the integrand as:

$$\frac{x-2}{x}=\frac{x}{x}-\frac{2}{x}=1-2\cdot\frac{1}{x}$$

-

There's no hope that $\int f(x)g(x)~\mathrm{d}x=\int f(x)~\mathrm{d}x\int g(x)~\mathrm{d}x$ will lead you to the correct answer in general. Instead, you can write your fraction as: $$\dfrac{x-2}{x}=\dfrac{x}{x}-\dfrac{2}x=1-\dfrac2x.$$ Now, and since integrals are linear, you have: $$\int\dfrac{x-2}{x}\mathrm{d}x=\int\left[1-\dfrac2x\right]\mathrm{d}x=\int1~\mathrm{d}x+\int-\dfrac2x\mathrm{d}x.$$ The last integral can be evaluated by recalling that: $$\int\dfrac1x\mathrm dx=\ln|x|+\rm {const}.$$

For a bit more complicated fractions like $\tfrac{4x^3-x+1}{-x^3+4x}$ you can use the more general technique of decomposing fractions.

-

No. It is not true in general that $$\int f(x) g(x) \, dx = \int f(x) \, dx \int g(x) \, dx.$$

-
so what is the way of doing this? –  doniyor Jun 8 '14 at 10:27