File:AsymptoticExpansionExample.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file(SVG file, nominally 449 × 273 pixels, file size: 68 KB)

Summary

Description
English: Plots of the absolute value of the fractional error in the asymptotic expansion of the Gamma-related function . The horizontal axis is the number of terms in the asymptotic expansion. Blue points are for x=2 and red points are for x=3. It can be seen that the least error is encountered when there are 14 terms for x=2, and 20 terms for x=3, beyond which the error diverges.
Date
Source Own work
Author PAR
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Mathematica.
Source code
InfoField

Mathematica code

f[x_] := Exp[x] Gamma[x + 1]/x^x/Sqrt[2 \[Pi] x]
ff[n_, x_] := Normal[Series[f[xx], {xx, \[Infinity], n}]] /. xx -> x
x1 = 2.;
x2 = 3.;
n = 40;
a1 = Table[ff[i, x1], {i, 1, n}];
a2 = Table[ff[i, x2], {i, 1, n}];
plot1 = ListLogPlot[Abs[a1/f[x1] - 1], 
   PlotRange -> {{0, n + 1}, {10^(-10), 1}}];
plot2 = ListLogPlot[Abs[a2/f[x2] - 1], 
   PlotRange -> {{0, n + 1}, {10^(-10), 1}}, PlotStyle -> Red];
w = Show[plot1, plot2]

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

18 January 2017

image/svg+xml

7ea1556570ddd48f689dba0941b42315ec999767

69,679 byte

273 pixel

449 pixel

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current00:00, 19 January 2017Thumbnail for version as of 00:00, 19 January 2017449 × 273 (68 KB)PARabsolute value of error rather than error
23:41, 18 January 2017Thumbnail for version as of 23:41, 18 January 2017449 × 273 (43 KB)PARUser created page with UploadWizard
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file:

Metadata