1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Trapezoidal rule

  1. Oct 25, 2009 #1
    1. The problem statement, all variables and given/known data

    if i have an integral equation of the form:

    [tex]\lambda x(t)-\int{K(t,s)x(s)ds}=y(t)[/tex]

    and i want to apply the nystrom method to find a numerical solution, then the quadrature rule gives:

    [tex]\lambda x(t_i)-\sum^n_{j=1}{w_{j}K(t_i,t_j)x(t_j)}=y(t_i)[/tex]

    my question is:
    What is (using the trapezoidal rule) the expression for wj

    2. Relevant equations

    3. The attempt at a solution

    i have no idea except that there's a 'h' somewhere (step length)
    thank you
  2. jcsd
  3. Oct 25, 2009 #2


    Staff: Mentor

    At the risk of telling you something you might already know, here's what's going on in the trapezoid rule.

    You have a function f(t) that you want to integrate, and you have divided your interval [a, b] into n subintervals of length h, using a partition {t0, t1, ... , ti, ti + 1, ..., tn}.

    The trapezoid rule approximates [tex]\int_{t_i}^{t_{i + 1}} f(t) dt[/tex] by a trapezoid whose area is [tex]\frac{f(t_i) + f(t_{i + 1}}{2}h[/tex].

    When you add up all the trapezoidal regions, you get
    [tex]\frac{f(t_0) + f(t_{1})}{2}h + \frac{f(t_1) + f(t_{2})}{2}h + \frac{f(t_2) + f(t_{3})}{2}h + ... + \frac{f(t_{n - 1}) + f(t_{n})}{2}h[/tex]

    This works out to (1/2)h*[f(t0) + 2f(t1) + 2f(t2) + ... + 2f(tn - 1) + f(tn)], because all of the f(ti) terms appear twice except for the first one and the last one.

    So... my guess is that wj in your integral is going to one of two different values, depending on the value of j; wj = (h/2) for j = 0 and j = n, and wj = h for 0 < j < n.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook