Hướng dẫn how do you write simpsons rule in python? - làm thế nào để bạn viết quy tắc simpsons trong python?
Có mã của tôi (tôi nghĩ đó là phương pháp dễ dàng nhất). Tôi đã làm điều này trong Notebook Jupyter. Mã dễ nhất và chính xác nhất cho phương pháp Simpson là 1/3. Show
Giải trìnhĐối với phương pháp tiêu chuẩn (a = 0, h = 4, b = 12) và f = 100- (x^2)/2 Chúng tôi có: n = 3.0, y0 = 100.0, y1 = 92.0, y2 = 68.0, y3 = 28.0, Vì vậy, Simpson Method = h/3*(y0+4*y1+2*y2+y3) = 842,7 (điều này không đúng). Sử dụng quy tắc 1/3 mà chúng tôi có: h = h/2 = 4/2 = 2 và sau đó: n = 3.0, y0 = 100.0, y1 = 98.0, y2 = 92.0, y3 = 82.0, y4 = 68.0, y5 = 50.0, y6 = 28.0, Bây giờ chúng tôi tính toán tích phân cho mỗi bước (n = 3 = 3 bước): Tích hợp của bước đầu tiên: h/3*(y0+4*y1+y2) = 389.3333333333333 Tích hợp của bước thứ hai: h/3*(y2+4*y3+y4) = 325.3333333333333 Tích hợp của bước thứ ba: h/3*(y4+4*y5+y6) = 197.3333333333331 Tổng hợp tất cả, và chúng tôi nhận được 912.0 và điều này là đúng
Lúc đầu, tôi đã thêm mục nhập dữ liệu đơn giản: PHPSimpson 1/3 method is defined using python function definition Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule. 96 d=None while(True): print("Enter your own data or enter the word "test" for ready data.\n") x=input ('Enter the beginning of the interval (a): ') if x == 'test': x=0 h=4 #krok (Δx) b=12 #granica np. 0>12 #w=(20*x)-(x**2) lub (1+x**3)**(1/2) break h=input ('Enter the size of the integration step (h): ') if h == 'test': x=0 h=4 b=12 break b=input ('Enter the end of the range (b): ') if b == 'test': x=0 h=4 b=12 break d=input ('Give the function pattern: ') if d == 'test': x=0 h=4 b=12 break elif d != -9999.9: break x=float(x) h=float(h) b=float(b) a=float(x) if d == None or d == 'test': def fun(x): return 100-(x**2)/2 #(20*x)-(x**2) else: def fun(x): w = eval(d) return w h=h/2 l=0 #just numeration print('n=',(b-x)/(h*2)) n=int((b-a)/h+1) y = [] #tablica/lista wszystkich y / list of all "y" yf = [] for i in range(n): f=fun(x) print('y%s' %(l),'=',f) y.append(f) l+=1 x+=h print(y,'\n') n1=int(((b-a)/h)/2) l=1 for i in range(n1): nf=(h/3*(y[+0]+4*y[+1]+y[+2])) y=y[2:] print('Całka dla kroku/Integral for a step',l,'=',nf) yf.append(nf) l+=1 print('\nWynik całki/Result of the integral =', sum(yf) ) 7Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule. 98d=None while(True): print("Enter your own data or enter the word "test" for ready data.\n") x=input ('Enter the beginning of the interval (a): ') if x == 'test': x=0 h=4 #krok (Δx) b=12 #granica np. 0>12 #w=(20*x)-(x**2) lub (1+x**3)**(1/2) break h=input ('Enter the size of the integration step (h): ') if h == 'test': x=0 h=4 b=12 break b=input ('Enter the end of the range (b): ') if b == 'test': x=0 h=4 b=12 break d=input ('Give the function pattern: ') if d == 'test': x=0 h=4 b=12 break elif d != -9999.9: break x=float(x) h=float(h) b=float(b) a=float(x) if d == None or d == 'test': def fun(x): return 100-(x**2)/2 #(20*x)-(x**2) else: def fun(x): w = eval(d) return w h=h/2 l=0 #just numeration print('n=',(b-x)/(h*2)) n=int((b-a)/h+1) y = [] #tablica/lista wszystkich y / list of all "y" yf = [] for i in range(n): f=fun(x) print('y%s' %(l),'=',f) y.append(f) l+=1 x+=h print(y,'\n') n1=int(((b-a)/h)/2) l=1 for i in range(n1): nf=(h/3*(y[+0]+4*y[+1]+y[+2])) y=y[2:] print('Całka dla kroku/Integral for a step',l,'=',nf) yf.append(nf) l+=1 print('\nWynik całki/Result of the integral =', sum(yf) ) 90
# Simpson's 1/3 Rule # Define function to integrate def f(x): return 1/(1 + x**2) # Implementing Simpson's 1/3 def simpson13(x0,xn,n): # calculating step size h = (xn - x0) / n # Finding sum integration = f(x0) + f(xn) for i in range(1,n): k = x0 + i*h if i%2 == 0: integration = integration + 2 * f(k) else: integration = integration + 4 * f(k) # Finding final integration value integration = integration * h/3 return integration # Input section lower_limit = float(input("Enter lower limit of integration: ")) upper_limit = float(input("Enter upper limit of integration: ")) sub_interval = int(input("Enter number of sub intervals: ")) # Call trapezoidal() method and get result result = simpson13(lower_limit, upper_limit, sub_interval) print("Integration result by Simpson's 1/3 method is: %0.6f" % (result) ) 1 # Simpson's 1/3 Rule # Define function to integrate def f(x): return 1/(1 + x**2) # Implementing Simpson's 1/3 def simpson13(x0,xn,n): # calculating step size h = (xn - x0) / n # Finding sum integration = f(x0) + f(xn) for i in range(1,n): k = x0 + i*h if i%2 == 0: integration = integration + 2 * f(k) else: integration = integration + 4 * f(k) # Finding final integration value integration = integration * h/3 return integration # Input section lower_limit = float(input("Enter lower limit of integration: ")) upper_limit = float(input("Enter upper limit of integration: ")) sub_interval = int(input("Enter number of sub intervals: ")) # Call trapezoidal() method and get result result = simpson13(lower_limit, upper_limit, sub_interval) print("Integration result by Simpson's 1/3 method is: %0.6f" % (result) ) 2 1.82784703Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule. 98 # Simpson's 1/3 Rule # Define function to integrate def f(x): return 1/(1 + x**2) # Implementing Simpson's 1/3 def simpson13(x0,xn,n): # calculating step size h = (xn - x0) / n # Finding sum integration = f(x0) + f(xn) for i in range(1,n): k = x0 + i*h if i%2 == 0: integration = integration + 2 * f(k) else: integration = integration + 4 * f(k) # Finding final integration value integration = integration * h/3 return integration # Input section lower_limit = float(input("Enter lower limit of integration: ")) upper_limit = float(input("Enter upper limit of integration: ")) sub_interval = int(input("Enter number of sub intervals: ")) # Call trapezoidal() method and get result result = simpson13(lower_limit, upper_limit, sub_interval) print("Integration result by Simpson's 1/3 method is: %0.6f" % (result) ) 06Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.785398 Xem thảo luận Cải thiện bài viết Lưu bài viết Xem thảo luận Cải thiện bài viết Lưu bài viết Đọc Bàn luận Trong phân tích số, quy tắc Simpson 1/3 là một phương pháp xấp xỉ bằng số của các tích phân xác định. Cụ thể, đó là xấp xỉ sau: & nbsp; & nbsp; & nbsp; Bàn luận Trong phân tích số, quy tắc Simpson 1/3 là một phương pháp xấp xỉ bằng số của các tích phân xác định. Cụ thể, đó là xấp xỉ sau: & nbsp; In this rule, n must be
EVEN. Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule. C++ 1 2& nbsp; & nbsp; Trong quy tắc 1/3 của Simpson, chúng tôi sử dụng parabolas để xấp xỉ từng phần của đường cong. & nbsp; bởi nội suy bậc hai p (x) (màu đỏ). & nbsp; & nbsp; 0Để tích hợp bất kỳ hàm f (x) nào trong khoảng (a, b), hãy làm theo các bước được đưa ra dưới đây: 1. Chọn một giá trị cho n, đó là số phần mà khoảng thời gian được chia thành. & Nbsp; 2.Calculation Chiều rộng, h = (b-a) /n 3 Hãy xem xét y = f (x). Bây giờ tìm các giá trị của y (y0 đến yn) cho các giá trị x (x0 đến xn) tương ứng. được đưa ra bởi quy tắc của Simpson: & nbsp; 5Lưu ý: Trong quy tắc này, n phải chẵn. Ứng dụng: & nbsp; nó được sử dụng khi rất khó để giải quyết tính tích phân đã cho. 0 3 4 5 6 7 6 9 1 2 3 4Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.7 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.9 1 5 6 7 6 9 6 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853981 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853982 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853983 1 2 3 4 6 7 6 9 6 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853981 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853982 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853983
1 6 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853987
Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 6
1 5 1upper_limit 8 1 6 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.0 5 1Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.2 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.3 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853982 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.5 0 1 6 1.8278474 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 1 lower_limit 2Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 6 lower_limit 1 lower_limit 8 1f(x) 6 1 2 sub_interval 1 5Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.785398 2 sub_interval4 1 6 sub_interval 8 1 6 f(x) 1 1 0Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 2 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.3 6 16 1 5 1 05 6 7 6 9 6 26 27Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853982 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853983 1 0Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853987 Các Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 45 38 6 40 41 42Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.2 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.3 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853982 55 56 57
Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.7
Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.9 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 5Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 66 56 68Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.2 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.3 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853982 55 56 57Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 66 56 68 81lower_limit 4
78 56 80
86 87 88 56 90
81 92 93 94Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 5Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 04 05 06 81 92 87 94 1 5Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 2 sub_interval 1 1 18 1 01 05 15 16Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 21 93 68Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 26 6 90 29 68Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 37 38 39 1 5 5Python3Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853982 33 34 68 43 44 45 46 1 2 49 45 51 1 53 54 55 56 57 58 59 1 61 54 63 64 1 66 54 63 64 1 71 54 56 1 75 76 54 78Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 86Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 80 81 71 83 84Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 71 81 54 91 1 66 54 63 64 1 71 54 56 1 75 76 54 78Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 80 81 71 83 84Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 71 81 54 91 1 93 54 56Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 6Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539829 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 1 71 54 54 56 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539811 71__
Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539817 81 54 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539820 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539822 71Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539824 87 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539826 54 56Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539829
Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539817 81 54 93 83 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539820
Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539817 81 54 87 83 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539820 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539848 81 54 91 1 93 54 93 83 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539857__ 1 2 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539817 C#Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539864 54 ________ 193 & nbsp; & nbsp;Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539867 54 29 0Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539870 54 34 1 0Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539873 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.3 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539875 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539824 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539877 1 5 1 05 6 7 6 9 6 26 3 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539879 1 0Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853987 01 02 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539882 1 05 6 7 6 9Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 2 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.3 6Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539896
Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.7
Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.9 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 5Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.07 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853982 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853983 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 2 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.3 6Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.78539896 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.07 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853982 Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.7853983 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 37 38 6Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.20 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 45 38 6Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.20 81upper_limit 0
81upper_limit 4Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 5Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 upper_limit 8 81 92 87 94 1 5Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 2 sub_interval 1 1 0 1 01 05 15 16Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 21 93 68Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 6 26 6 90 29 68Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.89 38 39 1 5 5Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule. 6Enter lower limit of integration: 0 Enter upper limit of integration: 1 Enter number of sub intervals: 6 Integration result by Simpson's 1/3 method is: 0.785398 2 # Simpson's 1/3 Rule # Define function to integrate def f(x): return 1/(1 + x**2) # Implementing Simpson's 1/3 def simpson13(x0,xn,n): # calculating step size h = (xn - x0) / n # Finding sum integration = f(x0) + f(xn) for i in range(1,n): k = x0 + i*h if i%2 == 0: integration = integration + 2 * f(k) else: integration = integration + 4 * f(k) # Finding final integration value integration = integration * h/3 return integration # Input section lower_limit = float(input("Enter lower limit of integration: ")) upper_limit = float(input("Enter upper limit of integration: ")) sub_interval = int(input("Enter number of sub intervals: ")) # Call trapezoidal() method and get result result = simpson13(lower_limit, upper_limit, sub_interval) print("Integration result by Simpson's 1/3 method is: %0.6f" % (result) ) 33 # Simpson's 1/3 Rule # Define function to integrate def f(x): return 1/(1 + x**2) # Implementing Simpson's 1/3 def simpson13(x0,xn,n): # calculating step size h = (xn - x0) / n # Finding sum integration = f(x0) + f(xn) for i in range(1,n): k = x0 + i*h if i%2 == 0: integration = integration + 2 * f(k) else: integration = integration + 4 * f(k) # Finding final integration value integration = integration * h/3 return integration # Input section lower_limit = float(input("Enter lower limit of integration: ")) upper_limit = float(input("Enter upper limit of integration: ")) sub_interval = int(input("Enter number of sub intervals: ")) # Call trapezoidal() method and get result result = simpson13(lower_limit, upper_limit, sub_interval) print("Integration result by Simpson's 1/3 method is: %0.6f" % (result) ) 34d=None while(True): print("Enter your own data or enter the word "test" for ready data.\n") x=input ('Enter the beginning of the interval (a): ') if x == 'test': x=0 h=4 #krok (Δx) b=12 #granica np. 0>12 #w=(20*x)-(x**2) lub (1+x**3)**(1/2) break h=input ('Enter the size of the integration step (h): ') if h == 'test': x=0 h=4 b=12 break b=input ('Enter the end of the range (b): ') if b == 'test': x=0 h=4 b=12 break d=input ('Give the function pattern: ') if d == 'test': x=0 h=4 b=12 break elif d != -9999.9: break x=float(x) h=float(h) b=float(b) a=float(x) if d == None or d == 'test': def fun(x): return 100-(x**2)/2 #(20*x)-(x**2) else: def fun(x): w = eval(d) return w h=h/2 l=0 #just numeration print('n=',(b-x)/(h*2)) n=int((b-a)/h+1) y = [] #tablica/lista wszystkich y / list of all "y" yf = [] for i in range(n): f=fun(x) print('y%s' %(l),'=',f) y.append(f) l+=1 x+=h print(y,'\n') n1=int(((b-a)/h)/2) l=1 for i in range(n1): nf=(h/3*(y[+0]+4*y[+1]+y[+2])) y=y[2:] print('Całka dla kroku/Integral for a step',l,'=',nf) yf.append(nf) l+=1 print('\nWynik całki/Result of the integral =', sum(yf) ) 68Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.95 43 44 0 45 46 5 1 2 49 0 45 51 1 53 54 55 56 57 58 59 1 0Các Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 1.82784750 401.82784728 1.82784753 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.98 401.82784728 1.82784757 1 5 11.82784761 1.82784762 1Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.2 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.3 1.82784728 1 0Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 1 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.3 1.82784728
1.82784761 1.82784787 1.82784750 401.82784728 42Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 6 lower_limit 1 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.3 1.82784728 1.82784797
1.82784761 lower_limit 001.82784750 401.82784728 42Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 6
1.82784761 lower_limit 091.82784750 401.82784728 42 1 5 11.82784761 lower_limit 181.82784761 lower_limit 201.82784717 lower_limit 22 1 2 1.82784761 68 5 1lower_limit 29 lower_limit 30 1lower_limit 32 lower_limit 33 11.82784713 lower_limit 36 1lower_limit 38 7lower_limit 291.82784710____632 1.82784710 1.82784713 06
JavaScript
1Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.96 lower_limit 50 1 0Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 2 lower_limit 55 1 5 1Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.96 lower_limit 60 1 0Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 64Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 66Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 68Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.2 lower_limit 71
Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.7
Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.9 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 5Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 lower_limit 79Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.2 lower_limit 71
81lower_limit 4
81upper_limit 0
81upper_limit 4Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 5Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 upper_limit 8Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 2 sub_interval 1 1 5Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 upper_limit 08Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 upper_limit 10Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 upper_limit 12Evaluate logx dx within limit 4 to 5.2. First we will divide interval into six equal parts as number of interval should be even. x : 4 4.2 4.4 4.6 4.8 5.0 5.2 logx : 1.38 1.43 1.48 1.52 1.56 1.60 1.64 Now we can calculate approximate value of integral using above formula: = h/3[( 1.38 + 1.64) + 4 * (1.43 + 1.52 + 1.60 ) +2 *(1.48 + 1.56)] = 1.84 Hence the approximation of above integral is 1.827 using Simpson's 1/3 rule.6 upper_limit 14 38 39
Output: 1.827847 Ví dụ quy tắc của Simpson là gì?Quy tắc của Simpson dựa trên thực tế là với bất kỳ ba điểm nào, bạn có thể tìm thấy phương trình của một bậc hai thông qua các điểm đó.Ví dụ: giả sử bạn có điểm (3, 12), (1, 5) và (5, 9).Sau đó, bạn có thể giải quyết hệ phương trình này cho A, B và C, và có được phương trình của bậc hai.given any three points, you can find the equation of a quadratic through those points. For example, let's say you had points (3, 12), (1, 5), and (5, 9). Then you could solve this system of equations for a, b, and c, and get the equation of the quadratic.
Quy tắc Simpson và chi tiết của nó là gì?Quy tắc của Simpson là một phương pháp số để xấp xỉ tích phân của một hàm giữa hai giới hạn, a và b.Nó dựa trên việc biết khu vực dưới parabola hoặc đường cong máy bay.Trong quy tắc này, n là một số chẵn và h = (b - a) / n. Các giá trị y là hàm được đánh giá ở các giá trị x cách đều nhau giữa a và b.a numerical method for approximating the integral of a function between two limits, a and b. It's based on knowing the area under a parabola, or a plane curve. In this rule, N is an even number and h = (b - a) / N. The y values are the function evaluated at equally spaced x values between a and b. |