1

There are two integrals:

$\int \cos(x)$ and $\int \ln(x)$

When I solve the $\cos(x)$ integral I don't have to integrate by parts, but for the natural log integral I do. Why do I have to use integration by parts with the natural log integral when I don't with others?

bjcolby15
  • 4,210
  • 7
    Different integrals require different strategies. What kind of answer are you hoping to receive? – Malady Aug 24 '24 at 16:31
  • Hi, welcome to Math SE. Is this good context for your question? – J.G. Aug 24 '24 at 16:32
  • 2
    Here's another question - do you know what function has derivative $\ln x?$ Parts helps us find that. On the other hand, we already know that $\int \cos x \ dx = \sin x + C$, so no need for a new technique. – Sean Roberson Aug 24 '24 at 17:04
  • 1
    I wouldn't say you "have" to use IBP on $\ln x$, but the fact that $(\ln x)'\cdot x = 1$ makes it attractive – whpowell96 Aug 24 '24 at 18:31
  • Integration by parts is the natural way to deal with integrals of functions that are defined by an integral. Essentially, you have a double integral in disguise, and the integration by parts formula can be seen as a consequence of changing the order of integration. – David H Aug 24 '24 at 18:57
  • 1
    If you can find an easier way to find an antiderivative of $\log(x)$, that would be great. No one else has succeeded. – littleO Aug 24 '24 at 22:47
  • Solving indefinite integrals is a game of guess and check and the various techniques are maybe best thought of as heuristics for coming up with good guesses. You don't have to use IBP. You could have, for example, just guessed the right answer and then verified it by differentiating. – Charles Hudgins Aug 24 '24 at 23:16
  • You are going to find that the best way to do $\int x\cos x,dx$ is to use integration by parts, so it's not just for logarithms, it's for trig functions, too. – Gerry Myerson Aug 25 '24 at 01:14
  • Integration by parts means that we turn the problem of solving one integral into the problem of solving a different integral. If every integral required integration by parts, how would we ever solve any integral? We'd just be changing the first integral for another, then another, then another forever. – David K Aug 25 '24 at 02:02

2 Answers2

1

When we find integrals of natural logarithms, integration by parts is the easiest way to find that integral.

The trick is which parts to use to find that integral. Using the ILATE aid that J.G. gave, logarithms are the second on the list, and since we don't have trigonometric or exponential functions, $dx$ must be algebraic (in fact, it's a constant - i.e. $\ln x = 1 \ln x$, so we can use $dv = 1 \ dx$ when we set up the IBP integral).

If we let $u = \ln x$ and $dv = 1 \ du$, then we have $du = \dfrac {1}{x}$ and $v = x$.

Putting those into the IBP formula $$\int u \ dv = u \cdot v - \int v \ du$$ gives us $$x \ln x - \int x \cdot \dfrac {1}{x} \ dx = x \ln x - \int \ dx = x \ln x - x + C$$

If we switched the problem around - that is, let $u = 1$ and $dv = \ln x$, we run into a roadblock - first, $du = 0$ and we still don't know will give us $dv = \ln x$. Thus, the first selection is the only way we could have gotten $\int \ln x \ dx$.

See also TargetVN's link for alternative ways of getting $\int \ln x \ dx$.

bjcolby15
  • 4,210
1

The problem is not "You have to", but "You need to because it's easier". Here are numerous solutions for $\int\ln x\,dx$ without integration by parts, and as you can see, it's much more advanced, and not beginner-friendly at all.

This is because you never learn what differentiates into $\ln x$, but because you already know that from other functions (such as $(\sin x)'=\cos x$), integrating those functions is quite straightforward. When seeking more alternate solutions for $\ln x$, integration by parts is the easiest approach to go for.

There are a lot of cases where an innocent-looking integral can turn into a beast, and $\int\ln x\,dx$ is just the tip of the iceberg. Other "simple integrals" such as $\int\sqrt{\tan x}\,dx$ or $\int\frac{1}{x^5+1}\,dx$ are much more insane cases.