File:Runge's phenomenon in Lagrange polynomials.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 719 × 491 pixels, file size: 73 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    X=5,6,9,11 Y=12,13,14,16

    Summary

    Description
    English: The polynomial interpolation of samples taken from a Gaussian distribution displays significant ringing near the endpoints.
    Date
    Source Own work
    Author Glosser.ca
    SVG development
    InfoField
     The SVG code is valid.
     This diagram was created with Mathematica.
     The file size of this SVG diagram may be irrationally large because its text has been converted to paths inhibiting translations.
    Source code
    InfoField

    Mathematica code

    dat = {#, Exp[-#^2/2]} & /@ Range[-5, 5];
    {xs, ys} = Transpose[dat];
    
    Basis[pts_, x_] := Times @@ (x - DeleteCases[pts, #])/Times @@ (# - DeleteCases[pts, #]) & /@ pts
    
    f = Total[ys*Basis[xs, x]];
    
    Plot[
     {
      Exp[-x^2/2],
      f
      }, {x, -5, 5},
     Epilog -> {PointSize[Large], Point[dat]},
     PlotRange -> All,
     PlotStyle -> Thick,
     Frame -> True,
     FrameStyle -> Black,
     Axes -> False,
     GridLines -> Automatic,
     GridLinesStyle -> Directive[LightGray, Dashed],
     ImageSize -> Large]
    
    but from where does the text come ?

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
    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.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    23 April 2016

    74,394 byte

    image/svg+xml

    311a13a20bf59fdd36f42bbb75ebd269587ada86

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current15:47, 29 April 2016Thumbnail for version as of 15:47, 29 April 2016719 × 491 (73 KB)wikimediacommons>RayhemAdd legend

    There are no pages that use this file.