Why we can omit the modulus symbol in ln(|x|) in the integrating factor method

During a lecture on the solution of standard ODEs, a student asked why we use \ln(x) as the solution of the integral \int \frac{1}{x} dx in the exponent of an integrating factor rather than the formally correct antiderivative \ln(|x|) + c. In particular, the student was concerned about the omission of the modulus symbol around the x. The explanation is not an unsubtle one and is often overlooked or treated lightly when this approach is used, so I thought I would record the discussion here.

The first-order ODE under discussion was of the simple form

\frac{dy}{dx} - \frac{7}{x} y = 2x^2 \quad \quad \quad \quad (1)

This can easily be solved using the integrating factor method, with integrating factor

e^{-\int \frac{7}{x} dx} = e^{-7 \ln(x)} = \frac{1}{x^7} \quad \quad \quad \quad (2)

We multiply BOTH sides of the original ODE by this integrating factor to obtain

\frac{1}{x^7} \frac{dy}{dx} - \frac{7}{x^8} y = \frac{2}{x^5} \quad \quad \quad \quad (3)

and then observe that the left-hand side can be written as the derivative of a product:

\frac{d}{dx} \big( \frac{1}{x^7} y \big) = \frac{2}{x^5} \quad \quad \quad \quad (4)

This is now easy to integrate, and upon integrating both sides with respect to x we obtain

\frac{1}{x^7} y = -\frac{1}{2} x^{-4} + c \quad \quad \quad \quad (5)

which gives the required explicit general solution for y:

y = -\frac{1}{2} x^3 + c x^7 \quad \quad \quad \quad (6)

The question that arose was why we did not use -7\ln(|x|) + c for the integral in (2) above. Is this not the correct antiderivative solution for -\int \frac{7}{x}dx?

It is true that when one is finding the general antiderivative of -\frac{7}{x} one must give the answer as -7\ln(|x|) + c. However, it is NOT necessary to do this when the integral of -\frac{7}{x} appears as the exponent of the integrating factor in a problem like (1). It is also not necessary to include an arbitrary constant in the integral in the exponent of the integrating factor, for the same reason.

This is because, as exemplified above, the integrating factor is something that one multiplies BOTH sides of the differential equation by to enable the left-hand side to be expressed as the derivative of a product. As we saw above, it is then easy to obtain a solution by integrating both sides. Since the integrating factor multiplies both sides of the differential equation, it would make no difference to the final solution if we were to multiply the integrating factor by a constant. Any constant which multiplies the integrating factor would simply cancel out when using the integrating factor method to solve the differential equation.

If we used \exp(-7 \ln(|x|)) = \frac{1}{|x|^7} as the integrating factor in (2), we would obtain the same solution to the differential equation as in (6), irrespective of whether x > 0 or x < 0, because when x < 0 we have

\frac{1}{|x|^7} = \frac{1}{(-x)^7} = (-1) \frac{1}{x^7}

This is just a constant times the integrating factor obtained in (2), so as described above the constant will cancel out and it will be AS IF we had used the integrating factor in (2) in the first place.

That’s why we just ignore the modulus symbol (and the arbitrary constant) when using the integrating factor method in cases like (1). We don’t need to think of the integral in the exponent of the integrating factor in the same way as we would think of the general antiderivative, because this doesn’t affect the final solution of the differential equation.

Published by Dr Christian P. H. Salas

Mathematics Lecturer

Leave a comment