Class Taylor
Taylor series expansions for common functions.
Inheritance
Namespace: ISynergy.Framework.Mathematics.Common
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public static class Taylor : object
Remarks
In mathematics, a Taylor series is a representation of a function as an infinite sum of terms that are calculated from the values of the function's derivatives at a single point.
The concept of a Taylor series was discovered by the Scottish mathematician James Gregory and formally introduced by the English mathematician Brook Taylor in 1715. If the Taylor series is centered at zero, then that series is also called a Maclaurin series, named after the Scottish mathematician Colin Maclaurin, who made extensive use of this special case of Taylor series in the 18th century.
It is common practice to approximate a function by using a finite number of terms of its Taylor series. Taylor's theorem gives quantitative estimates on the error in this approximation. Any finite number of initial terms of the Taylor series of a function is called a Taylor polynomial. The Taylor series of a function is the limit of that function's Taylor polynomials, provided that the limit exists. A function may not be equal to its Taylor series, even if its Taylor series converges at every point. A function that is equal to its Taylor series in an open interval (or a disc in the complex plane) is known as an analytic function in that interval.
References:
- Wikipedia, The Free Encyclopedia. Taylor series. Available at: http://en.wikipedia.org/wiki/Taylor_series
- Anne Fry, Amy Plofker, Sarah-marie Belcastro, Lyle Roelofs. A Set of Appendices on Mathematical Methods for Physics Students: Taylor Series Expansions and Approximations. Available at: http://www.haverford.edu/physics/MathAppendices/Taylor_Series.pdf
Methods
View SourceCos(Double, Int32)
Returns the cosine of a specified angle by evaluating a Taylor series.
Declaration
public static double Cos(double x, int nTerms)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | An angle, measured in radians. |
System.Int32 | nTerms | The number of terms to be evaluated. |
Returns
Type | Description |
---|---|
System.Double | The cosine of the angle |
Cosh(Double, Int32)
Returns the hyperbolic cosine of a specified angle by evaluating a Taylor series.
Declaration
public static double Cosh(double x, int nTerms)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | An angle, measured in radians. |
System.Int32 | nTerms | The number of terms to be evaluated. |
Returns
Type | Description |
---|---|
System.Double | The hyperbolic cosine of the angle |
Exp(Double, Int32)
Returns e raised to the specified power by evaluating a Taylor series.
Declaration
public static double Exp(double d, int nTerms)
Parameters
Type | Name | Description |
---|---|---|
System.Double | d | A number specifying a power. |
System.Int32 | nTerms | The number of terms to be evaluated. |
Returns
Type | Description |
---|---|
System.Double | Euler's constant raised to the specified power |
Sin(Double, Int32)
Returns the sine of a specified angle by evaluating a Taylor series.
Declaration
public static double Sin(double x, int nTerms)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | An angle, measured in radians. |
System.Int32 | nTerms | The number of terms to be evaluated. |
Returns
Type | Description |
---|---|
System.Double | The sine of the angle |
Sinh(Double, Int32)
Returns the hyperbolic sine of a specified angle by evaluating a Taylor series.
Declaration
public static double Sinh(double x, int nTerms)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | An angle, measured in radians. |
System.Int32 | nTerms | The number of terms to be evaluated. |
Returns
Type | Description |
---|---|
System.Double | The hyperbolic sine of the angle |