Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Improper Integrals of Odd functions

  1. Jul 17, 2014 #1
    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?
     
  2. jcsd
  3. Jul 17, 2014 #2

    statdad

    User Avatar
    Homework Helper

    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.)
     
  4. Jul 17, 2014 #3
    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 wanna go there. Please help.

    While I'm at it, I'm also trying to evaluate [itex]E X_1^r[/itex].
     
    Last edited: Jul 18, 2014
  5. Jul 18, 2014 #4

    Erland

    User Avatar
    Science Advisor

    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.
     
  6. Jul 18, 2014 #5

    Erland

    User Avatar
    Science Advisor

    Even simpler is to put y = log x - r. This is perhaps what was intented.
     
  7. Jul 18, 2014 #6
    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.
     
  8. Jul 18, 2014 #7

    verty

    User Avatar
    Homework Helper

    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: Jul 18, 2014
  9. Jul 18, 2014 #8

    pasmith

    User Avatar
    Homework Helper

    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.
     
  10. Jul 18, 2014 #9

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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: Jul 18, 2014
  11. Jul 18, 2014 #10

    verty

    User Avatar
    Homework Helper

    Thank you very much (and to JBunniii as well).
     
  12. Jul 18, 2014 #11
    Thanks guys for interest in this thread
     
  13. Jul 18, 2014 #12
    Yeah, I made a typo. Author said to to substitute the above
     
  14. Jul 18, 2014 #13
    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.
     
  15. Jul 18, 2014 #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?
     
  16. Jul 18, 2014 #15

    Erland

    User Avatar
    Science Advisor

    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: Jul 18, 2014
  17. Jul 18, 2014 #16

    $$\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}$$
     
  18. Jul 19, 2014 #17
    I'm gonna 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)
     
  19. Jul 19, 2014 #18
    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.
     
  20. Jul 19, 2014 #19
    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
     
  21. Jul 19, 2014 #20
    This is not correct.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook