Numerical Integration
From NavykI
Introduction and use[edit]
Numerical integration helps finding the area under a curve using the curve equation.
This is used in finding the area under the righting arm curve for CE or other classification rules.
Spreadsheets[edit]
In Naval Architecture folder you can find an excel file which contains some subroutines for numerical integration. The file is called NumericalIntegrationOnly.xls.
- Input Data
- Integration interval [a,b] (ie: if you have to find the area under the curve between 30° and 60° interval [a,b] will be [30,60]);
- Integration interval division m represents the number of intervals that will divide interval [a,b].
- Output Data
- Method-> Shows you the method used fol solving the integral;
- I= Is the calculated value for the integral of the function(the actual area we are interested in);
- Dx = Is the step division of the calculation interval.
- Defining the equation
- In this file you will have to input the curve equation obtained on an excel diagram, by adding a polynomial trend line. This is a tricky procedure becouse excel might give errors in the equation generation, so after obtaining the equation you should test it by giving values to "x" and making another diagram to see if it's close to the original curve. Excel will give you the following equation: y = 0.001x3 - 0.3193x2 + 24.412x - 12.412. In the Enter Equation window you will have to input 0.001*x^3 - 0.3193*x^2 + 24.412*x - 12.412 ;
You can calculate with different methods to see the differences. You can also see the differences between different methods in the diagram.