How to Apply the Composite Trapezoidal Rule When Integrating y dx?

  • Thread starter VooDoo
  • Start date
  • Tags
    Composite
In summary, the conversation discusses using the trapezoidal rule for integration and clarifies that f(x1) corresponds to the value of y at x1. It also mentions that for multiple x and y values, each pair should be treated as a separate trapezoid.
  • #1
VooDoo
59
0
Hey guys,

Im a bit baffled on this one.

I have been told to perform the following integration:
[tex]\int y dx[/tex] from -1 to 14. I have been given some values of x and the corresponding values of y.

I just have one question, the fact that it is y dx is throwing me off. The trapazoidal rule is: I = h* [f(x1)-f(x2)]/2. This is probably really simple and a dumb question, but I assume that f(x1) corresponds to the value of y that I have been given for x1?
 
Physics news on Phys.org
  • #2
Yes, that is what the standard notation y= f(x) means. Now I notice that you title this "composite" trapezoidal rule. The trapezoidal rule you give is for just two points: one trapezoid. If you are given a number of x and y values, you will want to do a different trapezoid for each pair of points, the "right" side of one trapezoid being the "left" side of the other. If, for example, you had 3 points (x1,y1), (x2,y2),(x3,y3), then the "trapezoid" between x1 and x2 has area (y2- y1)/2(x2-x1) and the "trapezoid" between x2 and x3 has area (y3- y2)/2(x3-x2). The total area, of course, would be the sum of those.
 
  • #3
VooDoo said:
I just have one question, the fact that it is y dx is throwing me off. The trapazoidal rule is: I = h* [f(x1)-f(x2)]/2. This is probably really simple and a dumb question, but I assume that f(x1) corresponds to the value of y that I have been given for x1?

Hi VooDoo! :smile:

Yes, y is a function of x, just like any old f, but we don't normally write y(x), so you have to imagine the "(x)" :wink:

So f(x1) = y(x1) = the value of y at x = x1. :smile:
 

FAQ: How to Apply the Composite Trapezoidal Rule When Integrating y dx?

What is the Composite Trapezoidal Rule?

The Composite Trapezoidal Rule is a numerical method for approximating the definite integral of a function. It divides the interval of integration into smaller subintervals and uses the trapezoidal rule on each subinterval to estimate the integral.

How does the Composite Trapezoidal Rule work?

The Composite Trapezoidal Rule works by dividing the interval of integration into smaller subintervals of equal width, and then using the trapezoidal rule on each subinterval to approximate the integral. The result is a more accurate estimate of the integral than using the trapezoidal rule on the entire interval.

What is the formula for the Composite Trapezoidal Rule?

The formula for the Composite Trapezoidal Rule is (h/2) * [f(a) + 2f(x1) + 2f(x2) + ... + 2f(xn-1) + f(b)], where a and b are the limits of integration, h is the width of each subinterval, and n is the number of subintervals.

What is the advantage of using the Composite Trapezoidal Rule over the basic Trapezoidal Rule?

The Composite Trapezoidal Rule is more accurate than the basic Trapezoidal Rule because it uses multiple smaller subintervals, rather than just one large interval, to approximate the integral. This results in a more precise estimate of the integral.

How do I choose the number of subintervals for the Composite Trapezoidal Rule?

The number of subintervals used in the Composite Trapezoidal Rule depends on the desired level of accuracy. Generally, the more subintervals used, the more accurate the approximation will be. However, using too many subintervals can result in computational errors. It is recommended to start with a small number of subintervals and increase gradually until the desired accuracy is achieved.

Similar threads

Back
Top