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

Solving Line Integral

  1. Feb 21, 2008 #1

    I am working on atmospheric scattering and therefore I have to calculate the optical depth along a given path through the atmosphere.

    The integral I have to solve is this one:
    [tex]\int_{P_a}^{P_b} f ds \quad with \quad f:R\rightarrow R, h\rightarrow e^{(-h/H_0)}[/tex]

    [tex]P_a[/tex] und [tex]P_b[/tex] are Points in [tex]R^3[/tex] and I have to solve the integral along the path from [tex]P_a[/tex] to [tex]P_b[/tex]. [tex]H_0[/tex] is just a constant and h is the height of a point between the line from [tex]P_a[/tex] to [tex]P_b[/tex] .
    So obviously this is a line integral (at least I hope so), which can be solved this way:

    [tex]\int_{P_a}^{P_b} f ds \quad = \quad \int_{a}^{b} f(r(t)) * |r'(t)| dt [/tex]

    r is the parameterization of the path, so my r is:
    r: [a,b] [tex]\rightarrow R^3[/tex].
    r(t) (t is in [a,b]) gives me a point on the path from [tex]P_a[/tex] to [tex]P_b[/tex], with r(a) = [tex]P_a[/tex] and r(b) = [tex]P_b[/tex].
    Now I have the problem that the result of r doesnt fit to the input of f, because f needs a height and not a point in [tex]R^3[/tex] .
    Therefore I slightly change f (and now call it f2):
    [tex]f2:R^3 \rightarrow R, P \rightarrow e^{(-HeightOf(P)/H_0)}[/tex]

    f2 expects a point in [tex]R^3[/tex] and calculates the height of the point P itself.

    Now I just need the parameterization r of the path. Two solutions came into my mind:
    1) [tex] r: [0,1] \rightarrow R^3, t \rightarrow P_a + t * (P_b - P_a) \quad with \quad r'(t) = LengthFromPaToPb = Length
    2) [tex] r: [0, N] \rightarrow R^3, t \rightarrow P_a + t * (P_b - P_a) / N \quad with \quad r'(t) = LengthFromPaToPb / N = sampleLength [/tex]

    If I pick parameterization 1) I end with this formula:

    [tex]\int_{P_a}^{P_b} f ds \quad = \quad \int_{0}^{1} f2(r(t)) * |r'(t)| dt \quad = \quad \int_{0}^{1} f2(r(t)) * Length dt \quad = \quad Length * \int_{0}^{1} f2(r(t)) dt[/tex]

    I numerically solve this integral with the trapezium rule.
    My problem is, that the solutions I get with the trapezium rule are really big (up to 14000). Maybe its because the length of my paths between Pa and Pb are long (about 80000meters) and thus my Length is also very big.

    I cant believe that values around 14000 are right (I have read in a paper, that the optical depth at the horizon is about 6).
    So Im asking you: did I make something wrong?

    Thanks for your help!
  2. jcsd
  3. Feb 22, 2008 #2
    The method you used looks about right. I didnt check the details.

    You can do some rough calculations to check whether your result should rather be 6 or 14 000.

    You write the distance between your two points is 80 000 and you choose a linear path for the integration.

    What is your value for H_0 and and at what heights are your starting and end point? Does the height of a point depend on the coordinates of the point in an easy way (for example just the z-coordinate) or does it involve complicated formulae to account for the curvature of the atmosphere (or whatever)?
  4. Feb 24, 2008 #3
    This is my coordinate system: http://www.infoboard.org/screenshots/system.png [Broken]
    P_a can be any point on the vertical gray line and P_b can be any of the orange points on the outer radius (atmosphere).
    The inner circle is the earth and has an radius of 6 000 000 meters and the outer radius is the atmosphere and has an radius of 6 080 000 meters (so my atmosphere has a height of 80 000m)

    My paramterization r gives me a point on the line between P_a and P_b.
    My function f2 is e^(-HeightOf(P) / H_0) and HeightOf(P) is basically just this:
    |P| - innerRadius (the length of the vector P minus the radius of the earth).
    My H_0 is 20000m.

    Do you see any errors in this?
    Last edited by a moderator: May 3, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook