File:Stirling error vs number of terms.svg
Original file (SVG file, nominally 736 × 499 pixels, file size: 80 KB)
Captions
This file supersedes the file StirlingError1.svg. It is recommended to use this file rather than the other one.
Bahasa Indonesia ∙ davvisámegiella ∙ Deutsch ∙ English ∙ español ∙ français ∙ italiano ∙ magyar ∙ Nederlands ∙ polski ∙ svenska ∙ македонски ∙ മലയാളം ∙ português do Brasil ∙ русский ∙ slovenščina ∙ 日本語 ∙ 中文(简体) ∙ 中文(繁體) ∙ farsi ∙ +/− |
Summary
editDescriptionStirling error vs number of terms.svg |
English: Plot of the error in the Stirling series for a fixed argument with increasing numbers of series terms. |
Date | |
Source | Own work |
Author | Glosser.ca |
Other versions | File:StirlingError.svg Image:StirlingError.png File:StirlingError1.svg |
SVG development InfoField | This diagram was created with Mathematica. |
Source code InfoField | Mathematica codeb[0] = b[1] = 1;
b[n_] := b[n] =
1/(n + 1) (b[n - 1] - Sum[k b[k] b[n + 1 - k], {k, 2, n - 1}])
a[n_] := (2 n + 1)!! b[2 n + 1]
Approx[z_, n_] := Sqrt[2 \[Pi] z] (z/E)^z Sum[a[k] z^-k, {k, 0, n}]
err[z_, n_] := Abs[(Approx[z, n] - z!)/z!]
Block[{$MaxExtraPrecision = 150},
ListLogPlot[
{
err[10, #] & /@ Range[0, 200],
err[20, #] & /@ Range[0, 200],
err[30, #] & /@ Range[0, 200]
},
Joined -> True,
Frame -> True,
ImageSize -> Large,
PlotStyle -> Thick,
FrameStyle -> Directive[Black],
FrameLabel -> {"Number of terms", "Relative Error"},
FrameTicks -> {{Automatic, Automatic}, {Range[0, 200, 25],
Automatic}},
GridLines -> {Range[0, 200, 25], Automatic},
GridLinesStyle -> Directive[LightGray, Dashed],
PlotLegends -> Placed[
LineLegend[{10, 20, 30}, LegendLabel -> "Argument, n:"],
Top
]
]
]
|
Licensing
edit- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 18:04, 23 April 2016 | 736 × 499 (80 KB) | Rayhem (talk | contribs) | Fix margins | |
13:35, 23 April 2016 | 715 × 501 (80 KB) | Rayhem (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
File usage on other wikis
The following other wikis use this file:
- Usage on ca.wikipedia.org
- Usage on en.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 588.79688pt |
---|---|
Height | 398.84726pt |