|
|
double riemann ( double (* const func)(double), const double &a, const double &b,
const int n)
| riemann |
#include <bsp_20_fkt.hpp>
Calculates the integral value.of a 1D-function by the Riemann formula
Parameters:
func | function func(x) to integrate |
a | interval [a,b] |
b | interval [a,b] |
n | number of subintervals of [a,b] |
Returns: integral f(x) from a to b
double derivative ( double (* const func)(double), const double &x, const double &h)
| derivative |
#include <bsp_20_fkt.hpp>
Calculates the first derivative f'(x) of a 1D-function by the finite difference.
Parameters:
func | function func(x) to differentiate |
x | point for evaluation |
h | distance from x in the finite difference formula |
Returns: f'(x)
double riemann ( double (* const func)(double), const double &a, const double &b,
const double eps=1e-4)
| riemann |
#include <bsp_20_fkt.hpp>
Calculates the integral value.of a 1D-function for a given accuracy by the Riemann formula
Parameters:
func | function func(x) to integrate |
a | interval [a,b] |
b | interval [a,b] |
eps | absolute numerical accuracy |
Returns: integral f(x) from a to b
double derivative2 ( double (* const func)(double), const double &x, const double eps=1e-4)
| derivative2 |
#include <bsp_20_fkt.hpp>
Calculates the first derivative f'(x) of a 1D-function with a given accuracy by the finite difference.
Parameters:
func | function func(x) to differentiate |
x | point for evaluation |
eps | absolute numerical accuracy |
Returns: f'(x)
double newton_diff_approx ( double (* const func)(double), const double &a, const double &b, const double eps=1e-4)
| newton_diff_approx |
#include <bsp_20_fkt.hpp>
Solves the equation f(x)=0 in the interval [a,b] with the Newton iteration using the finite difference to approximate the needed first derivative. Calculates the first derivative f'(x) of a 1D-function with a given accuracy by the finite difference.
Parameters:
func | 1D-function func(x) |
a | interval [a,b] |
b | interval [a,b] |
eps | absolute numerical accuracy |
Returns: one root of func(x) in the given interval
Generated by: ghaase on mephisto on Thu May 24 08:44:56 2007, using kdoc 2.0a54. |