Euler–Mascheroni constant and MediaWiki:Common.js: Difference between pages

From TCS Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>Caliburn
(Another typo -.-)
 
imported>Etone
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: var customizeToolbar = function () { →‎Your code goes here: $( '#wpTextbox1' ).wikiEditor( 'add...")
 
Line 1: Line 1:
The '''Euler-Mascheroni''' constant is a number that appears in [[analysis]] and [[number theory]]. It first appeared in the work of Swiss mathematician [[Leonhard Euler]] in the early 18th century.<ref>{{cite book|last=Euler|first=Leonhard|title=De Progressionibus harmonicus observationes|year=1735|url=http://eulerarchive.maa.org/docs/originals/E043.pdf|pages=150-161}}</ref> It is usually represented with the Greek letter, <math>\gamma</math>, although Euler used the letters C and O instead. It is not known yet whether the number is irrational (which would mean that it cannot be written as a fraction with an integer numerator and denominator) and/or transcendental (which would mean that it is not the solution of a [[polynomial]] with integer coefficients). The numerical value of <math>\gamma</math> is about <math>0.5772156649</math>. Italian mathematician [[Lorenzo Mascheroni]] also worked with the number, and tried, unsuccessfully, to approximate the number to 32 decimal places, making mistakes on five digits. <ref>{{cite web|last=Sandifer|first=Edward|title=How Euler Did It - Gamma the constant|url=http://eulerarchive.maa.org/hedi/HEDI-2007-10.pdf|accessdate=26 June 2017|date=October 2007}}</ref>
/* Any JavaScript here will be loaded for all users on every page load. */


It is significant because it links the [[divergent series|divergent]] [[harmonic series]] with the [[logarithm|natural logarithm]]. It is given by the limiting difference between the natural logarithm and the harmonic series <ref name="gm">{{cite web|title=The Euler Constant|url=http://numbers.computation.free.fr/Constants/Gamma/gamma.pdf|accessdate=June 26, 2017|date=April 14, 2004}}</ref>:
var customizeToolbar = function () {
/* Your code goes here */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
group: 'format',
tools: {
"math": {
label: 'Math',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/2/2e/Button_math.png',
action: {
type: 'encapsulate',
options: {
pre: "<math>",
post: "</math>"
}
}
}
}
} );
};


:<math>\gamma = \lim_{t \to \infty} \left(\sum_{n=1}^{t} \frac{1}{n} - \log(t)\right)</math>
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
 
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {
It can also be written as an improper integral involving the [[floor function]], which gives the greatest integer less than or equal to a given number.
mw.loader.using( 'user.options' ).then( function () {
 
// This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
:<math>\gamma = \int_{1}^{\infty} \left(\frac{1}{\lfloor t \rfloor} - \frac{1}{t}\right) \mathrm{d}t</math>
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
 
$.when(
The gamma constant is closely linked to the [[Gamma function]] <ref name="gm"/>, specifically its logarithmic [[derivative (mathematics)|derivative]], the [[digamma function]], which is defined as
mw.loader.using( 'ext.wikiEditor.toolbar' ), $.ready
 
).then( customizeToolbar );
:<math>\mathrm{\Psi}_0(x) = \frac{\mathrm{d}}{\mathrm{d}x} \log(\Gamma(x)) = \frac{\Gamma'(x)}{\Gamma(x)}</math>
}
 
} );
For <math>x=1</math>, this gives us<ref name="gm"/>
}
 
:<math>\mathrm{\Psi}_0(1) = -\gamma</math>
 
Using properties of the digamma function, <math>\gamma</math> can also be written as a limit.  
 
:<math>-\gamma = \lim_{t \to 0}  \left(\mathrm{\Psi}_0(t) + \frac{1}{t}\right)</math>
==References==
{{reflist}}
 
{{math-stub}}

Latest revision as of 07:52, 14 September 2017

/* Any JavaScript here will be loaded for all users on every page load. */

var customizeToolbar = function () {
	/* Your code goes here */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"math": {
			label: 'Math',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/2/2e/Button_math.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "<math>",
					post: "</math>"
				}
			}
		}
	}
} );
};

/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {
	mw.loader.using( 'user.options' ).then( function () {
		// This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
		if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
			$.when(
				mw.loader.using( 'ext.wikiEditor.toolbar' ), $.ready
			).then( customizeToolbar );
		}
	} );
}