Trapezoidal Approximation Help

  • Thread starter Thread starter opus
  • Start date Start date
  • Tags Tags
    Approximation
Click For Summary
SUMMARY

The forum discussion focuses on the application of the trapezoidal rule to approximate the integral of the function \( \frac{1}{x} \) from 1 to 2 using \( n=4 \) subintervals. The user calculated the interval length \( \Delta x = \frac{1}{4} \) and attempted to evaluate the function at incorrect points, leading to an erroneous approximation of 2.02 instead of the correct value of approximately 0.697. The mistake was identified as evaluating at \( 1/4, 1/2, \) and \( 3/4 \) instead of the correct points within the interval, which are \( 1, 1.25, 1.5, 1.75, \) and \( 2 \).

PREREQUISITES
  • Understanding of the trapezoidal rule for numerical integration
  • Basic knowledge of calculus, specifically integration techniques
  • Familiarity with evaluating functions at specific points
  • Ability to perform arithmetic operations with fractions
NEXT STEPS
  • Review the trapezoidal rule and its derivation for numerical integration
  • Practice evaluating integrals using the trapezoidal rule with different values of \( n \)
  • Learn about error analysis in numerical integration methods
  • Explore other numerical integration techniques such as Simpson's rule
USEFUL FOR

Students studying calculus, mathematics educators, and anyone seeking to improve their skills in numerical methods for integration.

opus
Gold Member
Messages
717
Reaction score
131

Homework Statement


Approximate each integral using the trapezoidal rule using the given number for ##n##.
##\int_1^2 \frac{1}{x}dx## where ##n=4##

Homework Equations


Trapezoidal Approximation "Rule":

Let ##[a,b]## be divided into ##n## subintervals, each of length ##Δx##, with endpoints at ##P={x_0,x_1,x_2,...x_n}##
Set ##T_n=\frac{1}{2}Δx\left[f(x_0)+2f(x_1)+2f(x_2)+...+2f(x_{n-1})+f(x_n)\right]##
Then,
##\lim_{n \rightarrow +\infty}T_n = \int_a^b f(x)dx##

The Attempt at a Solution


(i) ##n=4## and my intervals lengths are ##Δx=\frac{b-a}{n}=\frac{1}{4}##

(ii) ##\int_1^2 \frac{1}{x}dx ≈ \frac{1}{2}⋅\frac{1}{4}\left[f(1)+2f(1/4)+2f(1/2)+2f(3/4)+f(2)\right]##

##f(1)=1##
##2f(1/4)=8##
##2f(1/2)=4##
##2f(3/4)=\frac{8}{3}##
##f(2)=\frac{1}{2}##

Plugging the values into ##T_n##, I get ##\int_1^2 \frac{1}{x}dx ≈ 2.02##
The correct solution is 0.697, and I can't for the life of me see where I went wrong.

Could I get an extra pair of eyes on this?
 
Physics news on Phys.org
Why are you evaluating at 1/4, 1/2, and 3/4? They are not in your interval.
 
  • Like
Likes   Reactions: opus
I am a fool. Should be 1 1/4 not 1/4 etc. Jeez. Thank you!
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 13 ·
Replies
13
Views
1K
Replies
17
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
5
Views
2K