# Integrating $\int\frac{1}{kx}dx$ [duplicate]

$\int\frac{1}{kx}dx$

There are two ways to integrate this...

Method 1 (Separating the coefficient from the variable):

$\frac{1}{k}\int\frac{1}{x}dx$

$\frac{\ln|x|}{k} + c$

Method 2 (knowing that it is an ln() function and multiplying by the reciprocal of the coefficient):

$\int\frac{1}{kx}dx$

$\frac{\ln|kx|}{k}+c$

When both solutions are derived, we get the same answer of $\frac{1}{kx}$.

Which solution is the correct solution?

• Since, as you write "When both solutions are derived, we get the same answer of $\frac{1}{kx}$", they are both right.
– MasB
May 2, 2016 at 23:52

## 2 Answers

$${\frac{\ln(kx)}{k}+C = \frac{\ln(k)}{k}+\frac{\ln(x)}{k}+C = \frac{\ln(x)}{k} + \tilde{C}}$$

So they're the same, they just differ by a constant

• Oh! It never occurred to me that more than one answer could be right... This is eye-opening. May 2, 2016 at 23:58
• @TakamaruTaihou technically indefinite integrals have infinite answers. Oct 11, 2016 at 17:39

Both are fine, they differ by a constant.

and actually $$\int \frac{1}{x} dx = \ln |x|$$