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

Gauss-Chebyshev Quadrature

  1. Oct 18, 2012 #1
    Hello everyone,

    I have a question:
    I want to solve and plot the following function with Gauss-Chebyshev quadrature using Mathematica code:

    $$F(t_k)=\frac{1}{N}\sum_{i=1}^N\left[\sum_{j=1}^m a_jT_j(s_i)\right]\frac{1}{s_i-t_k}$$
    wehre
    $$s_i=\cos (\pi \frac{2i-1}{2N})\quad \quad i=1...N$$
    $$t_k=\cos (\pi \frac{k}{N})\quad \quad i=1...N-1$$

    on a quick answer I am very grateful

    thank you
     
  2. jcsd
  3. Nov 4, 2012 #2
    F(t)=\int_ \! (\frac{1}{\sqrt{1-s^{2} } } \frac{Phi(s)}{t-s} ) \, ds

    (integrals are from -1 to +1)
    this equation may be solved by the Gauss-Chebyshev integration formulae:
    assume that Phi(s) can be appoximated by the fallowing truncated series:

    Phi(s)= \sum\limits_{j=1}^m a_{j}T_{j}(s)

    so that the integral now reads

    \sum\limits_{j=1}^m a_{j} \int_ \! (\frac{1}{\sqrt{1-s^{2} } } )(\frac{T_{j}(s) }{t-s} ) \, ds |t|<1
    and my task is to evaluate the unknown coefficients a_{j} . The integral may be evaluated through the relation :

    for j=0 :

    \int_\! (\frac{1}{\sqrt{1-s^{2} } } )(\frac{T_{j}(s) }{t-s} ) \, ds = 0

    for j>0 :

    \int_ \! (\frac{1}{\sqrt{1-s^{2} } } )(\frac{T_{j}(s) }{t-s} ) \, ds = U_{j-1}(t)

    so that

    F(t)=\sum\limits_{j=1}^m a_{j} U_{j-1}(t)

    we next note the fallowing relation :

    for j=0
    \frac{1}{N}\sum\limits_{i=1}^N \frac{T_{j}(s_{i}) }{s_{i}-t_{k}) } = 0
    for 0<j<N :

    \frac{1}{N}\sum\limits_{i=1}^N \frac{T_{j}(s_{i}) }{s_{i}-t_{k}) } = U_{j-1}(t_{k} )

    where the points are the N roots of T_{N}(s) and the points t_{k} are the N-1 roots of U_{N-1}(t) .

    It follows that

    F(t_{k})=\sum\limits_{j=1}^m a_{j} U_{j-1}(t_{k})=\frac{\pi }{N} \sum\limits_{i=1}^N [ \sum\limits_{j=1}^m a_{j} T_{j}(s_{i}) ] \frac{1}{s_{i} -t_{k} } = \frac{\pi }{N} \sum\limits_{i=1}^N \frac{Phi(s_{i} )}{s_{i} -t_{k} }

    where the integration points are:

    s_{i} = \cos(\pi \frac{2i-1}{2N}) i=1...N


    t_{k} = \cos(\pi \frac{k}{N}) i=1...N-1


    the weights (\frac{\pi }{N} ) .

    für das Gleichungssystem mit mehreren variablen

    F(t_{k})=\sum\limits_{j=1}^m a_{j} U_{j-1}(t_{k}).

    wo

    F(t_{k}) und U_{j-1}(t_{k}) bekannt

    und

    a_{j} unbekannt.

    wie kann ich bitte dieses Gleichungssystem

    a_{j} = U_{j-1}(t_{k}) \ F(t_{k})

    in MatLAB lösen.

    mir fehlt Code.
     
  4. Nov 4, 2012 #3
    ohhh pardon,
    i rewrite it
     
  5. Nov 4, 2012 #4
    F(t)=∫([itex]\frac{1}{\sqrt{1-s^2}}(\frac{\phi(s)}{t-s})ds[/itex]

    (integrals are from -1 to +1)
    this equation may be solved by the Gauss-Chebyshev integration formulae:
    assume that Phi(s) can be appoximated by the fallowing truncated series:

    [itex]\phi(s) = Ʃ^{m}_{j=1} a_{j} T_{j}(s) [/itex]

    so that the integral now reads

    Ʃ[itex]^{m}_{j=1}[/itex] [itex]a_{j}[/itex]∫([itex]\frac{1}{\sqrt{1-s^2}}(\frac{T_{j}(s)}{t-s})ds[/itex] ; -1<t<+1

    and my task is to evaluate the unknown coefficients [itex]a_{j}[/itex] . The integral may be evaluated through the relation :

    for j=0 :
    ∫([itex]\frac{1}{\sqrt{1-s^2}}(\frac{T_{j}(s)}{t-s})ds[/itex] = 0

    for j>0 :
    ∫([itex]\frac{1}{\sqrt{1-s^2}}(\frac{T_{j}(s)}{t-s})ds[/itex] = [itex]U_{j-1}(t)[/itex]

    so that

    F(t)=[itex]\sum^{m}_{j=1}[/itex] [itex]a_{j}[/itex] [itex]U_{j-1}(t)[/itex]

    we next note the fallowing relation :

    for j=0

    [itex]\frac{1}{N}[/itex] [itex]\Sigma^{i=1}_{N}[/itex] ([itex]\frac{T_{j}(s_{i})}{t_{k}-s_{i}}[/itex]) = 0

    for 0<j<N :

    [itex]\frac{1}{N}[/itex] [itex]\Sigma^{i=1}_{N}[/itex] ([itex]\frac{T_{j}(s_{i})}{t_{k}-s_{i}}[/itex]) = [itex]U_{j-1}(t)[/itex]


    where the points [itex]s_{i}[/itex] are the N roots of [itex]T_{N}(s)[/itex] and the points [itex]t_{k}[/itex] are the N-1 roots of [itex]U_{N-1}(t)[/itex] . It follows that

    F([itex]t_{k}[/itex]) = [itex]\sum^{m}_{j=1}[/itex] [itex]a_{j}[/itex] [itex]U_{j-1}(t_{k})[/itex] = [itex]\frac{\pi}{N} Ʃ^{N}_{i=1} [\Sigma^{m}_{j=1} a_{j} T_{j}(s_{i}) ]\frac{1}{s_{i}-t_{k}} = \frac{\pi}{N}\Sigma^{N}_{i=1} \frac{\phi (s_{i})}{s_{i}-t_{k}} [/itex]


    where the integration points are:

    [itex]s_{i} = cos(\pi \frac{2i-1}{2N})[/itex] i=1....N


    [itex]t_{k} = cos(\pi \frac{k}{N})[/itex] k=1....N-1

    the weights ([itex]\frac{\pi}{N}[/itex])

    Note that the integration has been reduced to the sum and weights ([itex]\frac{\pi}{N}[/itex]) and the integration points [itex]s_{i}[/itex] are the same as used as in the standard Gaussian quadrature formula.


    Let's have a look at :


    F([itex]t_{k}[/itex]) = [itex]\sum^{m}_{j=1}[/itex] [itex]a_{j}[/itex] [itex]U_{j-1}(t_{k})[/itex]

    We assume that F([itex]t_{k}[/itex]) and [itex]U_{j-1}(t_{k})[/itex] are given. That leads to m equations in case there are m different [itex]t_{k}[/itex]. It's our task to evaluate the unknown coefficients [itex]a_{j}[/itex].

    Therefor i must solve a linear equation m multiple variables ( the unknown coefficients [itex]a_{j}[/itex] ) in MatLAB .

    can you help me to solve it in MatLAB.
    i need a code in matlab.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Gauss-Chebyshev Quadrature
  1. Gaussian Quadrature` (Replies: 3)

Loading...