Integral of $$$\frac{c}{x \left(c - x\right)}$$$ with respect to $$$x$$$

The calculator will find the integral/antiderivative of $$$\frac{c}{x \left(c - x\right)}$$$ with respect to $$$x$$$, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find $$$\int \frac{c}{x \left(c - x\right)}\, dx$$$.

Solution

Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=c$$$ and $$$f{\left(x \right)} = \frac{1}{x \left(c - x\right)}$$$:

$${\color{red}{\int{\frac{c}{x \left(c - x\right)} d x}}} = {\color{red}{c \int{\frac{1}{x \left(c - x\right)} d x}}}$$

Perform partial fraction decomposition:

$$c {\color{red}{\int{\frac{1}{x \left(c - x\right)} d x}}} = c {\color{red}{\int{\left(\frac{1}{c \left(c - x\right)} + \frac{1}{c x}\right)d x}}}$$

Integrate term by term:

$$c {\color{red}{\int{\left(\frac{1}{c \left(c - x\right)} + \frac{1}{c x}\right)d x}}} = c {\color{red}{\left(\int{\frac{1}{c x} d x} + \int{\frac{1}{c \left(c - x\right)} d x}\right)}}$$

Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=\frac{1}{c}$$$ and $$$f{\left(x \right)} = \frac{1}{x}$$$:

$$c \left(\int{\frac{1}{c \left(c - x\right)} d x} + {\color{red}{\int{\frac{1}{c x} d x}}}\right) = c \left(\int{\frac{1}{c \left(c - x\right)} d x} + {\color{red}{\frac{\int{\frac{1}{x} d x}}{c}}}\right)$$

The integral of $$$\frac{1}{x}$$$ is $$$\int{\frac{1}{x} d x} = \ln{\left(\left|{x}\right| \right)}$$$:

$$c \left(\int{\frac{1}{c \left(c - x\right)} d x} + \frac{{\color{red}{\int{\frac{1}{x} d x}}}}{c}\right) = c \left(\int{\frac{1}{c \left(c - x\right)} d x} + \frac{{\color{red}{\ln{\left(\left|{x}\right| \right)}}}}{c}\right)$$

Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=\frac{1}{c}$$$ and $$$f{\left(x \right)} = \frac{1}{c - x}$$$:

$$c \left({\color{red}{\int{\frac{1}{c \left(c - x\right)} d x}}} + \frac{\ln{\left(\left|{x}\right| \right)}}{c}\right) = c \left({\color{red}{\frac{\int{\frac{1}{c - x} d x}}{c}}} + \frac{\ln{\left(\left|{x}\right| \right)}}{c}\right)$$

Let $$$u=c - x$$$.

Then $$$du=\left(c - x\right)^{\prime }dx = - dx$$$ (steps can be seen »), and we have that $$$dx = - du$$$.

The integral can be rewritten as

$$c \left(\frac{\ln{\left(\left|{x}\right| \right)}}{c} + \frac{{\color{red}{\int{\frac{1}{c - x} d x}}}}{c}\right) = c \left(\frac{\ln{\left(\left|{x}\right| \right)}}{c} + \frac{{\color{red}{\int{\left(- \frac{1}{u}\right)d u}}}}{c}\right)$$

Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=-1$$$ and $$$f{\left(u \right)} = \frac{1}{u}$$$:

$$c \left(\frac{\ln{\left(\left|{x}\right| \right)}}{c} + \frac{{\color{red}{\int{\left(- \frac{1}{u}\right)d u}}}}{c}\right) = c \left(\frac{\ln{\left(\left|{x}\right| \right)}}{c} + \frac{{\color{red}{\left(- \int{\frac{1}{u} d u}\right)}}}{c}\right)$$

The integral of $$$\frac{1}{u}$$$ is $$$\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}$$$:

$$c \left(\frac{\ln{\left(\left|{x}\right| \right)}}{c} - \frac{{\color{red}{\int{\frac{1}{u} d u}}}}{c}\right) = c \left(\frac{\ln{\left(\left|{x}\right| \right)}}{c} - \frac{{\color{red}{\ln{\left(\left|{u}\right| \right)}}}}{c}\right)$$

Recall that $$$u=c - x$$$:

$$c \left(\frac{\ln{\left(\left|{x}\right| \right)}}{c} - \frac{\ln{\left(\left|{{\color{red}{u}}}\right| \right)}}{c}\right) = c \left(\frac{\ln{\left(\left|{x}\right| \right)}}{c} - \frac{\ln{\left(\left|{{\color{red}{\left(c - x\right)}}}\right| \right)}}{c}\right)$$

Therefore,

$$\int{\frac{c}{x \left(c - x\right)} d x} = c \left(\frac{\ln{\left(\left|{x}\right| \right)}}{c} - \frac{\ln{\left(\left|{c - x}\right| \right)}}{c}\right)$$

Simplify:

$$\int{\frac{c}{x \left(c - x\right)} d x} = \ln{\left(\left|{x}\right| \right)} - \ln{\left(\left|{c - x}\right| \right)}$$

Add the constant of integration:

$$\int{\frac{c}{x \left(c - x\right)} d x} = \ln{\left(\left|{x}\right| \right)} - \ln{\left(\left|{c - x}\right| \right)}+C$$

Answer

$$$\int \frac{c}{x \left(c - x\right)}\, dx = \left(\ln\left(\left|{x}\right|\right) - \ln\left(\left|{c - x}\right|\right)\right) + C$$$A


Please try a new game Rotatly