Improper Integrals of Odd functions

In summary, the discussion revolves around an integral of an odd function over the interval (-∞,∞). The author states that if the function is odd and its integral exists, then the integral is equal to 0. However, a potential counterexample is presented using the function sin(x), which is odd but has a divergent integral over the given interval. The discussion then delves into the conditions under which such an integral exists and whether or not the author's statement is a shortcut or a complete argument.
  • #1
Mogarrr
120
6
I think I may have found an error in the text I'm reading. Here's a quote:

[itex]... + \int_0^{\infty}x^rf_1(x)sin(2\pi logx)dx[/itex].

However, the transformation [itex]y=-logx-r[/itex] shows that this last integral is that of an odd function over (-∞,∞) and hence equal to 0 for [itex]r=0,1,...[/itex]

By the way, the author means the natural log. I find this annoying.

Now assuming that the integrand is an odd function, I'm not so sure that this last statement is true. Is it the case that the integral of an odd function over (-∞,∞) equals 0.

Unless I've made a mistake (which happens often), I have a counterexample. The function, sin(x) is an odd function. Then

[itex]\int_{-\infty}^{\infty}sin(x)dx = \int_{-\infty}^0sin(x)dx + \int_0^{\infty}sin(x)dx[/itex].

Then looking at the second integral of the right-hand-side, we have

[itex]lim_{t \to \infty}\int_0^{t}sin(x)dx = lim_{t \to \infty} -cos(x) |_0^{t} [/itex],

but [itex]lim_{t \to \infty}-cos(x) [/itex] does not exist.

So even though sin(x) is an odd function, the integral of sin(x) over (-∞,∞) diverges, so it does not equal 0.

Am I right here?
 
Physics news on Phys.org
  • #2
If
* the function is odd and
* its integral from [itex] (-\infty, \infty) [/itex] exists

then the integral is zero. Since [itex] \sin x [/itex] is not integrable along the entire number line the discussion is moot.

So, there could be several things:

a) The text's author(s) may have already shown the integral in question already exists, and since you now know the integrand is odd, the conclusion follows

b) Depending on the age of the book the author(s) may be following the pattern of only talking of integrals when it is assumed the integral exists - in that case, once the integrand is known to be odd, the conclusion follows

Or, it could be that the reader is expected to fill in the details. (There are likely other possibilities I haven't thought of: I'm sure others will chime in on those or to clarify my rather short summary.)
 
  • #3
statdad said:
If

* its integral from [itex] (-\infty, \infty) [/itex] exists

The statement was meant to be a shortcut.

Are there any good methods to tell if an integral exists (besides integrating)?

The integral in question is

(*)[itex]E X_2^{r} = \int_0^{\infty}x^rf_1(x)(1+sin(2\pi logx))dx[/itex], where

[itex]f_1(x) = \frac 1{\sqrt {2\pi} x} \exp{\frac {-(logx)^2}2}[/itex], [itex]0\leq x < \infty [/itex],

and it was previously shown that [itex]E X_1^r = \exp {\frac {r^2}2}[/itex], for r=0,1,2,...

Since the expected value for [itex]f_1(x)[/itex] is known, (*) becomes

[itex] E X_1^r + \int_0^{\infty} x^rf_1(x)sin(2\pi logx)dx [/itex]

which is where my first post started. I have no clue how I'd evaluate the integral. I may be able to do some linear algebra and approximate, but I don't want to go there. Please help.

While I'm at it, I'm also trying to evaluate [itex]E X_1^r[/itex].
 
Last edited:
  • #4
Mogarrr said:
I think I may have found an error in the text I'm reading. Here's a quote:

[itex]... + \int_0^{\infty}x^rf_1(x)sin(2\pi logx)dx[/itex].

However, the transformation [itex]y=-logx-r[/itex] shows that this last integral is that of an odd function over (-∞,∞) and hence equal to 0 for [itex]r=0,1,...[/itex]
I think that there is a typo here: that the substitution should be y = - log x + r. (It is possible to use y = - log x - r also, but rather pointless, since it leads to a square completion which is otherwise unnecessary.)

If you make this substitution, plug in the known function f1 which you gave in a later post, simplify, recall that sin has period 2π and that r is an integer, you will see that the integrand is indeed an odd function and that the integral converges.
 
  • #5
Erland said:
I think that there is a typo here: that the substitution should be y = - log x + r. (It is possible to use y = - log x - r also, but rather pointless, since it leads to a square completion which is otherwise unnecessary.)
Even simpler is to put y = log x - r. This is perhaps what was intented.
 
  • #6
Mogarrr said:
The statement was meant to be a shortcut.

Are there any good methods to tell if an integral exists (besides integrating)?

The integral in question is

(*)[itex]E X_2^{r} = \int_0^{\infty}x^rf_1(x)(1+sin(2\pi logx))dx[/itex], where

[itex]f_1(x) = \frac 1{\sqrt {2\pi} x} \exp{\frac {-(logx)^2}2}[/itex], [itex]0\leq x < \infty [/itex],

and it was previously shown that [itex]E X_1^r = \exp {\frac {r^2}2}[/itex], for r=0,1,2,...

Since the expected value for [itex]f_1(x)[/itex] is known, (*) becomes

[itex] E X_1^r + \int_0^{\infty} x^rf_1(x)sin(2\pi logx)dx [/itex]

which is where my first post started. I have no clue how I'd evaluate the integral. I may be able to do some linear algebra and approximate, but I don't want to go there. Please help.

While I'm at it, I'm also trying to evaluate [itex]E X_1^r[/itex].

Mogar, can you please write down the exact integrals you are trying to solve without the ##f_1(x)## and ##EX## notation? Its a bit difficult for me to follow.
 
  • #7
Mogarrr said:
I think I may have found an error in the text I'm reading. Here's a quote:

[itex]... + \int_0^{\infty}x^rf_1(x)sin(2\pi logx)dx[/itex].

However, the transformation [itex]y=-logx-r[/itex] shows that this last integral is that of an odd function over (-∞,∞) and hence equal to 0 for [itex]r=0,1,...[/itex]

By the way, the author means the natural log. I find this annoying.

Now assuming that the integrand is an odd function, I'm not so sure that this last statement is true. Is it the case that the integral of an odd function over (-∞,∞) equals 0.

Unless I've made a mistake (which happens often), I have a counterexample. The function, sin(x) is an odd function. Then

[itex]\int_{-\infty}^{\infty}sin(x)dx = \int_{-\infty}^0sin(x)dx + \int_0^{\infty}sin(x)dx[/itex].

Then looking at the second integral of the right-hand-side, we have

[itex]lim_{t \to \infty}\int_0^{t}sin(x)dx = lim_{t \to \infty} -cos(x) |_0^{t} [/itex],

but [itex]lim_{t \to \infty}-cos(x) [/itex] does not exist.

So even though sin(x) is an odd function, the integral of sin(x) over (-∞,∞) diverges, so it does not equal 0.

Am I right here?

I question this because one can do this instead: ##\lim_{t \to \infty} \int_{-t}^t sin(x) \; dx##. It's clear that this limit exists and is 0. And this works for any odd function, which is in line with what the author said.

-edit-
Hmm, I wonder about this though:
$$\lim_{t \to \infty} \int_{{π \over 2}-t}^{{π \over 2}+t} cos(x) \; dx$$.

Possibly this defines the integral of cos(x) to be 0 as well. I'm not at all sure that this is rigorous.
 
Last edited:
  • #8
verty said:
I question this because one can do this instead: ##\lim_{t \to \infty} \int_{-t}^t sin(x) \; dx##. It's clear that this limit exists and is 0. And this works for any odd function, which is in line with what the author said.

Formally, one defines an integral over the whole real line by taking the limit of the upper and lower bounds independently:
[tex]
\int_{-\infty}^\infty f(x)\,dx = \lim_{R \to \infty} \int_{-R}^c f(x)\,dx + \lim_{S \to \infty}\int_c^S f(x)\,dx[/tex] where [itex]c[/itex] is finite. The result, if it exists, is clearly independent of the choice of [itex]c[/itex] so nothing is lost by taking [itex]c = 0[/itex].

Thus formally the integral over the whole line of [itex]\sin x[/itex] doesn't exist, because the integral over the half line [itex][0,\infty)[/itex] doesn't exist. However if, in the context, you're only ever going to be considering a symmetric interval about the origin then you can take the symmetric limit, which will be zero for any odd function and twice the integral over the half line for any even function.
 
  • Like
Likes 2 people
  • #9
verty said:
I question this because one can do this instead: ##\lim_{t \to \infty} \int_{-t}^t sin(x) \; dx##. It's clear that this limit exists and is 0. And this works for any odd function, which is in line with what the author said.
This is called the Cauchy principal value of the integral. It is useful in some contexts, e.g. Hilbert transforms. It can be used in some cases to assign a "reasonable" value even if the function is not integrable. However, one must be careful about this, because the value may be unstable if we shift the function. For example, if we shift ##\sin## by ##\pi/2## we get ##\cos##, which doesn't have a Cauchy principal value (at least not with center point equal to 0) because the oscillations on each side of 0 don't cancel.

In this example, the integrand ##\sin## fails to be integrable because it doesn't converge to zero as ##x \rightarrow \pm \infty##. Similarly, we may have a function which does converge to zero, but too slowly (so called "fat tails"), so the integral does not exist. But the Cauchy principal value may exist. Example: the expected value of a Cauchy random variable:
$$\frac{1}{\pi}\int_{-\infty}^{\infty} \frac{x}{(1+x^2)} dx$$
does not exist because the integrand is approximately ##1/x## as ##x \rightarrow \pm \infty##. But since the integrand is an odd function which is integrable over any bounded interval, the Cauchy principal value does exist and equals zero.
 
Last edited:
  • Like
Likes 1 person
  • #10
pasmith said:
Formally, one defines an integral over the whole real line by taking the limit of the upper and lower bounds independently:
[tex]
\int_{-\infty}^\infty f(x)\,dx = \lim_{R \to \infty} \int_{-R}^c f(x)\,dx + \lim_{S \to \infty}\int_c^S f(x)\,dx[/tex] where [itex]c[/itex] is finite. The result, if it exists, is clearly independent of the choice of [itex]c[/itex] so nothing is lost by taking [itex]c = 0[/itex].

Thus formally the integral over the whole line of [itex]\sin x[/itex] doesn't exist, because the integral over the half line [itex][0,\infty)[/itex] doesn't exist. However if, in the context, you're only ever going to be considering a symmetric interval about the origin then you can take the symmetric limit, which will be zero for any odd function and twice the integral over the half line for any even function.

Thank you very much (and to JBunniii as well).
 
  • #11
Thanks guys for interest in this thread
 
  • #12
Erland said:
Even simpler is to put y = log x - r. This is perhaps what was intented.

Yeah, I made a typo. Author said to to substitute the above
 
  • #13
Pranav-Arora said:
Mogar, can you please write down the exact integrals you are trying to solve without the ##f_1(x)## and ##EX## notation? Its a bit difficult for me to follow.

I don't think you'll find these details helpful in evaluating the integral, but here they are:

By definition, the expected value of random variable g(X), denoted [itex]Eg(X)[/itex] is

1) if X is continuous, [itex]Eg(X) = \int_{-\infty}^{\infty}g(x)f_X(x)dx[/itex]

2) if X is discrete, [itex]\sum_{x \in range of X} g(x)f_X(x)[/itex]

Also the function [itex]f_X(x)[/itex] is called the probability density function when the random variable X is continuous (probability mass function if X is discrete).

So one integral evaluation which was given in the text (I have yet to do on my own) is

[itex]E X^r = \int_0^{\infty}x^r \cdot \frac 1{\sqrt {2\pi} x}\exp {\frac {-(logx)^2}2}dx= \exp {\frac {r^2}2}[/itex], for [itex]r=0,1,...[/itex]

So any hints for evaluating this integral would also be appreciated.
 
  • #14
Ok, so I've made some progress, but I'm stuck now.

Making the substitution, [itex] y = lnx -r[/itex], I have

[itex]x = \exp {y+r}[/itex], [itex]dy = \frac 1{x} dx[/itex], and the bottom limit of integration switching from 0 → -∞, so

[itex]\int_0^{\infty}x^r \frac 1{\sqrt {2\pi} x} sin(2\pi lnx) dx = \int_{-\infty}^{\infty}sin(2\pi (y+r)) \exp {(yr+r^2)}dy [/itex].

Next, using integration by parts, I remind myself that [itex]\int udv = uv - \int vdu[/itex]

I let [itex]dv= \exp {(yr+r^2)}dy[/itex] and [itex]u=sin(2\pi (y+r))[/itex], so [itex]v= \frac 1{r} \exp {(yr+r^2)}[/itex] and [itex]du=2\pi cos(2\pi (y+r))dy[/itex]

Making the substitutions I have,

[itex]sin(2\pi (y+r)) \frac 1{r} \exp {(yr+r^2)} |_{-\infty}^{\infty} - \int_{-\infty}^{\infty}2\pi cos(2\pi (y+r)) \frac 1{r} \exp {(yr+r^2)}dy[/itex]

Which means that its time for another round of integration by parts. This time I let [itex]u=2\pi cos(2\pi (y+r))[/itex] and [itex]dv= \frac 1{r} \exp {(yr+r^2)}dy[/itex], so [itex]du=-(2\pi )^2sin(2\pi (y+r))dy[/itex] and [itex]v= \frac 1{r^2} \exp {(yr+r^2)}[/itex].

Putting everything together, I have

[itex]\int_{-\infty}^{\infty} sin(2\pi (y+r)) \exp {(yr+r^2)}dy = sin(2\pi (y+r)) \frac 1{r} \exp {(yr+r^2)} - 2\pi cos(2\pi (y+r)) \frac 1{r^2} \exp {(yr+r^2)} |_{-\infty}^{\infty} - (\frac {2\pi}{r})^2 \int_{\infty}^{\infty} sin(2\pi (y+r)) \exp {(yr+r^2)}dy[/itex].

I see the pattern here: [itex]x = a - (\frac {2\pi}{r})^2x[/itex], so [itex]x=a\frac 1{1+ (\frac {2\pi}{r})^2}[/itex]. So the integral I'm evaluating equals

[itex] \frac 1{1+ (\frac {2\pi}{r})^2} \cdot (sin(2\pi (y+r))\frac 1{r} \exp {(yr+r^2)} - 2\pi cos(2\pi (y+r)) \frac 1{r^2} \exp {(yr+r^2)} |_{-\infty}^{\infty}[/itex]

Much earlier, I should've split the integral into the sum of two integrals. I don't think I did any harm in avoiding it up until now. So now the last part I need to evaluate is

[itex]lim_{t \to \infty} \frac 1{1+ (\frac {2\pi}{r})^2} \cdot (sin(2\pi (y+r))\frac 1{r} \exp {(yr+r^2)} - 2\pi cos(2\pi (y+r)) \frac 1{r^2} \exp {(yr+r^2)}|_0^{t} [/itex],

which is equal to

[itex]lim_{t \to \infty} \frac 1{1+ (\frac {2\pi}{r})^2} \frac 1{r} \exp {(tr+r^2)} \cdot (sin(2\pi (t+r)) - \frac {2\pi}{r} cos(2\pi (t+r))) - [/itex] the stuff at [itex] y=0 [/itex].

This is the end of my long-winded post, which is where I'm stuck at now. Any suggestions?
 
  • #15
Mogarrr said:
Ok, so I've made some progress, but I'm stuck now.

Making the substitution, [itex] y = lnx -r[/itex], I have

[itex]x = \exp {y+r}[/itex], [itex]dy = \frac 1{x} dx[/itex], and the bottom limit of integration switching from 0 → -∞, so

[itex]\int_0^{\infty}x^r \frac 1{\sqrt {2\pi} x} sin(2\pi lnx) dx = \int_{-\infty}^{\infty}sin(2\pi (y+r)) \exp {(yr+r^2)}dy [/itex].
Hey, you forgot to plug in f1! The left side should be

[itex]\int_0^{\infty}x^r \frac 1{\sqrt {2\pi} x}{e^-\frac {\ln^2 x}2}\sin(2\pi \ln x) dx[/itex].

Here, make the substitution ##y = \ln x -r \leftrightarrow x=e^{y+r}## and simplify. No need for splitting it up and integration by parts.
 
Last edited:
  • Like
Likes 1 person
  • #16
Mogarrr said:
I don't think you'll find these details helpful in evaluating the integral, but here they are:

By definition, the expected value of random variable g(X), denoted [itex]Eg(X)[/itex] is

1) if X is continuous, [itex]Eg(X) = \int_{-\infty}^{\infty}g(x)f_X(x)dx[/itex]

2) if X is discrete, [itex]\sum_{x \in range of X} g(x)f_X(x)[/itex]

Also the function [itex]f_X(x)[/itex] is called the probability density function when the random variable X is continuous (probability mass function if X is discrete).

So one integral evaluation which was given in the text (I have yet to do on my own) is

[itex]E X^r = \int_0^{\infty}x^r \cdot \frac 1{\sqrt {2\pi} x}\exp {\frac {-(logx)^2}2}dx= \exp {\frac {r^2}2}[/itex], for [itex]r=0,1,...[/itex]

So any hints for evaluating this integral would also be appreciated.
$$\begin{aligned}
\int_0^{\infty} x^r e^{-\frac{\ln^2x}{2}}\sin(2\pi \ln x)\,\frac{dx}{\sqrt{2\pi}x}& =\frac{1}{\sqrt{2\pi}}\int_0^{\infty} e^{r\ln x}e^{-\frac{\ln^2x}{2}}\sin(2\pi \ln x)\frac{dx}{x} \\
&=\frac{e^{r^2/2}}{\sqrt{2\pi}}\int_0^{\infty} e^{-\left(\frac{\ln x-r}{\sqrt{2}}\right)^2}\sin(2\pi \ln x)\frac{dx}{x} \\
&=\frac{e^{r^2/2}}{\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-t^2/2}\sin(2\pi(t+r))\,dt \,\,\,\,\,(\ln x-r=t)\\
&=\frac{e^{r^2/2}}{\sqrt{2\pi}}\left(\cos(2\pi r)\int_{-\infty}^{\infty} e^{-t^2/2}\sin(2\pi t)\,dt+\sin(2\pi r)\int_{-\infty}^{\infty} e^{-t^2/2}\cos(2\pi t)\,dt\right) \\
\end{aligned} $$

The first integral is zero because the integrand is odd. The second integral is non-zero but ##\sin(2\pi r)## is zero for the given values of ##r##.

For the second integral, do a similar manipulation to get:
$$\int_0^{\infty} x^re^{-\ln^2x/2}\,\frac{dx}{\sqrt{2\pi}x}=\frac{e^{r^2/2}}{\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-t^2/2}\,dt=e^{r^2/2}$$
 
  • #17
I'm going to have to look at Pranav-Arora's post in detail, but what I have so far is

[itex]\int_0^{\infty}x^r \frac 1{\sqrt {2\pi} x} \exp {\frac {-(lnx)^2}2} sin(2\pi lnx)dx [/itex]

And making a substitution for [itex] y = lnx -r[/itex], I have

[itex]\int_{-\infty}^{\infty} (e^{y+r})^r e^{{\frac {-(lnx)^2}2}} sin(2\pi (y+r))dy [/itex], (I got tired of typing e as exp).

Then making some simplifications I have

(*)[itex] \int_{-\infty}^{\infty} e^{(y+r)(r-1)} sin(2\pi (y+r))dy [/itex].

Then taking Erland's advice I look through some common integrals and I find this

[itex]\int e^{bx}sin(ax)dx = \frac 1{a^2 + b^2}e^{bx} (bsin(ax)-acos(ax)) [/itex],

which is the same pattern as (*).

Now evaluating the improper integral, one of the limits I will need to evaluate is

[itex]lim_{t \to \infty} \frac 1{(2\pi)^2 + (r-1)^2} e^{(r-1)(y+r)} \cdot ((r-1)sin(2\pi (y+r)) - (2\pi)cos(2\pi (y+r))) |_0^t [/itex],

and this is where I'm currently stuck at. Any suggestions? (Help is always appreciated)
 
  • #18
Mogarrr said:
And making a substitution for [itex] y = lnx -r[/itex], I have

[itex]\int_{-\infty}^{\infty} (e^{y+r})^r e^{{\frac {-(lnx)^2}2}} sin(2\pi (y+r))dy [/itex], (I got tired of typing e as exp).
You didn't replace ##\ln^2 x## with ##(y+r)^2##.

If you simplify this, you should get:
$$\exp\left(r(y+r)-\frac{(y+r)^2}{2}\right)=\exp\left((y+r)\frac{r-y}{2}\right)=\exp\left(\frac{r^2-y^2}{2}\right)$$
You can see that you cannot use the formula you posted.
 
  • Like
Likes 1 person
  • #19
Pranav-Arora said:
You didn't replace ##\ln^2 x## with ##(y+r)^2##.

I wanted to save some space, but I made the following observation

[itex]e^{\frac {-(y+r)^2}2} = (e^{(y+r)^2})^{\frac {-1}2} = (e^{(y+r)})^{\frac {-1}2 \cdot 2} = e^{-y-r} [/itex]

and multiplying by [itex]e^{r(y+r)} [/itex], I then simplify the exponents

[itex] r(r+y) -y -r = r^2 +ry -y -r = r^2 -r +ry -y = r(r-1) + y(r-1) = (r+y)(r-1) [/itex]

I think all of the manipulations I made were legal
 
  • #20
Mogarrr said:
[itex](e^{(y+r)^2})^{\frac {-1}2} = (e^{(y+r)})^{\frac {-1}2 \cdot 2} [/itex]

This is not correct.
 
  • #21
Thanks for the correction Pranav-Arora.

I looked at your earlier post and it was very helpful.
 

What are improper integrals of odd functions?

Improper integrals of odd functions are integrals that have either infinite limits of integration or integrands that are undefined at one or both limits. These integrals are evaluated using a limit approach, where the limits of integration are taken to infinity or the undefined point.

How do you determine if an integral is improper?

An integral is improper if it has either infinite limits of integration or an integrand that is undefined at one or both limits.

What is the general formula for finding the value of an improper integral of an odd function?

The general formula for finding the value of an improper integral of an odd function is:
lima→∞baf(x)dx = lima→∞(F(b)-F(a))
where F(x) is the antiderivative of f(x).

How do you evaluate an improper integral of an odd function?

To evaluate an improper integral of an odd function, you can use the limit definition or apply the properties of odd functions. If the integral has infinite limits, you can also use the comparison test to determine if it converges or diverges.

What is the significance of odd functions in improper integrals?

Odd functions play a significant role in improper integrals because they have unique properties that make their evaluation simpler. For example, the integral of an odd function over a symmetric interval will always evaluate to zero. This property can be used to simplify the evaluation of improper integrals of odd functions.

Similar threads

Replies
1
Views
898
Replies
3
Views
1K
  • Calculus
Replies
4
Views
1K
Replies
2
Views
866
Replies
4
Views
717
Replies
2
Views
256
Replies
8
Views
390
Replies
19
Views
3K
Replies
3
Views
687
Replies
5
Views
842
Back
Top