全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:2410
推到 Plurk!
推到 Facebook!

不錯的 演算法 網站

 
jackkcg
站務副站長


發表:891
回覆:1050
積分:848
註冊:2002-03-23

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-01-24 06:17:46 IP:61.64.xxx.xxx 未訂閱
http://numeric-tools.hypermart.net/index.htm Numeric-Tools (N-T) Version 1.0 Copyright ?1999 by Masayu Leylia Khodra & Yudi Wibisono. e-mail: masayu@dwidata.co.id or yudiwbs@bdg.centrin.net.id or yudi@dwidata.co.id web site: http:// numeric-tools.hypermart.com Contents Overview License Registering Numeric-Tools Installation Registered Version's Installation Quick Start TIntegral Reference TInterpolation Reference TLinear Reference TNonLinear Reference TDerivative Reference -------------------------------------------------------------------------------- Overview Numeric-Tools (N-T) is a shareware component set for Delphi 1.0, 2.0, 3.0, and 4.0 that is used to solve mathematical problems numerically, include: A TIntegral component for calculating integral (). A TInterpolation component for calculating polynom interpolation. A TLinear component for solving linear equation system. A TNonLinear component for solving non-linear equation. TDerivative component for estimating derivatives. Registered user will get full source code for self-customization if necessary. -------------------------------------------------------------------------------- License N-T is shareware, trial version will work only when IDE is running. Registered user will get full source code. N-T source code or DCU, in whole or in part, modified or unmodified, may not be redistributed for profit or as part of another commercial or shareware software package without express written permission. -------------------------------------------------------------------------------- Registering Numeric-Tools The cost of a single user license is US$20. This license allows distribution of N-T (in compiled form) in any type of application - commercial, shareware, or freeware. The quickest and most convenient way to register N-T is online via credit card at: http://shareit1.element5.com/programs.html?productid=106803&language=English or by secure server at: https://secure.element5.com/register.html?productid=106803&language=English -------------------------------------------------------------------------------- Installation Delphi 2.0 installation: Select Component | Install... on the menu bar. A dialog entitled Install Components will appear. Click the Add... button. On the Add Module dialog, click the Browse button, then locate NumericToolsReg.pas. Delphi 3.0 installation: Select Tools | Environment Options... on the menu bar. Go to Library tab and add the full path of your Numeric Tools directory to the Library Path field if you have not already done so. The Library Path field should then look similar to this: C:\Delphi3\Lib;C:\Delphi3\Bin;C:\Delphi3\Imports;c:\NumericTools\Delphi 3 Click OK. Select File | Open... on the menu bar. Set Files of type to Delphi package source, locate and select the NumericTools_d3.DPK and click Open. A package editor window will appear. Click Compile, then click Install. Delphi 4.0 installation: Select Tools | Environment Options... on the menu bar. Go to Library tab and add the full path of your NumericTools directory to the Library Path. The Library Path field should then look similar to this: $(DELPHI)\Lib;$(DELPHI)\Bin;$(DELPHI)\Imports;c:\NumericTools\Delphi 4 Click OK. Select File | Open... on the menu bar. Set Files of type to Delphi package source, locate and select the NumericTools_d4 package , and click Open. A package editor window will appear. Click Compile, then click Install Delphi 5.0 installation: Select Tools | Environment Options... on the menu bar. Go to Library tab and add the full path of your NumericTools directory to the Library Path. The Library Path field should then look similar to this: $(DELPHI)\Lib;$(DELPHI)\Bin;$(DELPHI)\Imports;$(DELPHI)\Projects\Bpl;c:\NumericTools\Delphi 5 Click OK. Select File | Open... on the menu bar. Set Files of type to Delphi package source, locate and select the NumericTools_d5 package , and click Open. A package editor window will appear. Click Compile, then click Install. Once you have N-T installed, you might want to take a look at the Demo project to see a demonstration of N-T's capabilities. -------------------------------------------------------------------------------- Registered Version's Installation Step 1, Change Delphi's library path to registered version directory. Your library path should then look similar to this: Delphi 3: C:\Delphi3\Lib;C:\Delphi3\Bin;C:\Delphi3\Imports;c:\NumericTools\Registered Delphi 4: $(DELPHI)\Lib;$(DELPHI)\Bin;$(DELPHI)\Imports;c:\NumericTools\Registered Delphi 5: $(DELPHI)\Lib;$(DELPHI)\Bin;$(DELPHI)\Imports;$(DELPHI)\Projects\Bpl;c:\NumericTools\Registered Step 2, Remove component's previous instance Delphi 2: Select Component | Install... on the menu bar. Select NumericToolsReg on installed unit's window, then click Remove Delphi 3,4,5: Select Component | Install Packages... on the menu bar. Select NumericTools ver 1.0 For Delphi .., then click Remove Step 3, Reinstall components. You should use NumericTools\Registered directory for all version of Delphi. -------------------------------------------------------------------------------- Quick Start Note: See the demo's source code to use this component completely. TIntegral This component offers some alternatives to calculate numerical integration. Numerical integration is used not only whenever analytical approaches are either inconvenient or impossible to perform, but also for integrating discrete data, such as those measures in experiment. If we want to compute , we can use one of TIntegral's methods (See TIntegral Reference). For more accuracy, we must consider least error rate in choosing suitable method for a problem and large number of strips. The larger n is used, the more accuracy we get. For example, we want to use Romberg method which has declaration : function Romberg(a,b:double;n:integer;func:TFunc):double. To solve our problem, call Romberg(pi/4,pi/2,50,FSin). FSin is the integrated function which has code : function FSin(x:array of double):double; begin result:=sin(x[0]); end; In this function, we just use x[0] because there's only one variable. We hope we can handle function which has more than one variable in the next version. We can use another method by using the same way, except for Gauss Legendre method which number of points is constant, so you don't need parameter n. TInterpolation This component handles two kind of cases to interpolating polynomial numerically. First, if we have number of points (x,y) and second, if we know approximated function, interval, and distance inter points. For example, we have two problems: 1. Calculate y for x=2.5 if we have number of points below. x y 0 1 1 0.5403 2 -0.4161 3 -0.99 4 -0.6536 2. Calculate value of polynom function for x=2.5 if we know approximated function is f(x)=cos(x) in interval [0,4] and distance inter points is 1. The first problem can be solved using one of TInterpolation's methods (See TInterpolation Reference) except method Approximation. For example, we want to use ForwardNewtonGregory which has declaration : function ForwardNewtonGregory(t:double;x,y:array of double;tot:integer):double. To solve our problem, call ForwardNewtonGregory(2.5,[0,1,2,3,4],[1,0.5403,-0.4161,-0.99,-0.6536],5). We can use another method by using the same way. Method Approximation of Tinterpolation is used for the second problem. Its declaration is: Function Approximation(t:double;func1:TFunc;a,b,dist:double;func2:TInterpolationFunc):double. Call Approximation(2.5,FCos,0,4,1,ForwardNewtonGregory). Parameter "func1:TFunc" is approximated function that is known and has code: function FCos(x:array of double):double; begin result:=cos(x[0]); end; Parameter "func2:TInterpolationFunc" is Tinterpolation's method that will be used, in this case ForwardNewtonGregory. TLinear This component reserves some alternatives to solve linear algebraic equations. If we have problems: 4x1-x2 2x3 3x4=20 -2x2 7x3-4x4=-7 6x3 5x4=4 3x4=6 we can solve this linear algebraic equations by using one of TLinear’s method (See TLinear Reference). For example, we will use InverseMatrix which has declaration: procedure InverseMatrix(a:TMatrik;b:array of double;var x:array of double). Before calling the solution method, we have to transform the problem to matrix in form Ax=B. A is input matrix which contains left coefficients of the equations, and B contains the right side number of the equations. Transformation result formed from the problem is : Finally, call InverseMatrix(input,[20,-7,4,6],x). Input, actual parameter, has TMatrik type. By using transformation result, input is filled as below. var input: TMatrik begin input[0,0]:=4; input[0,1]:=-1; input[0,2]:=2; input[0,3]:=3; input[1,0]:=0; input[1,1]:=-2; input[1,2]:=7; input[1,3]:=-4; input[2,0]:=0; input[2,1]:=0; input[2,2]:=6; input[2,3]:=5; input[3,0]:=0; input[3,1]:=0; input[3,2]:=0; input[3,3]:=3; // ...... end; You can use up to 30 variabels (you can change source code if you need more variables). Beside input, we have x, actual parameter passing by reference and declared: x:array[0..3] of double; After the solution method is called, x contains the solution of our problem. TNonLinear: This component offers some alternatives to solve non-linear equation numerically. If we want to compute x that make exp(x)-3*sqr(x)=0, we can use one of TNonLinear's methods (See TNonLinear Reference). There’s two way to solve this equation, by using solution interval or initial value of solution. First, we will use Bolzano rule, for example, which use interval way and has complete declaration: function Bolzano(a,b:double;func:TFunc):double, by calling Bolzano(-1,1,FCoba). Fcoba's code is: function FCoba(x:array of double):double; begin result:=exp(x[0])-3*sqr(x[0]); end; The second way, using initial value, we will use FixedPoint which has declaration: procedure FixedPoint(var x:double;func:TFunc), by calling FixedPoint(akar,FLelaran). Parameter akar will be the result of our problem. Here, we can see that although we will solve the same problem, the function actual parameter is Flelaran, not Fcoba. In using initial value solution, we need to transform f(x)=0 to x=g(x) form. The transformation process and code of Flelaran are: exp(x)-3*sqr(x) = 0 exp(x) = 3*sqr(x) sqr(x) = exp(x)/3 x = sqrt(exp(x)/3) function FLelaran(x:array of double):double; begin result:=sqrt(exp(x[0])/3); end; TDerivative: This component offer some alternatives to estimate derivatives. There are two kinds of cases handling by this derivative component. First, if we have number of points (x,y) and second, if we know derived function and distance of adjacent points. If we have equation f(x)=x4 x3 x2 and want to know f’(2.5), f’’(2.5), f’’’(2.5), f’’’’(2.5), we will use TDerivative's component methods (See TDerivative Reference). For example, we will use Seven-Point Central Difference Approximation method for each order. First order: FirstCentral7Points2(2.5,FTes,0.125) Second order: SecondCentral7Points2(2.5,FTes,0.125) Third order: SecondCentral7Points2(2.5,FTes,0.125) Fourth order: SecondCentral7Points2(2.5,FTes,0.125) Code of function FTes is below. function FTes(x:array of double):double; begin result:=IntPower(x[0],4) IntPower(x[0],3) sqr(x[0]); end; -------------------------------------------------------------------------------- Reference TIntegral Reference Description: Component to solve numerical integration by using one of these methods: 1. Strip Method : - Repeated Trapezium Rule (E=O(h3)), also categorized in Newton-Cotes Rule - Repeated Middle Point Rule (E=O(h2)) 2. Newton-Cotes Rule : - Repeated 1/3 Simpson Rule (E=O(h5)) - Repeated 3/8 Simpson Rule (E=O(h5)) 3. Romberg method (E=O(hn)), n is number of strips 4. Gauss-Legendre rules: 2,3,4,5,6,n points Public Methods: function Trapezium(a,b:double;n:integer;func:TFunc):double; returns with n strips by using "Repeated Trapezium Rule" (E=O(h3)). function MiddlePoint(a,b:double;n:integer;func:TFunc):double; returns with n strips by using "Repeated Middle Point Rule" (E=O(h2)). function Simpson1_3(a,b:double;n:integer;func:TFunc):double; returns with n strips by using "Repeated 1/3 Simpson Rule" (E=O(h5)). n mod 2 = 0 (n MUST an even number). If n is odd number then error dialog is shown. function Simpson3_8(a,b:double;n:integer;func:TFunc):double; returns with n strips by using "Repeated 3/8 Simpson Rule" (E=O(h5)). n mod 3 = 0. If (n mod 3)<>0 then error dialog is shown. function Romberg(a,b:double;n:integer;func:TFunc):double; returns with n strips by using "Romberg method" (E=O(hn)). n: 1, 2, 4, 8, 16, 32, 64, ... 1024; n MAX 1024. function GL2Points(a,b:double;func:TFunc):double; returns by "Gauss-Legendre two-point rule". function GL3Points(a,b:double;func:TFunc):double; returns by "Gauss-Legendre three-point rule". function GL4Points(a,b:double;func:TFunc):double; returns by "Gauss-Legendre four-point rule". function GL5Points(a,b:double;func:TFunc):double; returns by "Gauss-Legendre five-point rule". function GL6Points(a,b:double;func:TFunc):double; returns by "Gauss-Legendre six-point rule". See the demo application source code for an example of how to use this. -------------------------------------------------------------------------------- TInterpolation Reference Description: Component to interpolating polynomial numericaly. Case 1 : If some points (x,y) is known, solve by using : 1. Lagrangian polynomials 2. Newton polynomials 3. Newton Gregory polynomials/Difference methods: - Forward Newton Gregory/Newton forward differences - Backward Newton Gregory/Newton backward differences Case 2 : If a approximated function, interval, and distance of points is known, solve by using method Approximation Key Methods: function Lagrange(t:double;x,y:array of double;tot:integer):double; returns p(t), that is Lagrange's polynom having power n. x,y : data points; Total elemen of array x&y MUST BE EQUAL. tot:number of points function Newton(t:double;x,y:array of double;tot:integer):double; returns p(t), that is Newton's polynom having power n. x,y : data points; Total elemen of array x&y MUST BE EQUAL. tot:number of points. Constraint : MAXIMUM total variabel is MAXVAR function ForwardNewtonGregory(t:double;x,y:array of double;tot:integer):double; returns p(t), that is Forward Newton Gregory's polynom having power n. x,y : data points; Total elemen of array x&y MUST BE EQUAL. tot:number of points. Constraint : MAXIMUM total variabel is MAXVAR function BackwardNewtonGregory(t:double;x,y:array of double;tot:integer):double; returns p(t), that is Backward Newton Gregory's polynom having power n. x,y : data points; Total elemen of array x&y MUST BE EQUAL. tot:number of points. Constraint : MAXIMUM total variabel is MAXVAR function Approximation(t:double;func1:TFunc;a,b,dist:double;func2:TInterpolationFunc):double; returns p(t), that is IntFunc's polynom having power n. func: approximated function; a,b: low/high limit for interval; dist:distance of points. func2: interpolation method that will be used. See the demo application source code for an example of how to use this. -------------------------------------------------------------------------------- TLinear Reference Description: Component to solve sets of linear algebraic equations of the form: a11x1 a12x2 ... a1nxn=b1 a21x1 a22x2 ... a2nxn=b2 . . . an1x1 an2x2 ... annxn=bn commonly written Ax=b, where A is a matrix, and x and b are vectors,: Methods : 1. Gauss elimination : PivotingGauss, NaiveGauss 2. Gauss Jordan elimination : PivotingGaussJordan, NaiveGaussJordan 3. Inverse Matrix 4. LU Factorisation 5. Gauss Seidel Iteration 6. Jacobi Iteration Constraints : not support scaling to handle system having big difference of coefficient inter variables. Key Methods: procedure PivotingGauss(a:TMatrik;b:array of double;var x:array of double); x is solution of linear equation system, included if pivot a[p,p]<>0 procedure NaiveGauss(a:TMatrik;b:array of double;var x:array of double); x is solution of linear equation system, but if pivot a[p,p]<>0 then exception dialog is raised procedure PivotingGaussJordan(a:TMatrik;b:array of double;var x:array of double); x is solution of linear equation system, included if pivot a[p,p]<>0 procedure NaiveGaussJordan(a:TMatrik;b:array of double;var x:array of double); x is solution of linear equation system, but if pivot a[p,p]<>0 then exception dialog is raised procedure InverseMatrix(a:TMatrik;b:array of double;var x:array of double); x is solution of linear equation system procedure LU(a:TMatrik;b:array of double;var x:array of double); x is solution of linear equation system procedure GaussSeidel(a:TMatrik;b:array of double;var x:array of double); On the initial state, x has initial value. Finally, x is solution of linear equation system. procedure Jacobi(a:TMatrik;b:array of double;var x:array of double); On the initial state, x has initial value. Finally, x is solution of linear equation system. -------------------------------------------------------------------------------- TNonLinear Reference Description: Component to solve non linear equation numericaly. It calculates x if f(x)=0 using: Bolzano, also known as method of bisection Regula Falsi, also known as false position method Fixed Point Newton Raphson Secant If more than one x’s value make equation f(x)=0 true, the solution just has one x’s value. It depends on interval limits or initial value given. Key Methods: function Bolzano(a,b:double;func:TFunc):double; returns solution of non linear equation (func=0) by using Bolzano method, or also known as method of Bisection. a,b: interval limit function RegulaFalsi(a,b:double;func:TFunc):double;//or modified false position method returns solution of non linear equation (func=0) by using modified false position method (Regula Falsi in Latin). a,b: interval limit procedure FixedPoint(var x:double;func:TFunc); returns solution of non linear equation (f(x)=0) by using Fixed Point method. x: initial value; func:another form of f(x) in x=func(x). procedure NewtonRaphson(var x:double;func,derivativeFunc:TFunc); returns solution of non linear equation : f(x)=0 by using Newton Raphson method. x: initial value; func:another form of f(x) in x=func(x). derivativeFunc: derivative of func function Secant(x0,x1:double;func:TFunc):double; returns solution of non linear equation : f(x)=0 by using Secant method. x0,x1: initial value; func:another form of f(x) in x=func(x) Key Properties: property MaximumIteration:integer default 10000; Maximum number of iterations done to achieve convergence. If number of iterations is more than MaximumIteration, there is no solution for problem input. property MinimumIntervalWidth:double; Minimum width of interval allowed. property MinimumDistance:double; Minimum distance of interval (f(high(interval))-f(low(interval))). -------------------------------------------------------------------------------- TDerivative Reference Description: Component to solve numerical differentiation involving estimating derivatives. Case 1 : if points (x,y) is known; t=x[index]; index<>high(x) Case 2 : if derived function (func) and distance inter x (h) is known Methods : 1. Forward difference approximation: 2,3,4,5 points 2. Backward difference approximation: 2,3,4,5 points 3. Central difference approximation: 3,5,7 points Key Methods: function FirstForward2Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Two-Point Forward Difference", E=O(h). f'(t)=(f1-f0)/h. function FirstForward3Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Three-Point Forward Difference", E=O(h^2). f'(t)=(-3f0 4f1-f2)/2h function FirstForward4Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Four-Point Forward Difference", E=O(h^3). f'(t)=(-11f0 18f1-9f2 2f3)/6h. function FirstForward5Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Five-Point Forward Difference", E=O(h^4). f'(t)=(-25f0 48f1-36f2 16f3-3f4)/12h. function FirstCentral3Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Three-Point Central Difference", E=O(h^2). f'(t)=(f1-f[-1])/2h. function FirstCentral5Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Five-Point Central Difference", E=O(h^4). f'(t)=(-f2 8f1-8f[-1] f[-2])/12h. function FirstCentral7Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Seven-Point Central Difference", E=O(h^6). f'(t)=(f3-9f2 45f1-45f[-1] 9f[-2]-f[-3])/60h. function FirstBackward2Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Two-Point Backward Difference", E=O(h). f'(t)=(f0-f[-1])/h. function FirstBackward3Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Three-Point Backward Difference", E=O(h^2). f'(t)=(3f0-4f[-1] f[-2])/2h. function FirstBackward4Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Four-Point Backward Difference", E=O(h^3). f'(t)=(11f0-18f[-1] 9f[-2]-2f[-3])/6h. function FirstBackward5Points1(t:double;x,y:array of double):double; returns first derivative of t by using "Five-Point Backward Difference", E=O(h^4). f'(t)=(25f0-48f[-1] 36f[-2]-16f[-3] 3f[-4])/12h. function FirstForward2Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Two-Point Forward Difference", E=O(h). f'(t)=(f1-f0)/h. function FirstForward3Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Three-Point Forward Difference", E=O(h^2). f'(t)=(-3f0 4f1-f2)/2h. function FirstForward4Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Four-Point Forward Difference", E=O(h^3). f'(t)=(-11f0 18f1-9f2 2f3)/6h function FirstForward5Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Five-Point Forward Difference", E=O(h^4). f'(t)=(-25f0 48f1-36f2 16f3-3f4)/12h. function FirstCentral3Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Three-Point Central Difference", E=O(h^2). f'(t)=(f1-f[-1])/2h. function FirstCentral5Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Five-Point Central Difference", E=O(h^4). f'(t)=(-f2 8f1-8f[-1] f[-2])/12h. function FirstCentral7Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Seven-Point Central Difference", E=O(h^6). f'(t)=(f3-9f2 45f1-45f[-1] 9f[-2]-f[-3])/60h function FirstBackward2Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Two-Point Backward Difference", E=O(h). f'(t)=(f0-f[-1])/h. function FirstBackward3Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Three-Point Backward Difference", E=O(h^2). f'(t)=(3f0-4f[-1] f[-2])/2h. function FirstBackward4Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Four-Point Backward Difference", E=O(h^3). f'(t)=(11f0-18f[-1] 9f[-2]-2f[-3])/6h. function FirstBackward5Points2(t:double;func:TFunc;h:double):double; returns first derivative of t by using "Five-Point Backward Difference", E=O(h^4). f'(t)=(25f0-48f[-1] 36f[-2]-16f[-3] 3f[-4])/12h. function SecondForward3Points1(t:double;x,y:array of double):double; returns second derivative of t by using "Three-Point Forward Difference", E=O(h). f''(t)=(f2-2f1 f0)/h^2. function SecondForward4Points1(t:double;x,y:array of double):double; returns second derivative of t by using "Four-Point Forward Difference", E=O(h^2). f''(t)=(-f3 4f2-5f1 2f0)/h^2. function SecondForward5Points1(t:double;x,y:array of double):double; returns second derivative of t by using "Five-Point Forward Difference", E=O(h^3). f''(t)=(11f4-56f3 114f2-104f1 35f0)/12h^2. function SecondCentral3Points1(t:double;x,y:array of double):double; returns second derivative of t by using "Three-Point Central Difference", E=O(h^2). f''(t)=(f1-2f0 f[-1])/h^2. function SecondCentral5Points1(t:double;x,y:array of double):double; returns second derivative of t by using "Five-Point Central Difference", E=O(h^4). f''(t)=(-f2 16f1-30f0 16f[-1]-f[-2])/12h^2. function SecondCentral7Points1(t:double;x,y:array of double):double; returns second derivative of t by using "Seven-Point Central Difference", E=O(h^6). f''(t)=(2f3-27f2 270f1-490f0 270f[-1]-27f[-2] 2f[-3])/180h^2. function SecondBackward3Points1(t:double;x,y:array of double):double; returns second derivative of t by using "Three-Point Backward Difference", E=O(h). f''(t)=(f[-2]-2f[-1] f0)/h^2. function SecondBackward4Points1(t:double;x,y:array of double):double; returns second derivative of t by using "Four-Point Backward Difference", E=O(h^2). f''(t)=(f[-3] 4f[-2]-5f[-1] 2f0)/h^2. function SecondBackward5Points1(t:double;x,y:array of double):double; returns second derivative of t by using "Five-Point Backward Difference", E=O(h^3). f''(t)=(11f[-4]-56f[-3] 114f[-2]-104f[-1] 35f0)/12h^2. function SecondForward3Points2(t:double;func:TFunc;h:double):double; returns second derivative of t by using "Three-Point Forward Difference", E=O(h). f''(t)=(f2-2f1 f0)/h^2. function SecondForward4Points2(t:double;func:TFunc;h:double):double; returns second derivative of t by using "Four-Point Forward Difference", E=O(h^2). f''(t)=(-f3 4f2-5f1 2f0)/h^2 function SecondForward5Points2(t:double;func:TFunc;h:double):double; returns second derivative of t by using "Five-Point Forward Difference", E=O(h^3). f''(t)=(11f4-56f3 114f2-104f1 35f0)/12h^2. function SecondCentral3Points2(t:double;func:TFunc;h:double):double; returns second derivative of t by using "Three-Point Central Difference", E=O(h^2). f''(t)=(f1-2f0 f[-1])/h^2. function SecondCentral5Points2(t:double;func:TFunc;h:double):double; returns second derivative of t by using "Five-Point Central Difference", E=O(h^4). f''(t)=(-f2 16f1-30f0 16f[-1]-f[-2])/12h^2. function SecondCentral7Points2(t:double;func:TFunc;h:double):double; returns second derivative of t by using "Seven-Point Central Difference", E=O(h^6). f''(t)=(2f3-27f2 270f1-490f0 270f[-1]-27f[-2] 2f[-3])/180h^2. function SecondBackward3Points2(t:double;func:TFunc;h:double):double; returns second derivative of t by using "Three-Point Backward Difference", E=O(h). f''(t)=(f[-2]-2f[-1] f0)/h^2. function SecondBackward4Points2(t:double;func:TFunc;h:double):double; returns second derivative of t by using "Four-Point Backward Difference", E=O(h^2). f''(t)=(f[-3] 4f[-2]-5f[-1] 2f0)/h^2. function SecondBackward5Points2(t:double;func:TFunc;h:double):double; returns second derivative of t by using "Five-Point Backward Difference", E=O(h^3). f''(t)=(11f[-4]-56f[-3] 114f[-2]-104f[-1] 35f0)/12h^2. function ThirdForward4Points1(t:double;x,y:array of double):double; returns third derivative of t by using "Four-Point Forward Difference", E=O(h). f'''(t)=(f3-3f2 3f1-f0)/h^3. function ThirdForward5Points1(t:double;x,y:array of double):double; returns third derivative of t by using "Five-Point Forward Difference", E=O(h^2). f'''(t)=(-3f4 14f3-24f2 18f1-5f0)/2h^3. function ThirdCentral5Points1(t:double;x,y:array of double):double; returns third derivative of t by using "Five-Point Central Difference", E=O(h^2). f'''(t)=(f2-2f1 2f[-1]-f[-2])/2h^3. function ThirdCentral7Points1(t:double;x,y:array of double):double; returns third derivative of t by using "Seven-Point Central Difference", E=O(h^4). f'''(t)=(-f3 8f2-13f1 13f[-1]-8f[-2] f[-3])/8h^3. function ThirdBackward4Points1(t:double;x,y:array of double):double; returns Third derivative of t by using "Four-Point Backward Difference", E=O(h). f''(t)=(-f[-3] 3f[-2]-3f[-1] f0)/h^3. function ThirdBackward5Points1(t:double;x,y:array of double):double; returns Third derivative of t by using "Five-Point Backward Difference", E=O(h^2). f''(t)=(3f[-4]-14f[-3] 24f[-2]-18f[-1] 5f0)/2h^3. function ThirdForward4Points2(t:double;func:TFunc;h:double):double; returns third derivative of t by using "Four-Point Forward Difference", E=O(h). f'''(t)=(f3-3f2 3f1-f0)/h^3. function ThirdForward5Points2(t:double;func:TFunc;h:double):double; returns third derivative of t by using "Five-Point Forward Difference", E=O(h^2). f'''(t)=(-3f4 14f3-24f2 18f1-5f0)/2h^3. function ThirdCentral5Points2(t:double;func:TFunc;h:double):double; returns third derivative of t by using "Five-Point Central Difference", E=O(h^2). f'''(t)=(f2-2f1 2f[-1]-f[-2])/2h^3. function ThirdCentral7Points2(t:double;func:TFunc;h:double):double; returns third derivative of t by using "Seven-Point Central Difference", E=O(h^4). f'''(t)=(-f3 8f2-13f1 13f[-1]-8f[-2] f[-3])/8h^3. function ThirdBackward4Points2(t:double;func:TFunc;h:double):double; returns Third derivative of t by using "Four-Point Backward Difference", E=O(h). f''(t)=(-f[-3] 3f[-2]-3f[-1] f0)/h^3. function ThirdBackward5Points2(t:double;func:TFunc;h:double):double; returns Third derivative of t by using "Five-Point Backward Difference", E=O(h^2). f''(t)=(3f[-4]-14f[-3] 24f[-2]-18f[-1] 5f0)/2h^3. function FourthForward5Points1(t:double;x,y:array of double):double; returns fourth derivative of t by using "Five-Point Forward Difference", E=O(h). f''''(t)=(f4-4f3 6f2-4f1 f0)/h^4. function FourthCentral5Points1(t:double;x,y:array of double):double; returns fourth derivative of t by using "Five-Point Central Difference", E=O(h^2). f''''(t)=(f2-4f1 6f0-4f[-1] f[-2])/h^4. function FourthCentral7Points1(t:double;x,y:array of double):double; returns fourth derivative of t by using "Seven-Point Central Difference", E=O(h^4). f''''(t)=(-f3 12f2-39f1 56f0-39f[-1] 12f[-2]-f[-3])/6h^4. function FourthBackward5Points1(t:double;x,y:array of double):double; returns fourth derivative of t by using "Five-Point Backward Difference", E=O(h). f''(t)=(f[-4]-4f[-3] 6f[-2]-4f[-1] f0)/h^4. function FourthForward5Points2(t:double;func:TFunc;h:double):double; returns fourth derivative of t by using "Five-Point Forward Difference", E=O(h). f''''(t)=(f4-4f3 6f2-4f1 f0)/h^4. function FourthCentral5Points2(t:double;func:TFunc;h:double):double; returns fourth derivative of t by using "Five-Point Central Difference", E=O(h^2). f''''(t)=(f2-4f1 6f0-4f[-1] f[-2])/h^4. function FourthCentral7Points2(t:double;func:TFunc;h:double):double; returns fourth derivative of t by using "Seven-Point Central Difference", E=O(h^4). f''''(t)=(-f3 12f2-39f1 56f0-39f[-1] 12f[-2]-f[-3])/6h^4. function FourthBackward5Points2(t:double;func:TFunc;h:double):double; returns fourth derivative of t by using "Five-Point Backward Difference", E=O(h). f''(t)=(f[-4]-4f[-3] 6f[-2]-4f[-1] f0)/h^4. ********************************************************* 哈哈&兵燹 最會的2大絕招 這個不會與那個也不會 哈哈哈 粉好 Delphi K.Top的K.Top分兩個字解釋Top代表尖端的意思,希望本討論區能提供Delphi的尖端新知 K.表Knowlege 知識,就是本站的標語:Open our mind to make knowledge together! 希望能大家敞開心胸,將知識寶庫結合一起
------
**********************************************************
哈哈&兵燹
最會的2大絕招 這個不會與那個也不會 哈哈哈 粉好

Delphi K.Top的K.Top分兩個字解釋Top代表尖端的意思,希望本討論區能提供Delphi的尖端新知
K.表Knowlege 知識,就是本站的標語:Open our mind
系統時間:2024-07-26 4:33:20
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!