Results 1 to 15 of 15

Thread: Integration help

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391

    Integration help

    Hi,

    I was hoping someone might have some clues on how to solve this integral:


    sec(x)
    ______ dx
    a - tan(x)


    I can't find any useful substitutions so if anyone has any ideas I would appreciate the help.


    Thanks!

  2. #2
    Fanatic Member twanvl's Avatar
    Join Date
    Dec 2001
    Posts
    771

    Re: Integration help

    first of all: sec(x) = 1/cos(x) and tan(x) = sin(x) / cos(x), so your equation is the same as:
    sec(x) / (a - tan(x)) dx
    = 1 / ( cos(x) (a - tan(x)) ) dx
    = 1 / ( a cos(x) - cos(x) tan(x) ) dx
    = 1 / ( a cos(x) - sin(x) ) dx
    Maybe this helps

    Anyway, according to Mathematica the solution is:

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391

    Re: Integration help

    Hi,


    Thanks for your reply. No matter which way i manipulate I still can't figure out how to arrive at the solution. I used MathCAD to arrive at a solution as well but I still have no idea how to get the solution myself. I probably should have mentioned this.

    Thanks.

  4. #4
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: Integration help

    Did MathCAD provide the same solution as Mathematica? Knowing the solution you might be able to work backwards to discover what the right substitution is.

    VBAhack
    Last edited by VBAhack; Sep 15th, 2005 at 07:37 PM.

  5. #5
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: Integration help

    This is an interesting one. I did some looking in my old (really old) calculus book, and this problem seems to fit a class where the substitution u = tan 1/2 x might be useful. I did some playing around and got it to:

    2du/(a(1-u^2) - 2u)

    but couln't get any further.

    VBAhack

  6. #6
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Integration help

    Quote Originally Posted by twanvl
    Anyway, according to Mathematica the solution is:
    You can transform this solution somewhat if you don't like hyperbolic functions:
    Attached Images Attached Images  
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  7. #7
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Integration help

    Quote Originally Posted by VBAhack
    This is an interesting one. I did some looking in my old (really old) calculus book, and this problem seems to fit a class where the substitution u = tan 1/2 x might be useful.
    VBAhack
    This is actually the way to go. From

    u = tan(x/2)

    Some elementary trig gives:

    x = 2 arctan(u)
    dx = 2du/(1 + u2)
    sin(x) = 2u/(1 + u2)
    cos(x) = (1 - u2)/(1 + u2)

    From this you arrive at this simpler integral:

    2du / [a(1 - u2) - 2u]

    Hopefully you know how to deal with integrands having polynomials in the denominator. Otherwise let me know and I'll be back to you.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  8. #8
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: Integration help

    Yep, you came up with the same result I did.

    VBAhack

  9. #9
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Integration help

    Quote Originally Posted by VBAhack
    Yep, you came up with the same result I did.

    VBAhack
    Yeah, I noticed this afterwards. Actually, I meant to continue the whole derivation from there but was a bit in a hurry so if wy125 or you are interested I can post it.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  10. #10
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Thumbs up Re: Integration help

    krtxmrtz,

    I think I have it. To integrate the following:

    sec(x)
    ______ dx
    a - tan(x)

    First make the following substitution:

    u = tan (x / 2)

    This results (after some re-arranging) in:

    2 du / (a - a u2 - 2 u),

    Next, make the following substitution:

    y = u + 1/a

    This yields:

    (2 dy) / [a + 1/a - a y2] = (2/a) dy / (z2 - y2), where z = sqrt[(1 + a2)/(a2)]

    which is a common form. Thus:

    ∫(2/a) dy / (z2 - y2) = (2/a) (1/z) arctanh (y/z) + C

    substituting y = u + 1/a, we get:

    = (2/a) (1/z) arctanh[ (u + 1/a) / z ] + C
    = [2 / √(1 + a2)] arctanh[ a (u + 1/a) / √(1 + a2)] + C
    = [2 / √(1 + a2)] arctanh[ 1 + a u) / √(1 + a2)] + C

    and, finally, substituting u = tan (x / 2), we get the desired result:

    = [2 / √(1 + a2)] arctanh{[1 + a tan (x / 2) ] / √(1 + a2)} + C

    VBAhack

    P.S. How'd you paste the superscript characters? Thanks for the tip on this
    Last edited by VBAhack; Sep 22nd, 2005 at 11:05 AM.

  11. #11
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Integration help

    Quote Originally Posted by VBAhack
    How'd you paste the superscript characters?
    To have a text appear as superscript, write: [x]text[/x]

    but instead of x write sup: I have to write it as a variable or else it will "do the job" and you won't see what's inside [ ] but the word "text" as superscript.

    For a subscript, make x=sub

    It's quite similar to using e.g. bold text: select some text you're composing, click on the "bold" button and see the tags.

    Try it out and use "preview post" to see what it looks like before posting.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  12. #12
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Integration help

    Quote Originally Posted by VBAhack
    krtxmrtz,

    I think I have it.
    Next, make the following substitution:

    y = u + 1/a
    This was a clever substitution!

    I took a similar but perhaps more complicated path by decomposing the integrand:

    2du / (-u2 - 2u +a) = (2 / a) * [1 / (u + p) - 1 / (u + q)] / (p - q)

    where

    p = (1 + sqrt(1 + a2))/a
    q= (1 + sqrt(1 - a2))/a

    so that the result is immediate:

    Integral = [2/a(p - q)]*[ln(u + p) - ln(u + q)] = [2/a(p - q)]*[ln((u + p)/(u + q))] = [2/a(p - q)]*[ln((tan(x/2) + p)/(tan(x/2) + q))]

    etc
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  13. #13
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: Integration help

    Thanks for the tips on superscript - works great. I'd love to see a list of the other tags that are available....

    Thanks also for your solution - I like it perhaps even better than mine because the resulting integrand is simpler.

    One last tid bit (to be completely anal about this), is a derivation of ∫ dx / (z2 – x2):

    Let x = z tanh (z u), then

    x / z = tanh (z u)
    z u = arctanh (x / z)
    u = (1 / z) arctanh (x / z)

    Using the basic derivative: d/dx tanh (x) = sech2 (x), we get

    dx = z sech2 (z u) z du
    = z2 sech2 (z u) du

    ∫ dx / (z2 - x2)
    = ∫ z2 sech2 (z u) du / [ z2 - z2 tanh2 (z u) ]
    = ∫ sech2 (z u) du / [ 1 – tanh2 (z u) ]

    Using the identity sech2 (x) = 1 - tanh2 (x), we get

    = ∫ sech2 (z u) du / sech2 (z u)
    = ∫ du
    = u + C
    = (1 / z) arctanh (x / z) + C

    VBAhack
    Last edited by VBAhack; Sep 21st, 2005 at 03:55 PM.

  14. #14
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Integration help

    This is how I decomposed the integrand (which I've called R):

    R = 2 / (-x2 - 2x +a) = -2 / (x2 + 2x -a)

    x2 + 2x - a = (x - p)(x - q)

    where p and q are the 2 roots of the polynomial:

    p = -1 + sqrt(1 + a)
    q = -1 - sqrt(1 + a)

    (notice there was a mistake in my calculated values for p and q in my earlier post: this does not invalidate the mothod though)

    Then:

    R = -2 / (x-p)(x-q) = M / (x - p) + N / (x - q)

    where M and N are to be determined. This is done as follows:

    -2 = M(x - q) + N(x - p) = (M + N)x - (Mq + Np)

    This must hold for any value of x. hence:

    M + N = 0 (there's no term for x on the left hand side)
    Mq + Np = 2

    Solving:

    M = -2 / (p - q)
    N = 2 / (p - q)

    so that finally:

    R = (-2 / (p - q)) / (x - p) + (2 / (p - q)) / (x - q)
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  15. #15
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: Integration help

    Thanks, I see. You factored the quadratic equation, then used partial fractions to solve.
    Last edited by VBAhack; Sep 26th, 2005 at 01:23 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width