Trapezoidal Approximation Help

  • Thread starter Thread starter opus
  • Start date Start date
  • Tags Tags
    Approximation
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
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
I am a fool. Should be 1 1/4 not 1/4 etc. Jeez. Thank you!