(2002-01-25) What are some of the common and "special" numerical functions?
Well, people have been inventing special functionsad nauseam. The list is quite literally endless, but we may attempt the beginning of a classificationfor those functions which are common enough to have a universally accepted name. Let's start with the truly elementary functions:
Polynomial functions:The value y is obtained from the variable x using only a finite number of additions and/or multiplications involving given constants. The simplest such functions are the null function (zero value,infinite degree) and the other constant functions (degree 0; y = a 0). Next arelinear functions (degree 1; y = ax+b), quadratic functions (degree 2;y = ax+bx+c), cubic functions,quartic (orbiquadratic),quintic,sextic (rarelyhexic),etc. Specificqualifiersare virtually unused for polynomials beyond degree 6:degree 7 isheptic rather thanseptic [sic!] degree 8 isoctic, 9 isnonic, 10 isdecic. We're told that some people have called degree 100 hectic.
Rational functions:The functions you obtain when division is allowed as well. A rational function is the quotient of two polynomials. The simplest of these is thereciprocal function y = 1/x.
Algebraic functions: The term applies to any function for which the value y andthe variable x arealgebraically related, which is to say that there's a two-variablepolynomial P such thatP(x,y) = 0. Only a few of these functions have an explicit name and/or symbol. The most notable is thesquare root function y = x. Like the square root function, most algebraic functions can only be defined continuouslyover the complex plane asmultivalued functions. Alternately, such functions maybe construed asunivalued (ordinary) functions of a variable whose domain isa so-calledRiemann surface for which several points may have the same projectionon the complex plane.
Elementary transcendental functions:The simplest of these is y = ex,the (natural)exponential functiony = exp(x), a function which is equal to itsown derivative (all other such functions are proportional to it). The exponential function is defined (univalued) over the entire complex plane,and so are the other transcendental functions which may be defined directly in terms of it,includingtrigonometric functions (circular functions) or hyperbolic functions like: y = sin(x) = ½ (exp(ix) - exp(-ix)) y = sh(x) = ½ (exp(x) - exp(-x)) Modern usage is to consider only the 3 preferred trigonometric functions(sine, cosine and tangent)whereas their 3 reciprocals (cosecant, secant and cotangent) are being deprecated. A similar remark applies to the 3 preferred hyperbolic functions (sh, ch, th), whosereciprocals are rarely used, if ever.
Also classified as elementary transcendental functions are the inverses ofthe above, starting with the (natural)logarithm function,y = ln(x),which is the inverse of the exponential (x = exp(y)). If continuity is required in the realm of complex numbers,the logarithm function may only be defined as amultivalued function. The same thing is true of theinverse trigonometric functions (arcsin, arccos, arctg)or theinverse hyperbolic functions, which complete the modern list ofelementary functions.
Important named combinationsof elementary functions. One example is the Gudermannian orhyperbolic amplitude,named after the German mathematicianChristophGudermann (1798-1852):
gd(x) = 2 arctg(ex) /2 = 2 arctg( th x/2 )
The fact that gd is odd is clear from the latter expression (but obfuscated by the former one). The derivative of gd(x) is 1/ch(x), and theinverse of the Gudermannian is a primitive of 1/cos(x)... In aMercator conformal map,the distance to the equator of a point at latitude gd(u) is proportionalto u.
sinc(x) = sin(x)/x is the so-calledsine cardinal orsampling function (which arises to express Fourier transtorms ofrectangular functions).
Gamma function. Arguably, the most common special function,or the least "special" of them. The other transcendental functions listed below are called "special" becauseyou could conceivably avoidsome of them by staying away from manyspecialized mathematical topics. On the other hand, the Gamma function y = (x)is most difficult toavoid.
Elliptic functions and elliptic integrals.
Exponential integral (Ei).
Logarithmic integral (li): li x = Ei (ln x) Euler's older version is capitalized: Li x = li x - li 2
Airy's functions (Ai & Bi). Independent solutions of y'' = x y
Riemann's Zeta function. Asimple function with arich structure,best known for itsnontrivial zeroes (itstrivial zeroes are the evennegative integers). Infinitely many of these have been shown (byG.H. Hardy)to have areal part of ½,and billions of them have actually been found on thatcritical line,but it's still not known whetherall of them are there,asBernhard Riemann(1826-1866) first conjectured in 1859. The far-reaching implications of this statement,known as theRiemann Hypothesis,make it the most important unproved mathematical proposition of our times.
... ...
As advertised, the list is endless...
(J. S. of Canada.2000-10-15) How do you solve these equations to exact values for x?
1) If ln(x-2)-3 = ln(x+1) then ln((x-2)/(x+1)) = ln(e3)so we must have(x-2) = (x+1)e3 and x can only be equal to (2+e3)/(1-e3). Now, however, this value of x happens to be negative(it's about -1.157) which makes it unacceptable,since both (x-2) and (x+1) should be positive(or else you can't take their logarithm). Therefore, the original equation does not have any solutions at all!
2) Rewrite sin(2x)sin(x)+cos(x) = 0 as 2 cos(x)sin(x)sin(x) + cos(x) = 0,or cos(x)[2sin2(x)+1] = 0. As the second factor cannot be zero, this equation boils down to cos(x) = 0, which has infinitely many solutions of the formx = (k+½), where k is any integer (positive or not).
( John of Garland, TX.2000-11-19) How are the values of trigonometric functions calculated? For example, how do we determine that sin(32°) = 0.52991?
Basically, the following relation is used: sin(x) = x- x/6+ x/120- x/5040+ x/362880 - ...+ (-1)x/(2k+1)! + ...
To use this for actual computations,you've got to remember that x should be expressed in radians(1° = /180 rad).In your example, x = 32 ° = 0.558505360638... rad.The series "converges" very rapidly:
After 1 term, S = 0.55850536063818After 2 terms, S = 0.52946976180816After 3 terms, S = 0.52992261296708After 4 terms, S = 0.52991924970365After 5 terms, S = 0.52991926427444After 6 terms, S = 0.52991926423312After 7 terms, S = 0.52991926423332(no change at this precision after this)
Your computer and/or calculator uses this along with a technique calledeconomization(the most popular of which is theChebyshev economization)which allows a polynomial of high degree (or any reasonable function)to be very well approximated by a polynomial of lower degree.
In the case of the sine function, the convergence of the above series is so goodthateconomization only saves you a couple of multiplications for a given precision.In some other cases (like the atan function), it is quite indispensable.
Footnote: aboutatan: Theatan function has a niceChebyshev expansion which allows one to bypass the intermediatesstep of a so-calledTaylor expansion like the above.This is rather fortunate because the convergence ofatan'sTaylor expansion is quite lousy when x is close to 1.Modernatan routines use an economized polynomial for x between 0 and 1,and reduce the computation ofatan(x) to that ofatan(1/x)when x is above 1. See the following article for more details...
(2000-11-19)
Over a finite interval, it is always possible to approximate a continuous functionwith arbitrary precision by a polynomial of sufficiently high degree. In some cases [one example is thesine function in theprevious article]truncation of the function's Taylor series works well enough. In other cases, the Taylor series may either converge too slowly or not at all (the function may not be analytic or, if itis analytic, the radius ofconvergence of its Taylor series may be too small to cover comfortablythe desired interval).
If a good polynomial approximation of the continuous real function f (x) is desired over a finite interval, the following approach may be used andis in fact the most popular one. We may considerwithout loss of generalitythat the desired range of x is[-1,1](if it's not, a linear change of variable will make it so). Thus, a new variable (whose range is [0,] ) can be introduced via the relation cos = x. Either variable is a decreasing function of the other.
The fundamental remark is that cos(n) is a polynomialfunction of cos().In fact, either of the following relations defines a polynomial of degree nknown as theChebyshev polynomial[of the first kind] of degree n.The symbol "T" is conventionally used for these becauseof alternate transliterations from Russian, likeTchebychefforTchebychev which are a better match for the Russian pronounciation (the spellings "Chebychev" and "Tchebyshev" also appear).
The trigonometric formula cos(n+2)x = 2 cos x cos(n+1)x - cos nx translates into a simple recurrence relation which makes Chebyshev polynomialsvery easy to tabulate: Tn+2(x) = 2x Tn+1(x) Tn(x)
T0(x)
=
1
T1(x)
=
x
T2(x)
=
-1
+2x2
T3(x)
=
-3x
+4x3
T4(x)
=
1
-8x2
+8x4
T5(x)
=
5x
-20x3
+16x5
T6(x)
=
-1
+18x2
-48x4
+32x6
T7(x)
=
-7x
+56x3
-112x5
+64x7
T8(x)
=
1
-32x2
+160x4
-256x6
+128x8
We must remark prominently that, if y2 = x2-1 (yneed not be real ), then:
Tn(x) = [ (x+y)n + (x-y)n ] / 2
This is a consequence of de Moivre's relation(with x = cos andy = i sin ):
[ cos + i sin ] n = exp(i ) n = exp(i n) = cos n + i sin n
Now, f (cos ) is clearly anevenfunction of which iscontinuous when f is. As such, it has a tameFourier expansion which contains only cosines andtranslates into the so-calledChebyshev-Fourier expansion of f(x):
f (cos ) =co/2 +
cncos(n) therefore: f (x) = co/2 +
cnTn(x)
The last expression is a series which is always convergent. For "infinitely smooth" functions, it converges exponentially fast(as a function of n, the coefficient has to be smaller than the reciprocal ofa polynomial of degree k+1, forany k,or else the Fourier series of the k-th derivative of f (cos ) would not converge). This is much more than what can be said about aTaylor power series... A truncated Fourier-Chebyshev series is thus expected to givea much better approximation than a Taylor series truncated to the same order.
What is known asChebyshev economization is often limited to thefollowingdubious technique: Take a good polynomial approximantwith many terms (possibly coming from a Taylor expansion) and express itas a linear combination of Chebyshev polynomials(whose coefficients may be obtained from theinversion formula below).This expression may be truncated at some low order toobtain a good approximation as a polynomial of lower degree.
Abetter approach, whenever possible, is to compute theexactChebyshev expansion of the target function and to truncatethatin order to obtain a good approximation by a polynomial of low degree... The followinginversion formula can be used for to obtain theChebychev expansion [watch out for the explicit halving of c0 ] of an analytic function given by its Taylor expansion:
f (x) =
an x n = ½ co +
cnTn(x)
cn = 2
p=0
2p+n p
a 2p+n
22p+n
x
=
T1(x)
2 x2
=
1
+ T2(x)
4 x3
=
3 T1(x)
+ T3(x)
8 x4
=
3
+ 4 T2(x)
+ T4(x)
16 x5
=
10 T1(x)
+ 5 T3(x)
+ T5(x)
32 x6
=
10
+ 15 T2(x)
+ 6 T4(x)
+ T6(x)
2 n-1 x n =
(n-1)/2
k=0
n k
Tn-2k(x) +
½ C(n, n/2) if n is even. 0 if n is odd.
The abovecomplete inversion formula (infinite sum)is occasionally handy, but one may alsoalways obtain the coefficients cn via theEuler formulas, which give:
cn =
2
1 -1
f (x) Tn(x)
dx =
2
0
f (cos ) cos(n) d
1-x2
In at least one (important) case, we may even obtaintheChebyshev expansion directly by algebraic methods... Consider thearctangent function, which gives the anglein radians between-/2 and /2whosetangent equals its given [real] argument. That function is variously abbreviatedArctg (Int'l/European),arctan (US),atg oratan (computerese).The following relation is true for small enough arguments. [It's truemodulo for unrestricted arguments,because of the formula giving tg(a+b) as(u+v)/(1-uv) ifu and v are the respective tangents of a and b.] This may thus be considered analgebraic relationbetweenformal power series:
Arctg( (u+v)/(1-uv) ) = Arctg(u) + Arctg(v)
With this in mind, we may as well use this formal identity for the complex numbersu = k [x+i(1-x)]andv = k [x-i(1-x)], so that 2k Tn(x) =(u + v). This turns the RHS of the above identity directly into a Chebyshev expansion where thecoefficient cn is simply the coefficient of the arctangent power seriesmultiplied by 2k. On the other hand, the LHS becomesArctg(2kx/(1-k)). If we let k be2-1,this boils down toArctg(x) and we have:
Arctg(x)
= n [2(2-1)2n+1 (-1)n / (2n+1)] T2n+1(x)
= 2(2-1) n [(22-3)n / (2n+1)] T2n+1(x)
That's [almost] all there is to it:We got the Chebyshev expansion at very little cost!How good is the convergence of this series?Well, we may first remark that it converges even if the magnitude ofx exceeds unity.More precisely, when x is larger than 1, Tn(x) is asymptoticallyequal to half the n-th power of x+(x-1),a quantity which equals the reciprocal of2-1when x is 2.Therefore, the series converges if and only if the magnitude of x isless than (or equal to) 2.
More importantly, when the magnitude of x is not more than 1,a partial sum approximates the whole thing with an error smaller than the coefficientof the first discarded term.Suppose we want to use this to find a polynomial approximant of the arctangent functionat a precision of about 13 significant digits(we need it only over the interval [-1,1], as we may obtain the arctangent of x for x>1as /2 minus the arctangent of 1/x).We find that for 2n+1=31, the relevant coefficient is about0.88 10so that the corresponding term is just about small enough to be dropped.The method will thus give the desired precision with an odd polynomial of degree 29,whose value can be computed using 16 multiplications and 14 additions.A similar accuracy would require about 10 000 000 000 000operations with the "straight" Taylor series...Some economization, indeed!
) is equal to unity,and thisquadratic condition is true not only when k is2-1, but also for the alternate root-(2+1) as well.This latter value, however, leads to a formal Chebyshev series which diverges forany value of x...
(Mark Barnes, UK.2000-10-24) What can youtellme about theGamma function?I can work out values for (x)if x is integral or x is an integer plus one half.How can I calculate values for(x),if x issome other value,like 2.8 or 67/9?What actually is the function?
The following intimidating definitions of the transcendentalGamma function hideits simple nature: (z+1) is merely the generalization of the factorial function(z!) to all real or complex values of the number z [besides negative integers].
Euler integral of the 2nd kind(valid only if R(z)>0): (z) =0e-t tz-1 dt (z) =1e-t tz-1 dt+ (-1)n/(n!(n+z))
(z) has anelementaryexpression only when z iseither a positive integer n,or a positive or negative half-integer (½+n or ½-n):
(n)
(n-1)! (1/2 + n)
(2n-1)!! (1/2 - n)
(-2)n
2n
(2n-1)!!
In this, k! ("kfactorial") is the product of all positive integers less than or equal to k,whereas k!! ("kdouble-factorial")is the product of all such integerswhich have the same parity as k, namelyk(k-2)(k-4)...Note that k!, is undefined () when k is a negative integer(the function is undefined at z = 0,-1,-2,-3,...as it has a simple pole atz = -n with a residue of(-1)n/n!, for any natural integer n).However, the double factorial k!! may alsobe defined for negativeodd values of k: The expression(-2n-1)!! = -(-1)n / (2n-1)!!) may be obtainedthrough the recurrence relation (k-2)!! = k!! / k, starting with k=1. In particular (-1)!! = 1, so that either of the aboveformulas does give , with n=0.(You may also notice that either relation holds for positive or negative values of n.)
When the real 2x is not an integer, we do not knowany expression of(x) in terms of elementary functions:
The real [little known] gem which I have to offer about numerical values of the Gammafunction is the so-called "Lanczos approximation formula" [pronounced"-tsosh" and named after the Hungarian mathematicianCorneliusLanczos (1893-1974), who published it in 1964].Its form is quite specific to the Gamma function whose valuesit gives with superb precision, even for complex numbers.The formula is valid as long as R(z)[the real part of z] is positive.The nominal accuracy, as I recall, is stated for R(z) > ½,but it's a simple application of the "reflection formula" (given below)to obtain the value for the rest of the complex plane with a similar accuracy.The Lanczos formula makes the Gamma function almost as straightforward to computeas a sine or a cosine. Here it is:
(z) =[+ (z)]()(z+p-)z-/ ez+p-
(z) is a small error term whose value is bounded overthe half-plane described above.The values of the coefficients depend on the choice of the integers p and n.For p=5 and n=6, the formula gives a relative error less thanwith the following choice of coefficients:
Some of the fundamental properties of the Gamma function are:
Reflection formula:(z)(1-z) =/sin(z)
Recursion formula: (1+z) =z(z)
Exact values (when n is an integer;seeabove when n is negative): (n) = (n-1)! and(n+) = (2n)! / (n!4n)
Legendre duplication formula (i.e.,multiplication formula with n = 2 ): (2z) =(2)-½2(2z-½) (z) (z+½)
Other interesting remarks about the Gamma function include:
| (ix) | 2 = / (x sinh x ) for x real
Louis Vlemincq (Belgium. 2004-02-19; e-mail) How is the equation t + ln(t) = T ln( I/ i ) solved for t and i ?
Taking the exponential of both sides makes it easy to solve for i:
t et = [I/ i] T
i = I/ ( t e t ) 1/T
To solve for t, you must use Lambert's W function,one of the more common "special" functions presentedabove: Apply W to both sides of the first of the above equations. By definition, W(t exp(t)) is equal to t. Therefore:
t = W( [I/ i] T)
This solution is valid for positive values of t (the original equation does not makesense for negative ones). By itself, the equation x = t exp(t) has 2real solutions for t when x isbetween -1/e and 0 and no real solution when x is less than -1/e.
Thanks a lot for your kind, quick and learned answer. It will be most useful to me.
Best regards, Louis Vlemincq, Transmission Specialist, BelcomLab. BELGACOM / 2, rue Carli, 1140 Evere / Belgium
This can be used to define W everywhere except at the singular point z = -1/e by analytic computation as a multivaluedfunction whose branch cuts are not trivially related.
(2020-03-17) Jonquière's function (Alfred Jonquière, 1888).
The polylogarithm of order s is the analytic function of z defined by
For s=2 and s=3. the names dilogarithm and trilogarithm are used. Other standard numerical prefixes are available if the need arises... Historically, the dilogarithm function was studied well before other polylogarithms, starting with the following formula due to Euler:
The dilogarithm is still sometimes called Spence's function to recognize the work published in 1809 by the Scottish mathematician William Spence (1777-1815). Spence was concerned with polylogarithms of all orders (integers only) which he called Logarithmic Transcendents.
Legendreposed some properties of dilogarithms as exercises (1811). Niels Abel (1802-1829) discussed dilogarithms at greater length in 1826. The name itself (German; bilogarithmische Function) was coined in 1828 by the Swedishmathematician Carl Johan Hill (né Rudelius, 1793-1875).
In December 1888, the Swiss mathematician Alfred Jonquière (1862-1899) presented the general case (for integer values of s) to the Royal Swedish Academy of Sciences, under the title: Ueber einige Transcendente welche bei der wiederholten Integration rationaler Funktionen aufreten. Shortly thereafter, Jonquière extended his definition to allow all complex values of s in a note published in French in Bulletin de la Socété Mathématique de France, 17, pp. 142-152 (1889).
Thus, Jonquière's function (the general polylogarithm) can be considered to be a differentiable function of two complex variables, s and z, verifying the following recurrence relation:
Li0(z) = z/ (1-z) Li1(z) = Log (1-z) z Lis(z) = Lis-1(z)/ z
The latter relation can be integrated unambiguously, using Lis(1) = (s) :
Lis(z) = (s) +
z
Lis-1(t)
dt
1
t
This isn't applicable to s=1 because both terms diverge.
For less obvious expressions when q is a root of unity, see the technique presented elsewhere on this site. Such results include expressions like:
expi(z) = [e (7z+1) i /4 + e 5z i /4 e (3z+1) i /4 + e z i /4 ]
When the parameter q is real, all the zeros of exp qare real.
q
Smallest zeros of exp q [not corrected for serious rounding errors]
x0(q)
x1(q)
x2(q)
x3(q)
1.0
None
0.5
0.3
0.1
0.0
-1
Single zero.
-0.1
-0.3
-0.5
-1.0
(k-¼) for any integer k.
When q is a real between 0 and 1, a theorem due toEdmond Laguerre (1834-1886; X1853) says that all zeros are simple, real and negative.
The first column in the above table x0(q) has been the object of considerable attention. Alan Sokal (2011) found that 1+1/x0 (q) has anexpansion consisting only of positive terms (he checked up to order 899):
The name deformed exponential has often been hijacked in recent years. What follows coincides with the above only up to second order:
eq(x) = 1 + x + q x2/2 + O(x3)
Constantino Tsallis presented what's next in 1988 and 1994. It had been analyzed in 1964 (using the real parameter = 1-q) by the statisticians George E.P. Box (1919-2013) and David Cox (1924-) and also, in1967, by Jan Havrda and Frantisek Charvát, as they named the concept of structural -entropy. They all refer to:
eq (x) = [ 1 + (1-q) x ]1/(1-q)
That expression is well-defined only when 1+(1-q)x is a positive real, although it does reduce to the ordinary exponential as q tends to 1.
That's e 1-q(x,1) using the deformed exponential function of two variables of Miomir Stankovic, Sladjana Marinkovic & Predrag Rajkovic (2011):
eh(x,y) = [ 1 + h x ] y/h
Extending to e0(x,y) = e xy by continuityin theneighborhood of h = 0.
(2017-06-30) Solving the simplest non-linear differential equations.
A solution of a lineardifferential equation can only have fixed singularities at points where the coefficients of the equation are singular.
On the other hand, the solutions of a nonlinear diffential equations, may present other singularities which depend on the initial conditions. Those are called movable singularities (also known as spontaneous or internal ; French: singularité mobile).
A nonlinear ordinary differential equation is said to have the Painlevé property when the only movable singularities of its solutions are poles (no spontaneous branch points or otheressential singularities are allowed). This class of equations was first investigated by Sofia Kovalevskaya (1850-1891) in 1888,ahead of the work of Paul Painlevé.