Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Trouble with an Integral

  • 17-10-2010 8:51pm
    #1
    Registered Users, Registered Users 2 Posts: 3,038 ✭✭✭


    I'm having trouble with the following integral.
    [latex] \int_{0}^{\infty }\frac{1}{1 \ + \ x^2}\,dx [/latex]
    I'm trying to do this without reaching for the formula's I can't
    remember and keep getting ∞ when the answer is π/2

    [latex] \int_{0}^{\infty }\frac{1}{1 \ + \ x^2}\,dx \ = \ \lim_{t \to \infty} \ \int_{0}^{t }\frac{1}{1 \ + \ x^2}\,dx [/latex]

    I want to find a relationship between variables:

    82268440.jpg

    [latex]\lim_{t \to \infty} \ \int_{0}^{t }\frac{1}{1 \ + \ x^2}\,dx \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \cos \ \theta \ \,dx \ =\ \lim_{t \to \infty} \ \int_{0}^{t } \ \cos \ \theta \ \, \sec^2 \ \theta \ d \ \theta[/latex]

    What I did was express the quotient as cosθ and then from x = tanθ,
    dx = sec²θ dθ

    [latex] \lim_{t \to \infty} \ \int_{0}^{t } \ \cos \ \theta \ \, \sec^2 \ \theta \ d \ \theta \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \sec \ \theta \ d \ \theta \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \sec \ \theta \ \frac{ \sec \ \theta \ + \ \tan \ \theta}{ \sec \ \theta \ + \ \tan \ \theta} \ d \ \theta [/latex]

    [latex] \lim_{t \to \infty} \ \int_{0}^{t } \ \sec \ \theta \ \frac{ \sec \ \theta \ + \ \tan \ \theta}{ \sec \ \theta \ + \ \tan \ \theta} \ d \ \theta \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \frac{1}{u} \ du[/latex]

    Where u = secθ + tanθ

    [latex] \lim_{t \to \infty} \ \int_{0}^{t } \frac{1}{u} \ du \ = \ \lim_{t \to \infty} \ |ln (u)| \ |^t_0 \ = \ \lim_{t \to \infty} \ ln|\sec \theta \ + \ \tan \ \theta| \ |^t_0 [/latex]

    [latex]\lim_{t \to \infty} \ ln|\sec \theta \ + \ \tan \ \theta| \ |^t_0 \ = \ \lim_{t \to \infty} \ ln|1 \ + \ x^2 \ + \ x| \ |^t_0 [/latex]

    and that goes off to infinity, what did I do wrong? If I use

    y = arctanx
    tany = x
    sec²y ᵟᵞ/ₔₓ = 1
    ᵟᵞ/ₔₓ = 1/sec²y = 1/(1 + tan²y) = 1/(1 + x²)

    and go backwards I can get it but doing it the interesting way fails, why? :(


Comments

  • Closed Accounts Posts: 6,081 ✭✭✭LeixlipRed


    Why bother expressing it as cos(theta) in the first place? You'll end up just integrating 1 anyway.


  • Registered Users, Registered Users 2 Posts: 3,038 ✭✭✭sponsoredwalk


    [latex]\cos \theta \ = \ \frac{1}{1 \ + \ x^2}[/latex]

    From the picture.


  • Closed Accounts Posts: 6,081 ✭✭✭LeixlipRed


    Yeh, I realise that. Are you just attempting to intergrate it that way to see if it works out the same? I'm too lazy to latex it out but what I mean is when you do the substitution you end up with sec^2u over sec^2u and they cancel to give you 1 and it's simple that way.


  • Registered Users, Registered Users 2 Posts: 3,038 ✭✭✭sponsoredwalk


    But you don't end up with just θ you end up with secθ


    [latex]\lim_{t \to \infty} \ \int_{0}^{t }\frac{1}{1 \ + \ x^2}\,dx \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \cos \ \theta \ \,dx \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \cos \ \theta \ \, \sec^2 \ \theta \ d \ \theta \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \cos \ \theta \ \, \frac{1}{ \cos^2\ \theta} \ d \ \theta \ [/latex]

    [latex] = \ \ \lim_{t \to \infty} \ \int_{0}^{t } \ \frac{\cos \theta}{ \cos^2 \theta} \ d \ \theta \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \frac{1}{ \cos \theta} \ d \ \theta \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ sec \theta \ d \ \theta[/latex]

    :(


  • Registered Users, Registered Users 2 Posts: 13,073 ✭✭✭✭bnt


    [latex]\cos \theta \ = \ \frac{1}{1 \ + \ x^2}[/latex]

    From the picture.
    Not quite - you missed a square root when calculating the hypotenuse, so:
    [latex]\cos \theta \ = \ \frac{1}{\sqrt{1 \ + \ x^2}}[/latex]

    I know you said that you forget standard integral formulas, but I think it's probably a good idea to remember this one. :cool:

    You are the type of what the age is searching for, and what it is afraid it has found. I am so glad that you have never done anything, never carved a statue, or painted a picture, or produced anything outside of yourself! Life has been your art. You have set yourself to music. Your days are your sonnets.

    ―Oscar Wilde predicting Social Media, in The Picture of Dorian Gray



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,038 ✭✭✭sponsoredwalk


    :(:(:(:(:(:(:( I'm such an idiot!! :D:D:D:D:D Thank you!!! :D


  • Registered Users, Registered Users 2 Posts: 3,038 ✭✭✭sponsoredwalk


    bnt wrote: »
    I know you said that you forget standard integral formulas, but I think it's probably a good idea to remember this one. :cool:
    you mean one of the most basic trig formula's, yeah I do remember it from
    time to time:o Skipped a step by assuming it works because the
    hypoteneuse dissappears due to squaring but forgot to square both sides!


  • Closed Accounts Posts: 6,081 ✭✭✭LeixlipRed


    Good spot, I'm actually not sure what I'm talking about either. I'll have a doodle now.


  • Closed Accounts Posts: 6,081 ✭✭✭LeixlipRed


    Yeh, no I'm right, let x=tan(u), differentiate and you end up with sec^2(u)/(1+tan^2(u)) which is equal to 1, integrate 1 and you get u. So arctan(x) is evaluated at 0 which is 0 and the lim of it as x-> inf is pi/2.


  • Registered Users, Registered Users 2 Posts: 13,073 ✭✭✭✭bnt


    I just meant the standard integral [latex] \int{\frac{1}{1 \ + \ x^2}\,dx}= tan^{-1}x [/latex], and then [latex]tan^{-1}\infty = \pi/2 [/latex]

    It's after midnight on a Sunday, dunno how I spotted it either. ;)

    You are the type of what the age is searching for, and what it is afraid it has found. I am so glad that you have never done anything, never carved a statue, or painted a picture, or produced anything outside of yourself! Life has been your art. You have set yourself to music. Your days are your sonnets.

    ―Oscar Wilde predicting Social Media, in The Picture of Dorian Gray



  • Advertisement
  • Closed Accounts Posts: 6,081 ✭✭✭LeixlipRed


    Ah, yeh, then you'll have cos^2(u) and our methods are the same. Makes sense.


  • Registered Users, Registered Users 2 Posts: 3,038 ✭✭✭sponsoredwalk


    Yeah I don't like that method because it comes out of nowhere, setting
    x = tan(u) or whatever it is, I think it's more fun to do those problems
    with a triangle and not-so-pretty powers etc... :D The thing is I haven't
    thought of a similarly easy method to work with hyperbolic functions, I mean
    you can't really draw a triangle can you seeing as hyperbolic functions
    aren't defined by a right triangle :confused: Also, the main reason I wrote this
    post was that once I got a problem that just wouldn't solve this way &
    I checked it & checked it (but can't find it) but never got the right answer.
    I had to resort to this u = tanx thing :( There is the slight chance I made
    an extremely elementary mistake like I did here but I doubt it, I didn't
    really check this one thoroughally enough as the fear kicked in I'd
    found another unsolvable problem by this method - it's a lesson :rolleyes:

    Anyway, I've been dying to ask this - is there any fun way to deal with
    crazy integrals that eventually involve a hyperbolic substitution that
    doesn't involve memorization but is deductive? :D My book actually
    doesn't deal with them & I haven't found a proper mention of it on
    the net, it's always the f'ing table of integrals!


  • Moderators, Science, Health & Environment Moderators Posts: 1,852 Mod ✭✭✭✭Michael Collins


    Yeah I don't like that method because it comes out of nowhere, setting
    x = tan(u) or whatever it is, I think it's more fun to do those problems
    with a triangle and not-so-pretty powers etc... :D The thing is I haven't
    thought of a similarly easy method to work with hyperbolic functions, I mean
    you can't really draw a triangle can you seeing as hyperbolic functions
    aren't defined by a right triangle :confused: Also, the main reason I wrote this
    post was that once I got a problem that just wouldn't solve this way &
    I checked it & checked it (but can't find it) but never got the right answer.
    I had to resort to this u = tanx thing :( There is the slight chance I made
    an extremely elementary mistake like I did here but I doubt it, I didn't
    really check this one thoroughally enough as the fear kicked in I'd
    found another unsolvable problem by this method - it's a lesson :rolleyes:

    Anyway, I've been dying to ask this - is there any fun way to deal with
    crazy integrals that eventually involve a hyperbolic substitution that
    doesn't involve memorization but is deductive? :D My book actually
    doesn't deal with them & I haven't found a proper mention of it on
    the net, it's always the f'ing table of integrals!

    Well this particular integral is an ideal candidate for residue integration using the theroy of complex variables. I've got some real work to do now for a change so I can't actually do it on here, but if you haven't seen it before and would like to know how to go about it let me know, and I'll post back an example later on.


  • Registered Users, Registered Users 2 Posts: 13,073 ✭✭✭✭bnt


    Have a look at this page, in the section "More Trig Substitution", which says a few things about this example. He basically solves it the long way by using a standard derivative of tan(x). I think you looked at this already?

    I saw another page, on Hyperbolic integrals, which looked at the case where the denominator is a square root - as it would be in the triangle you drew - though (as we saw) the triangle is not much help solving the problem you actually had!

    You are the type of what the age is searching for, and what it is afraid it has found. I am so glad that you have never done anything, never carved a statue, or painted a picture, or produced anything outside of yourself! Life has been your art. You have set yourself to music. Your days are your sonnets.

    ―Oscar Wilde predicting Social Media, in The Picture of Dorian Gray



  • Registered Users, Registered Users 2 Posts: 3,038 ✭✭✭sponsoredwalk


    bnt wrote: »
    Have a look at this page, in the section "More Trig Substitution", which says a few things about this example. He basically solves it the long way by using a standard derivative of tan(x). I think you looked at this already?

    I saw another page, on Hyperbolic integrals, which looked at the case where the denominator is a square root - as it would be in the triangle you drew - though (as we saw) the triangle is not much help solving the problem you actually had!

    This triangle method did actually solve my problem perfectly! I was just an
    idiot skipping steps & didn't write it properly:

    85170322.jpg

    [latex] \cos \theta \ = \ \frac{1}{\sqrt{1 \ + \ x^2}} [/latex]

    [latex] \cos^2 \theta \ = \ ( \ \frac{1}{\sqrt{1 \ + \ x^2}} \ )^2 [/latex]

    [latex] \cos^2 \theta \ = \ ( \ \frac{1}{1 \ + \ x^2} [/latex]

    Then the integral becomes:



    [latex]\lim_{t \to \infty} \ \int_{0}^{t }\frac{1}{1 \ + \ x^2}\,dx \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \cos^2 \ \theta \ \,dx \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \cos^2 \ \theta \ \, \sec^2 \ \theta \ d \ \theta \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \cos^2 \ \theta \ \, \frac{1}{ \cos^2\ \theta} \ d \ \theta \ [/latex]

    [latex] = \ \ \lim_{t \to \infty} \ \int_{0}^{t } \ \frac{\cos^2 \theta}{ \cos^2 \theta} \ d \ \theta \ = \ \lim_{t \to \infty} \ \int_{0}^{t } \ \ d \ \theta [/latex]

    et cetera...

    I don't understand, I was able to solve the problem on this page with regular
    trig functions where Karl uses a hyperbolic substitution, they are both
    long integrals so idk the difference between one or the other because
    they both come out with an answer:

    74993506.jpg

    [latex] \int \ \sqrt{x^2 \ - \ 6x \ + \ 5} dx \ = \ \int \ \sqrt{v^2 \ - \ 4} \ dv[/latex]

    v = x - 3 etc...

    [latex] \int \ \sqrt{v^2 \ - \ 4} \ dv \ = \ \int \ 2 \tan \theta \ dv[/latex]

    [latex]\int \ 2 \tan \theta \ dv \ = \ \int \ 2 \tan \theta \ 2 \ \sec \theta \ \tan \theta \ d \theta[/latex]

    [latex] 4 \ \int \ \ \sec \theta \ \tan^2 \theta \ d \theta[/latex]

    [latex] 4 \ \int \ \ \sec \theta \ ( \ \sec^2 \theta \ - \ 1 \ ) \ d \theta[/latex]

    [latex] 4 \ \int \ \ \sec^3 \theta \ - \ \sec \theta \ ) \ d \theta[/latex]

    [latex] 4 \ [ \ \int \ \ \sec^3 \theta \ d \theta \ - \ \int \ \sec \theta \ d \theta \ ] [/latex]

    I can use IBP on the first integral and the standard substitution on the
    second one to get:

    [latex] 4 \ [ \ ( \ \frac{1}{2} \ \sec \theta \ \tan \theta \ + \ \frac{1}{2} \ ln | \sec \theta \ + \ \tan \theta | \ + \ C \ ) \ - \ ( \ ln | \sec \theta \ + \ \tan \theta| \ + \ C \ ) \ ] [/latex]

    I could keep going but the point is that there is a definite answer following
    the same logic applied to standard integrals, is it just a consequence of
    the fact these integration techniques are almost like tricks that there is
    no difference in the result or is it a mistake because in fact only a
    hyperbolic-shaped function can "map" what's going on accurately?


  • Registered Users, Registered Users 2 Posts: 3,038 ✭✭✭sponsoredwalk


    Well this particular integral is an ideal candidate for residue integration using the theroy of complex variables. I've got some real work to do now for a change so I can't actually do it on here, but if you haven't seen it before and would like to know how to go about it let me know, and I'll post back an example later on.

    :D If you think I could understand it and you have no problem with doing it
    definitely!!! :D


  • Moderators, Science, Health & Environment Moderators Posts: 1,852 Mod ✭✭✭✭Michael Collins


    :D If you think I could understand it and you have no problem with doing it
    definitely!!! :D

    Right, finally getting around to doing this. I can't guarantee you'll understand my ramblings but if anything doesn't make sense, just ask.

    The whole thing is based on Cauchy's Residue Theorem, which I'm not going to prove, although the proof isn't complicated.

    OK, first of all note that because the integrand is even, we can say

    [latex] \displaystyle \int_{0}^{\infty}\frac{1}{1+x^2}\,dx = \frac{1}{2}\int_{-\infty}^{\infty}\frac{1}{1+x^2}\,dx [/latex]

    Now let's look at a similar integral in the complex plane, and integrate around the contour C

    [latex] \displaystyle \oint_{C}\frac{1}{1+z^2}\,dz[/latex]

    where C is given by this semicircular path in the complex plane

    300px-ContourDiagram.png

    consisting of an arc, which we'll call [latex] S_{a} [/latex] and a straight line segment between [latex]-a[/latex] and [latex]+a[/latex] (ignore the [latex]i[/latex] inside for now, but it will be very important later).

    We can write out this contour integral as two seperate integrals: 1) the part over the straight line, and 2) the part over the arc [latex] S_{a} [/latex]

    [latex] \displaystyle \oint_{C}\frac{1}{1+z^2}\,dz =\int_{-a}^{a}\frac{1}{1+x^2}\,dx + \oint_{S_a}\frac{1}{1+z^2}\,dz [/latex]

    so

    [latex] \displaystyle \int_{-a}^{a}\frac{1}{1+x^2}\,dx = \oint_{C}\frac{1}{1+z^2}\,dz - \oint_{S_a}\frac{1}{1+z^2}\,dz [/latex]

    now take the limit of both sides as [latex] a \to \infty [/latex]

    [latex] \displaystyle \int_{-\infty}^{\infty}\frac{1}{1+x^2}\,dx = \oint_{C}\frac{1}{1+z^2}\,dz - \oint_{S_\infty}\frac{1}{1+z^2}\,dz [/latex]

    where the contour C has changed to be an infinite semicircle - effectively the whole upper half-plane.
    Here we show that the right most integral equals zero

    [latex]\displaystyle \left|\oint_{S_a}\frac{1}{1+z^2}\,dz\right| \leq M \cdot L[/latex]

    where M is an upper bound on the value of the modulus of the integrand, and L is the path length (see the Estimation Lemma for more info).

    Clearly [latex] L = \pi a [/latex] ... semicircle

    Now

    [latex]\displaystyle \left| \frac{1}{1+z^2} \right| \leq \frac{1}{1+|z^2|} [/latex] ... triangle inequality on denominator
    [latex]\displaystyle \left| \frac{1}{1+z^2} \right| \leq \frac{1}{1+|z|^2} [/latex] ... changing the order of the power and the modulus is allowed
    But [latex] |z| = a [/latex] on the semicircular contour, so we finally have

    [latex]\displaystyle \left|\oint_{S_a}\frac{1}{1+z^2}\,dz\right| \leq \frac{1}{1+a^2} \cdot \pi a = \frac{\pi a}{1+a^2}[/latex]

    taking limits


    [latex]\displaystyle \lim_{a \to \infty} \left|\oint_{S_a}\frac{1}{1+z^2}\,dz\right| = \left|\oint_{S_\infty}\frac{1}{1+z^2}\,dz\right| \leq \lim_{a \to \infty} \frac{\pi a}{1+a^2} = 0[/latex]

    Right so now that that's over with we're left with

    [latex] \displaystyle \int_{-\infty}^{\infty}\frac{1}{1+x^2}\,dx = \oint_{C}\frac{1}{1+z^2}\,dz[/latex]

    and this is where Cauchy's Residue Theorem comes in.

    It states that a closed contour integral is equal to [latex] 2 \pi i [/latex] times the sum of the values of the residues at the points inside the contour where the integrand has a singularity (i.e. is undefined). It is important to note that it is only the points inside the contour that are important. A residue is the coefficient of the [latex] (z-z_0)^{-1} [/latex] term in a Laurent Series - a power series that allows negative powers.

    Ok, if you don't know what I'm on about, this is a big jump I'll admit, and you'll just have to accept this part for now :) ! But read that residue link, it should help motivate the meaning of the residue and indeed Cauchy's Residue Theorem.

    So at what points does our integrand become undefined

    [latex] \displaystyle \frac{1}{1+z^2} [/latex]

    you might be tempted to say none, but remember we are dealing with the domain of complex numbers here.

    So we see that the integrand is undefined at [latex] \pm i [/latex]. But only +i is inside the contour - see diagram above. So now, by Cauchy's Residue Theorem

    [latex] \displaystyle \int_{-\infty}^{\infty}\frac{1}{1+x^2}\,dx = \oint_{C}\frac{1}{1+z^2}\,dz = 2 \pi i \cdot \mathsf{Res}_{+i} \left( \frac{1}{1+z^2} \right) [/latex]

    Now to calculate the residue

    [latex] \displaystyle \mathsf{Res}_i \left( \frac{1}{1+z^2} \right) = \mathsf{Res}_{+i} \left( \frac{1}{(z+i)(z-i)} \right)[/latex]

    Expanding the residrand(:p) by partial fractions we get

    [latex] \displaystyle \frac{1}{(z+i)(z-i)} = \frac{A}{(z+i)} + \frac{B}{(z-i)} [/latex]

    so again, since the first term here is well-behaved inside the upper half-plane, it contributes nothing, hence the residue is simply the coefficient of

    [latex] \displaystyle \frac{1}{(z-i)} [/latex]

    i.e. the [latex] (z-i)^{-1} [/latex] term.

    This is simply B, which from the partial fraction expansion works out as

    [latex] \displaystyle B = \frac{1}{2i} [/latex]

    Now, at last

    [latex] \displaystyle \int_{-\infty}^{\infty}\frac{1}{1+x^2}\,dx = \oint_{C}\frac{1}{1+z^2}\,dz = 2 \pi i \cdot \mathsf{Res}_{i+} \left( \frac{1}{1+z^2} \right) = 2 \pi i \cdot \frac{1}{2i} = \pi [/latex]

    So back to the first equation at the very top

    [latex] \displaystyle \int_{0}^{\infty}\frac{1}{1+x^2}\,dx = \frac{1}{2}\int_{-\infty}^{\infty}\frac{1}{1+x^2}\,dx = \frac{1}{2} \cdot \pi = \frac{\pi}{2} [/latex]

    See, simples!


  • Registered Users, Registered Users 2 Posts: 3,038 ✭✭✭sponsoredwalk


    :D:D:D Lost me! :p

    It's going to be a long while before I get this, I think the first exposure to
    complex analysis I'll get will be from this book which I plan on buying probably
    soon. Until then thanks - I'll be back ;)


  • Moderators, Science, Health & Environment Moderators Posts: 1,852 Mod ✭✭✭✭Michael Collins


    :D:D:D Lost me! :p

    It's going to be a long while before I get this, I think the first exposure to
    complex analysis I'll get will be from this book which I plan on buying probably
    soon. Until then thanks - I'll be back ;)

    Ha, no problem. I figured when I was writing that post, if I had read that before fully understanding complex integrals, I wouldn't really have been happy - too many unproved concepts.

    Well, this one you'll definately get. I was recently reading An Imaginary Tale: The story of [latex] \sqrt{-1} [/latex] by Paul J. Nahin, which went through this very intergral and it made me think of this thread.

    Here's how he goes about it:


    The arc length of a circle L is given by

    [latex] \displaystyle L = \theta = \int_{0}^{\theta} dt [/latex]

    where t is just a dummy variable.

    Ok now he goes a bit mad and changes the integrand to

    [latex] \displaystyle \theta = \int_{0}^{\theta} \frac{dt / \cos^2(t)}{1 /\cos^2(t)} [/latex]

    [latex] \displaystyle \theta = \int_{0}^{\theta} \frac{dt / \cos^2(t)}{[\sin^2(t) + \cos^2(t)] /\cos^2(t)} [/latex]

    [latex] \displaystyle \theta = \int_{0}^{\theta} \frac{dt / \cos^2(t)}{1+\tan^2(t)} [/latex]

    Now change variables to [latex] x = \tan(t) [/latex] which means [latex] dx = dt/cos^2(t) [/latex] and so

    [latex] \displaystyle L = \int_{0}^{\tan(\theta)} \frac{dx}{1+x^2} [/latex]

    Now since L is one quarter of the circle's circumference when [latex] \theta = \pi/2 [/latex] then

    [latex] \displaystyle \frac{\pi}{2} = \int_{0}^{\tan(\infty)} \frac{dx}{1+x^2} [/latex]

    QED!


Advertisement