Question: Write two user written functions to perform numerical integration using the trapezoid method and Simpsons One Third Method, which you will name trap_method and Simpsons_1_3

Write two user written functions to perform numerical integration using the trapezoid method and Simpsons One Third Method, which you will name trap_method and Simpsons_1_3 respectively. Your function must accept the following arguments for both functions: an independent vector of numbers and a dependent vector of numbers. Your function file must perform the following tasks:

  1. Check that both vectors are of equal length.
  2. Check that the independent vector in the Simpsons Method has equal spaced intervals.
  3. Compute Write two user written functions to perform numerical integration using the trapezoid numerically using trapezoid method and return the value of the integral.
  4. Compute method and Simpsons One Third Method, which you will name trap_method and numerically using Simpsons One Third method and return the value of the integral.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!