I Why Does Integrating |f(x)| Differ from Integrating f(x)?

JuanC97
Messages
48
Reaction score
0
I know that \sqrt{f(x)^2} = |f(x)| However...
I've just noticed that integrals of expressions like this are usually assumed to be equal to the integral of f(x) without the absolute value. I'd like to know how that's possible.

Is weird for me to consider those expressions; specially because of what Minkowski's inequality says about it:
\int{|f(x)|\,dx} \leq \left| \;{\int{f(x)dx}}\; \right|

In general, I would expect the integral without the absolute value to be different from the "absolute-valued" one.
Check, for example:

\int_\pi^{3\pi/2} |\sin(x)| \, dx shouldn't give a negative value as a result, however, that's what WolframAlpha gives me. [Just like if it were ignoring the absolute value and just integrating sin(x) ]
 
Physics news on Phys.org
JuanC97 said:
Is weird for me to consider those expressions; specially because of what Minkowski's inequality says about it:
\int{|f(x)|\,dx} \leq \left| \;{\int{f(x)dx}}\; \right|
I don't think this is correct. Shouldn't you take the inequality the other way around?
 
  • Like
Likes SammyS
JuanC97 said:
I know that \sqrt{f(x)^2} = |f(x)| However...
I've just noticed that integrals of expressions like this are usually assumed to be equal to the integral of f(x) without the absolute value. I'd like to know how that's possible.

Is weird for me to consider those expressions; specially because of what Minkowski's inequality says about it:
\int{|f(x)|\,dx} \leq \left| \;{\int{f(x)dx}}\; \right|

In general, I would expect the integral without the absolute value to be different from the "absolute-valued" one.
Check, for example:

\int_\pi^{3\pi/2} |\sin(x)| \, dx shouldn't give a negative value as a result, however, that's what WolframAlpha gives me. [Just like if it were ignoring the absolute value and just integrating sin(x) ]
as tommyxu3 pointed out, your inequality is in the wrong direction (just a typo, I am sure).

If Wolfram alpha does it as if there was no absolute (and gives a negative answer for that integral), then it is simply wrong (or there is something incorrect in th away you input the integrand). You are correct that on cannot ignore the absolute sign if we integrate over a region where the integrand may take negative values.
 
  • Like
Likes JuanC97
tommyxu3 said:
Shouldn't you take the inequality the other way around?
You're right, sorry for that.
nrqed said:
You are correct that on cannot ignore the absolute sign if we integrate over a region where the integrand may take negative values.
That's what common sense says to me too, but, there are two specific cases where I can't do that:

1. Trigonometric substitutions:
Let's say this one: https://www.physicsforums.com/threads/difficult-integral-for-trig-substitution.301301/#post-2126338
There, sqrt{4tan^2(x)} is assumed to be 2tan(x).

2. Integrals of volume:
Any volume results from the integration of the product of the corresponding "scale factors" in the specific orthogonal system that you're working on.
If you have spherical polar coordinates:
x = r sin(t) cos(p)
y = r sin(t) sin(p)
z = r cos(t)
The first scale factor (h1) corresponds to the square root of sum of squares of the derivatives of each variable {x,y,z} with respect to r. The second one is the same but, with respect to t. The last one is with respect to p. Taking that into account, h1=1, h2=|r|, h3=|r sin(t)|. Clearly different from:
https://en.wikipedia.org/wiki/Orthogonal_coordinates#Table_of_orthogonal_coordinates

Probably there are another examples but those are pretty illustrative.
 
JuanC97 said:
You're right, sorry for that.

That's what common sense says to me too, but, there are two specific cases where I can't do that:

2. Integrals of volume:
Any volume results from the integration of the product of the corresponding "scale factors" in the specific orthogonal system that you're working on.
If you have spherical polar coordinates:
x = r sin(t) cos(p)
y = r sin(t) sin(p)
z = r cos(t)
The first scale factor (h1) corresponds to the square root of sum of squares of the derivatives of each variable {x,y,z} with respect to r. The second one is the same but, with respect to t. The last one is with respect to p. Taking that into account, h1=1, h2=|r|, h3=|r sin(t)|. Clearly different from:
https://en.wikipedia.org/wiki/Orthogonal_coordinates#Table_of_orthogonal_coordinates

Probably there are another examples but those are pretty illustrative.
Let's talk about this last case first. Note that ##r## is always larger or equal to zero so ##|r| = r##. Note also that ##\theta## is between 0 and ##\pi## radians so ##| \sin \theta | = \sin \theta ##. Or maybe I am misunderstanding your point?
 
  • Like
Likes JuanC97
nrqed said:
Note that r is always larger or equal to zero so |r|=r. Note also that θ is between 0 and pi radians so |sinθ|=sinθ.

That was in fact, what I was missing, thanks for pointing it out. :wink:
For sure, a really important thing to keep in mind.
 
Back
Top