MHB Why does integral of 1/x have absolute value?

Click For Summary
The integral of 1/x requires the absolute value because the natural logarithm function, ln(x), is only defined for positive x. When integrating, the expression ln|x| accounts for both positive and negative values of x, as the function behaves differently in those domains. The derivative of ln|x| is 1/x, which aligns with the integral's requirement to be valid across the entire real line except at x = 0. This piecewise definition ensures that the integral correctly represents the area under the curve for both positive and negative x values. Thus, the integral is expressed as ∫(1/x)dx = ln|x| + C to encompass all cases.
find_the_fun
Messages
147
Reaction score
0
I lost a mark for integrating $$\frac{1}{x} $$to $$ln(x)$$ instead of $$ln\left| x \right|$$. Since the derivative of $$ln(x)$$ is [math]\frac{1}{x}[/math] not [math]\frac{1}{\left| x \right|}[/math] why is this the case?
 
Physics news on Phys.org
The derivative of ln(kx) is 1/x, no matter what the value of k.

Notice that if k > 0, then ln(kx) is only defined when x > 0, while if k < 0 then ln(kx) is only defined for x < 0.

The easy way to take into account what happens with positive and negative values of x is to use an absolute value.
 
The problem is all about what an indefinite integral is. It represents area under the curve drawn by graphing the integrand alright, but you just don't know the "bounds" of your domain, in other words, which part of the area you are actually going to choose.

For example, you can pick $\displaystyle \int \frac{\mathrm{d}x}{x}$ to be the area under $y = 1/x$ for $x < 0$. In that case, you'll get $\log(-x)$ as the result of integration. So $\displaystyle \int \frac{\mathrm{d}x}{x}$ is really defined piecewise as $\log(x)$ if $x > 0$ and $\log(-x)$ if $x < 0$. At $x = 0$, the integrand $y(x) = 1/x$ blows up, so it's none of our concern.

Note that $|x|$ always "positifies" any real number, i.e., for $x > 0$, $|x| = x$ but if $x < 0$, $|x|$ multiplies by a minus sign to make the number positive, i.e., $|x| = -x$. But this is exactly what is happening to the argument of $\log$!

So the best way to make the piecewise function work up in a single equivalence is to say

$$\int \frac{\mathrm{d}x}{x} = \log|x| + C$$

EDIT To make this more convincing, consider $(\log|x|)'$. This is NOT $1/|x|$. Note that $y = |x|$ is also a function, and $\log|x|$ is thus a composition of two functions. To differentiate this, you need to apply the chain rule, which gives $(\log|x|)' = (\log|x|)'_{|x|} \cdot (|x|)'_x$. It is clear that $(\log|x|)'_{|x|} = 1/|x|$, so we just need to work out the other part. $y(x) = |x|$ is everywhere differentiable except $x = 0$, but there $\log(x)$ blow up, so we don't need to care about it. By definition, $(|x|)'$ is $1$ if $x > 0$ and $-1$ if $x < 0$, i.e., this acts like a "sign" of the real number $x$. Let's call it $\text{sgn}(x)$.

Hence we have $(\log|x|)' = \text{sgn}(x)/|x|$. But then we are multiplying the absolute value of the real number $x$ by it's sign, which gives us back the original real number $x$. Hence,

$$(\log|x|)' = \frac1{x}$$

And by definition of antiderivatives, the equality above is verified.
 
Last edited:
Prove It said:
The derivative of ln(kx) is 1/x, no matter what the value of k.

Notice that if k > 0, then ln(kx) is only defined when x > 0, while if k < 0 then ln(kx) is only defined for x < 0.

The easy way to take into account what happens with positive and negative values of x is to use an absolute value.

I'm not very good at math.

Prove It said:
The derivative of ln(kx) is 1/x, no matter what the value of k.

By the chain rule isn't the derivative of ln(kx) with respect to x, [math](kx)' \cdot \frac{1}{x}=\frac{k}{x}[/math].

I used an online calculator and it did ln(kx)=ln(k)+ln(x) and ln(k) goes to zero. But this doesn't disprove what I did with the chain rule :confused:
 
You're not applying the chain rule correctly.

$$\frac{d \log(kx)}{dx}= \frac{d \log(kx)}{d(kx)} \cdot \frac{d(kx)}{dx} = \frac1{\cancel{k}x} \cdot \cancel{k} = \frac1{x}$$
 
Thread 'Problem with calculating projections of curl using rotation of contour'
Hello! I tried to calculate projections of curl using rotation of coordinate system but I encountered with following problem. Given: ##rot_xA=\frac{\partial A_z}{\partial y}-\frac{\partial A_y}{\partial z}=0## ##rot_yA=\frac{\partial A_x}{\partial z}-\frac{\partial A_z}{\partial x}=1## ##rot_zA=\frac{\partial A_y}{\partial x}-\frac{\partial A_x}{\partial y}=0## I rotated ##yz##-plane of this coordinate system by an angle ##45## degrees about ##x##-axis and used rotation matrix to...

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
Replies
14
Views
3K
Replies
3
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
Replies
3
Views
2K