Results 1 to 5 of 5

Math Help - Integral involving Lambert W-function

  1. #1
    Super Member
    Joined
    Aug 2008
    Posts
    903

    Integral involving Lambert W-function

    (This is a challenge. I already know how to solve it.)

    This is an integral Mathematica can't solve (exactly):

    \int_{-\infty}^{\infty} \frac{dx}{\pi^2+(1-x+e^x)^2}

    Explain how to solve this integral using the Lambert-W function and obtain the exact numeric answer (not in terms of the W function) Mathematica can't compute.
    Last edited by shawsend; March 19th 2010 at 08:27 AM. Reason: added that challenge thing up there
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor chiph588@'s Avatar
    Joined
    Sep 2008
    From
    Champaign, Illinois
    Posts
    1,163
    Quote Originally Posted by shawsend View Post
    (This is a challenge. I already know how to solve it.)

    This is an integral Mathematica can't solve (exactly):

    \int_{-\infty}^{\infty} \frac{dx}{\pi^2+(1-x+e^x)^2}

    Explain how to solve this integral using the Lambert-W function and obtain the exact numeric answer (not in terms of the W function) Mathematica can't compute.
    This is a contour integration problem, so I preemptively say that the integral along the semi-circle of radius  r goes to  0 as  r\to \infty by Jordan's lemma or something like that since that's not the main concern of the problem.

    So \int_{-\infty}^{\infty} \frac{dx}{\pi^2+(1-x+e^x)^2} = 2\pi i \text{Res}(f,c) where  c is the singularity inside our contour.

     \text{Res}(f,c) = \lim_{z\to c}(z-c)f(z) , where  f(z) = \frac{1}{\pi^2+(1-z+e^z)^2} and  1-c+e^c=-\pi i .


    So let's solve  e^x-x+\pi i+1=0 .
    Note  z=W(z)e^{W(z)}\implies e^{W(z)} = \frac{z}{W(z)}\implies e^{-W(z)} = \frac{W(z)}{z} .
    Consider  -W(e)
    Now  e^{-W(e)}+W(e)+\pi i+1 = \frac{W(e)}{e}+W(e)+\pi i+1
    Therefore we want our  e^x term to get a " \cdot e " and change sign to cancel out the  W(e) 's. Doing this though luckily can cancel out  \pi i and  1 too!
    Thus our solution to solve this equation is  x=-W(e)+\pi i+1 .
    Observe  W(e) = 1\implies x=\pi i


    We now get  \text{Res}(f,c) = \lim_{z\to \pi i}(z-\pi i)f(z) = \frac{1}{4\pi i} by L'Hopital's rule.

    Therefore  \int_{-\infty}^{\infty} \frac{dx}{\pi^2+(1-x+e^x)^2} = \frac{2\pi i}{4\pi i} = \frac{1}{2} .
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Hi Chip, I have some constructive comments:

    Quote Originally Posted by chiph588@ View Post
    This is a contour integration problem, so I preemptively say that the integral along the semi-circle of radius  r goes to  0 as  r\to \infty by Jordan's lemma or something like that since that's not the main concern of the problem.
    Showing that goes to zero is an important part of this problem especially if you don't already know what the answer is.

    So let's solve  e^x-x+\pi i+1=0 .
    Note  z=W(z)e^{W(z)}\implies e^{W(z)} = \frac{z}{W(z)}\implies e^{-W(z)} = \frac{W(z)}{z} .
    Consider  -W(e)
    Now  e^{-W(e)}+W(e)+\pi i+1 = \frac{W(e)}{e}+W(e)+\pi i+1
    Therefore we want our  e^x term to get a " \cdot e " and change sign to cancel out the  W(e) 's. Doing this though luckily can cancel out  \pi i and  1 too!
    Thus our solution to solve this equation is  x=-W(e)+\pi i+1 .
    Observe  W(e) = 1\implies x=\pi i
    Should we not be solving 1-z+e^z=\pm \pi i? In either case, I get for the solution z=1\pm \pi i-W(e) but W(e) is multi-valued and so there are an infinite number of solutions and therefore an infinite number of (isolated) poles of the integrand which is evident from the equation 1-z+e^z=k and since the left side is entire and non-polynomial, it reaches k infinitely often. Which ones are inside the contour and how do they affect the solution?

    We now get  \text{Res}(f,c) = \lim_{z\to \pi i}(z-\pi i)f(z) = \frac{1}{4\pi i} by L'Hopital's rule.
    That shows the point \pi i is a simple pole but what are the orders of the other poles?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor chiph588@'s Avatar
    Joined
    Sep 2008
    From
    Champaign, Illinois
    Posts
    1,163
    Quote Originally Posted by shawsend View Post
    Hi Chip, I have some constructive comments:



    Showing that goes to zero is an important part of this problem especially if you don't already know what the answer is.
    You're absolutely correct... I was just to lazy to tex the answer .

    Let  C_R be the the semi-circle of radius  R centered at the origin.

     \left|\int_{C_R} \frac{dz}{\pi^2+(1-z+e^z)^2}\right| \leq \frac{2\pi R}{e^{2R}-R^2+1-\pi^2} \to 0 as  R\to\infty .

    But apparently there are an infinite amount of poles? If this is the case we need to choose  C_R carefully such that it never lies on a pole.
    Should we not be solving 1-z+e^z=\pm \pi i?
    I originally solved this equation, but since I thought  W(e)\equiv 1 this meant the other solution was  z=-\pi i which is outside of our contour. So I decided to omit this solution.

    In either case, I get for the solution z=1\pm \pi i-W(e) but W(e) is multi-valued and so there are an infinite number of solutions and therefore an infinite number of (isolated) poles of the integrand which is evident from the equation 1-z+e^z=k and since the left side is entire and non-polynomial, it reaches k infinitely often. Which ones are inside the contour and how do they affect the solution?
    What are the other values of  W(e) ??
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Quote Originally Posted by chiph588@ View Post
    You're absolutely correct... I was just to lazy to tex the answer .

    Let  C_R be the the semi-circle of radius  R centered at the origin.

     \left|\int_{C_R} \frac{dz}{\pi^2+(1-z+e^z)^2}\right| \leq \frac{2\pi R}{e^{2R}-R^2+1-\pi^2} \to 0 as  R\to\infty .

    What are the other values of  W(e) ??
    I don't think that inequality is correct as I can just numerically compute the integral for say R=10 and get:

    \left|\int_{\gamma}\frac{dz}{\pi^2+(1-z+e^z)^2}\right|\approx 0.13

    \frac{2\pi R}{e^{2R}-R^2+1-\pi^2}\approx 10^{-7}

    This is how I proved the integral is zero over the half-circle contour. I'm sure others can prove it more simply.

    Spoiler:

    Let \gamma=Re^{it} for 0\leq t \leq \pi then \left|\int_{\gamma}\frac{dz}{\pi^2+(1-z+e^z)^2}\right|\leq \int_{\gamma}\frac{|dz|}{|\pi^2+(1-z+e^z)^2|}\leq \frac{\pi R}{\text{Min}(|\pi^2+(1-z+e^z)^2|,\gamma)}.

    First note
    <br />
|\pi^2+(1-z+e^2)^2|\geq |\pi^2-|1-z+e^z|^2|, <br />
    and so
    \text{Min}\left(|\pi^2+(1-z+e^z)^2|,\gamma\right)=\begin{cases} O(\pi^2) \\<br />
                                                          O(|1-z+e^z|^2)<br />
                                                          \end{cases}<br />
    Now |1-z+e^z|\geq |1-|z-e^z|| and so
    \text{Min}\left(|1-z+e^z)\right)=\begin{cases} O(1) \\<br />
                                                          O(|z-e^z|)<br />
                                                          \end{cases}<br />
    and

    <br />
\begin{aligned}<br />
|z-e^z|&\geq |R-|e^{R(cos(t)+i\sin(t))}|| \\<br />
&\geq |R-e^{R\cos(t)}|<br />
\end{aligned}<br />

    So that over \gamma, we have three cases:

    (1) For 0<t<\pi/2, e^{R\cos(t)}>2R for sufficiently large R and

    \text{Min}(|R-e^{R\cos(t)}|,0<t<\pi/2)\geq O(R)

    (2) \text{Min}(|R-e^{R\cos(t)}|,\pi/2)=O(R)

    (3) \text{Min}(|R-e^{R\cos(t)}|,\pi/2<t\leq \pi)>|1-R|=O(R)

    And therefore \text{Min}(|\pi^2+(1-z+e^z)^2|,\gamma)=O(R^2) for large R.

    so that

    \lim_{R\to\infty}\int_{\gamma}\frac{dz}{(\pi^2+(1-z+e^z)^2}=0.


    Also, you asked about the other poles. The plot below shows some of them. The red points are 1+\pi i-W(n,e) and the blue are 1-\pi i-W(n,e) where n is the branch number of the Lambert-W function. The trend goes without bounds. However, we can show that the residue sum over each vertical blue and red pair is zero and therefore, we are left with the single red pole at \pi i in the upper half-circle contour.
    Attached Thumbnails Attached Thumbnails Integral involving Lambert W-function-w-zeros.jpg  
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. integral involving the Bessel function
    Posted in the Calculus Forum
    Replies: 0
    Last Post: January 15th 2012, 08:03 AM
  2. Integral problem involving the definition of the integral
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: May 23rd 2011, 07:06 AM
  3. Replies: 3
    Last Post: September 21st 2010, 03:49 PM
  4. Replies: 1
    Last Post: October 19th 2009, 03:42 AM
  5. Integral involving Bessel Function
    Posted in the Calculus Forum
    Replies: 1
    Last Post: June 26th 2009, 10:33 AM

Search Tags


/mathhelpforum @mathhelpforum