# Integration that leads to logarithm functions problem

Hi everyone,
So I am a high school student and I am learning calculus by myself right now (pretty new to that stuff still). Currently I am working through some problems where integration leads to logarithm functions. While doing one of the exercises I noticed one thing I don't understand. I think I am missing something obvious. Could someone explain this to me please?

So the task is to solve an integral:

(1)$$\int { \frac { { x }^{ -\frac { 1 }{ 2 } } }{ { 2x }^{ \frac { 1 }{ 2 } } } } dx$$

I reduced it to
(2) $$\int { \frac { 1 }{ 2x } } dx$$

And then solved it, no problem here (yet)
(3)$$\int { \frac { 1 }{ 2x } } dx\quad =\quad \int { \frac { 1 }{ 2 } \cdot } \frac { 1 }{ x } dx\quad =\quad \frac { 1 }{ 2 } \cdot \int { \frac { 1 }{ x } dx } \quad =\quad \frac { 1 }{ 2 } \ln { \left| x \right| } +C$$

But I thought as well that I can do it a different way round. I could set the nominator to be the derivative of 2x to use the rule:
(4)$$\int { \frac { f'(x) }{ f(x) } } dx\quad =\quad \ln { \left| f(x) \right| } +C$$
(I know I used it previously )

So that is what I did first, as 2 is the derivative i set the nominator as 2 and compensated for it with a fraction:
(5)$$\int { \frac { 1 }{ 2x } } dx\quad =\quad \int { \frac { 1 }{ 2 } } \cdot \frac { 2 }{ 2x } dx\quad =\quad \frac { 1 }{ 2 } \int { \frac { 2 }{ 2x } } dx$$
I know the integrand can be simplified but I think it should work either way, shouldn't it? Please correct me if I'm wrong.

Back to the solving. So now, according to the rule from the eq. (4) I get something weird:
(6)$$\frac { 1 }{ 2 } \int { \frac { 2 }{ 2x } } dx\quad =\quad \frac { 1 }{ 2 } \ln { \left| 2x \right| } +C$$
And the result does not equal to the one I got in the eq. (3). Please help, where have I made a mistake?

Orodruin
Staff Emeritus