⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 diff.texi

📁 用于VC.net的gsl的lib库文件包
💻 TEXI
字号:
@cindex differentiation of functions, numeric
@cindex functions, numerical differentiation
@cindex derivatives, calculating numerically
@cindex numerical derivatives

The functions described in this chapter compute numerical derivatives by
finite differencing.  An adaptive algorithm is used to find the best
choice of finite difference and to estimate the error in the derivative.
These functions are declared in the header file @file{gsl_diff.h}

@menu
* Numerical Differentiation functions::  
* Numerical Differentiation Examples::  
* Numerical Differentiation References::  
@end menu

@node Numerical Differentiation functions
@section Functions

@deftypefun int gsl_diff_central (const gsl_function *@var{f}, double @var{x}, double *@var{result}, double *@var{abserr})
This function computes the numerical derivative of the function @var{f}
at the point @var{x} using an adaptive central difference algorithm.
The derivative is returned in @var{result} and an estimate of its
absolute error is returned in @var{abserr}.  
@end deftypefun


@deftypefun int gsl_diff_forward (const gsl_function *@var{f}, double @var{x}, double *@var{result}, double *@var{abserr})
This function computes the numerical derivative of the function @var{f}
at the point @var{x} using an adaptive forward difference algorithm. The
function is evaluated only at points greater than @var{x} and at @var{x}
itself.  The derivative is returned in @var{result} and an estimate of
its absolute error is returned in @var{abserr}.  This function should be
used if @math{f(x)} has a singularity or is undefined for values less
than @var{x}.
@end deftypefun


@deftypefun int gsl_diff_backward (const gsl_function *@var{f}, double @var{x}, double *@var{result}, double *@var{abserr})
This function computes the numerical derivative of the function @var{f}
at the point @var{x} using an adaptive backward difference
algorithm. The function is evaluated only at points less than @var{x}
and at @var{x} itself.  The derivative is returned in @var{result} and
an estimate of its absolute error is returned in @var{abserr}.  This
function should be used if @math{f(x)} has a singularity or is undefined
for values greater than @var{x}.
@end deftypefun

@node Numerical Differentiation Examples
@section Examples

The following code estimates the derivative of the function 
@c{$f(x) = x^{3/2}$}
@math{f(x) = x^@{3/2@}} 
at @math{x=2} and at @math{x=0}.  The function @math{f(x)} is
undefined for @math{x<0} so the derivative at @math{x=0} is computed
using @code{gsl_diff_forward}.

@example
@verbatiminclude examples/diff.c
@end example
@noindent
Here is the output of the program,

@example
$ ./a.out
@verbatiminclude examples/diff.out
@end example

@node Numerical Differentiation References
@section References and Further Reading
@noindent
The algorithms used by these functions are described in the following book,

@itemize @asis
@item
S.D. Conte and Carl de Boor, @cite{Elementary Numerical Analysis: An
Algorithmic Approach}, McGraw-Hill, 1972.
@end itemize

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -