Integration by Parts with Logarithmic Functions

In summary: HPs and the Windows calculator do.In summary, when dealing with integration by parts, it is important to specify a particular component of the domain for which the integral is valid.
  • #1
Mr Davis 97
1,462
44

Homework Statement


##\displaystyle \int \frac{\log (x)}{x}~ dx##

Homework Equations

The Attempt at a Solution


I am a little confused about the first part. We know that the ##\displaystyle \int \frac{1}{x}~ dx = \log |x|##. So how can we proceed with integration by parts if one of the logs has an absolute value and the other doesn't? Wouldn't we just end up with ##\log |x| \log (x) - \int \frac{\log |x|}{x} ~ dx##?
 
Physics news on Phys.org
  • #2
The argument of log(x) must be greater than zero, for real results. Since log(x) is in the integral, then we must have x > 0, so log(x) and log|x| will be the same thing.
 
  • #3
Unless you are operating in the context of complex numbers you can forget about the absolute value because ##\log x## is only defined for positive ##x##.

So, restricting the domain to ##\mathbb R_+## your last formula becomes
$$\int\frac{\log x}xdx=(\log x)^2 - \int\frac{\log x}xdx$$
which you can then solve.

EDIT: Jinxed again!
 
  • #4
That makes sense. What about in the case when we start out with something like ##\displaystyle \int \frac{\sin x}{\cos x} \log (\cos x)##? Do we just assume that x is in the domain such that ##\cos x## is greater than 0?
 
  • #5
Mr Davis 97 said:
That makes sense. What about in the case when we start out with something like ##\displaystyle \int \frac{\sin x}{\cos x} \log (\cos x)##? Do we just assume that x is in the domain such that ##\cos x## is greater than 0?
Yes. But more care is needed in that case, because, unlike the previous example, the domain is not topologically connected, being a series of open sets of the form ##\left(\frac{4k-1}2\pi,\frac{4k+1}2\pi\right)## for ##k\in\mathbb Z##.

Many of the uses to which one might put an indefinite integral would be invalidated if one were to use it for values of ##x## that are in different (separated) components of that domain.

So it would be safest to specify a particular component, eg restricting the solution to the interval ##(-\pi/2,\pi/2)##.
 
  • Like
Likes Mr Davis 97
  • #6
@Mr Davis 97 I assume you are aware that, even though integration by parts works pretty easily, the more "obvious" method would be the substitution ##u = \log x,~du = \frac 1 x dx##.
 
  • Like
Likes Eclair_de_XII and Mr Davis 97
  • #7
LCKurtz said:
the more "obvious" method would be the substitution ##u = \log x##,##du = \frac{1}{x}dx##.

Huh, in all my years of taking Calculus, it never occurred to me that ##ln(x)## and ##log(x)## share the same derivative...
 
  • #8
Eclair_de_XII said:
Huh, in all my years of taking Calculus, it never occurred to me that ##ln(x)## and ##log(x)## share the same derivative...
I think you might be interpreting the references above to ##\log x## as being log base 10. They are not, they are references to the log base ##e## or natural logarithm. My impression is that the practice of interpreting ##\log x## to mean log base 10 and using ln for the natural log started to fade out when pocket calculators started to replace logarithm tables and slide rules so that there was no common reason to refer to a log base 10. Perhaps it is still used in engineering.
 
  • #9
andrewkirk said:
I think you might be interpreting the references above to ##\log x## as being log base 10. They are not, they are references to the log base ##e## or natural logarithm. My impression is that the practice of interpreting ##\log x## to mean log base 10 and using ln for the natural log started to fade out when pocket calculators started to replace logarithm tables and slide rules so that there was no common reason to refer to a log base 10. Perhaps it is still used in engineering.
Both of my calculators (small Casio scientific and an aged HP 48G) and the Windows calculator I use a lot have separate log and ln buttons. The meaning of "log" depends on the surrounding context -- in post-calculus textbooks, "log" is often taken to mean ##\log_e## or ##\ln##. In computer science texts, "log" usually means ##\log_2##.
 
  • Like
Likes scottdave
  • #10
Mark44 said:
Both of my calculators (small Casio scientific and an aged HP 48G) and the Windows calculator I use a lot have separate log and ln buttons. The meaning of "log" depends on the surrounding context -- in post-calculus textbooks, "log" is often taken to mean ##\log_e## or ##\ln##. In computer science texts, "log" usually means ##\log_2##.
WolframAlpha assumes log(x) refers to natural log. You can type in ln or LN, if you want. It will change it to log, though.
I loved my HP 48G. The display on mine is going out. A few years ago I got an HP 50G. Not quite an upgrade, in my opinion, though.
The way I was taught in school was to put the subscript log2(x) where 2 is the base. But if nothing then base 10 was implied, then ln means log base e (natural log).
 
  • #11
andrewkirk said:
My impression is that the practice of interpreting ##\log x## to mean log base 10 and using ln for the natural log started to fade out when pocket calculators started to replace logarithm tables and slide rules so that there was no common reason to refer to a log base 10. Perhaps it is still used in engineering.
I have yet to see a calculator put LOG on a button to calculate the natural log. Sure, the days of using log tables are pretty much gone, but base 10 logarithms are still used, like in pH scale and dB, for example.
Any time you need to display a chart of graph spanning a large range of values (like the electromagnetic spectrum), often the logarithmic scale (base 10) is used to display the wide range.
 
  • #12
scottdave said:
The way I was taught in school was to put the subscript log2(x) where 2 is the base. But if nothing then base 10 was implied, then ln means log base e (natural log).
Same here.

scottdave said:
I have yet to see a calculator put LOG on a button to calculate the natural log.
Ditto for this, as well.
 
  • #13
I haven't had a calculator since my beloved HP 12C died a long while back. If I need to calculate some numbers I can't do in my head I typically use R, which is usually open on my computer, or Wolfram Alpha - both of which interpret 'log' to mean log base e.

I rarely use Excel but I just checked with that and found that it interprets log as log base 10.

So I suppose it all depends on what one is used to.
 
  • #14
And, of course, as far as this thread is concerned, the only thing that matters is that the OP, who hasn't returned since we got on this track, understands that answer needs an appropriate fudge factor if we aren't talking about natural logarithms.
 

1. What is the concept of integration by parts?

Integration by parts is a method used to evaluate integrals of products of functions. It involves breaking down a complicated integral into simpler parts and applying a specific formula to solve it.

2. When is integration by parts used?

Integration by parts is typically used when the integral involves a product of two functions, where one function is easy to integrate and the other is not. It can also be used to simplify integrals involving trigonometric functions, logarithmic functions, and inverse trigonometric functions.

3. How do you apply integration by parts?

To apply integration by parts, you need to identify the two functions in the integral and label one as u and the other as dv. Then, use the formula ∫uv' dx = uv - ∫u'v dx to solve the integral. The u and v' terms come from differentiating u and integrating dv, respectively.

4. What is the formula for integration by parts?

The formula for integration by parts is ∫uv' dx = uv - ∫u'v dx. This is known as the integration by parts formula or the LIATE rule, where LIATE stands for logarithmic, inverse trigonometric, algebraic, trigonometric, and exponential functions.

5. Are there any common mistakes to avoid when using integration by parts?

Some common mistakes to avoid when using integration by parts include forgetting to differentiate or integrate properly, using the formula in the wrong order, and not choosing the correct u and v' terms. It's important to double check your work and be careful with the algebraic manipulations involved.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
343
  • Calculus and Beyond Homework Help
Replies
1
Views
663
  • Calculus and Beyond Homework Help
Replies
15
Views
785
  • Calculus and Beyond Homework Help
Replies
3
Views
900
  • Calculus and Beyond Homework Help
Replies
22
Views
1K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
706
  • Calculus and Beyond Homework Help
Replies
2
Views
914
  • Calculus and Beyond Homework Help
Replies
11
Views
695
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
Back
Top