testquad

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package testquad provides integrals for testing quadrature algorithms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Integral

type Integral struct {
	Name  string
	A, B  float64               // Integration limits
	F     func(float64) float64 // Integrand
	Value float64
}

Integral is a definite integral

∫_a^b f(x)dx

with a known value.

func Constant

func Constant(alpha float64) Integral

Constant returns the integral of a constant function

∫_{-1}^2 alpha dx

func ExpOverX2Plus1

func ExpOverX2Plus1() Integral

ExpOverX2Plus1 returns the integral

∫_0^1 exp(x)/(x*x+1)dx

func Poly

func Poly(degree int) Integral

Poly returns the integral of a polynomial

∫_{-1}^2 x^degree dx

func Sin

func Sin() Integral

Sin returns the integral

∫_0^1 sin(x)dx

func Sqrt

func Sqrt() Integral

Sqrt returns the integral

∫_0^1 sqrt(x)dx

func XExpMinusX

func XExpMinusX() Integral

XExpMinusX returns the integral

∫_0^1 x*exp(-x)dx

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL