Clear[data];
data={{0,1}, {0.5, 2}, {1,0}, {1.5, -1}, {2, 1}}

Clear[g,Q];
g[x_]= InterpolatingPolynomial[data, x];
Q[x] = Expand[g[x]]

dots = ListPlot[data,PlotStyle->  
  {PointSize[0.02]},
   DisplayFunction->Identity];
g1=Plot[g[x], {x, -0.5,2.5},
DisplayFunction->Identity];
Show[g1,dots,PlotRange->{{-0.5,2.5},
 {-4,4}},
PlotLabel->"data and the interpolating polynomial.",
AxesLabel->{"x","y"},DisplayFunction->$DisplayFunction];

Clear[data];
data={{0,1}, {0.25,0.5},{0.5, -2},
{0.75,1},{1,3},{1.25, 3},{1.5, 2}, 
{1.75,0},{2, -1}}

Clear[g,Q];
g[x_]= InterpolatingPolynomial[data, x];
Q[x] = Expand[g[x]]

dots = ListPlot[data,PlotStyle->
  {PointSize[0.02]}, 
   DisplayFunction->Identity];
g1=Plot[g[x], {x, -0.1,2.1},
DisplayFunction->Identity];
Show[g1,dots,PlotRange->{{-0.1,2.1},
 {-4,4}},
PlotLabel->"data and the interpolating polynomial.",
AxesLabel->{"x","y"},DisplayFunction->$DisplayFunction];

Clear[f];
f[x_] = 1 /(1+25x)

Clear[data];
data= Table[{0.2 i, 1 / (1+ 5i)},{i, 0, 5}]

Clear[g, Q];
g[x_]= InterpolatingPolynomial[data, x];
Q[x] = Expand[g[x]]

dots = ListPlot[data,PlotStyle-> 
  {PointSize[0.02]},
   DisplayFunction->Identity];
g1=Plot[g[x], {x,0.0,1.1},
DisplayFunction->Identity];
g2=Plot[ f[x] , {x, 0.0,1.1},
PlotStyle -> Thickness[0.01],
DisplayFunction->Identity];
Show[g1,g2,dots,PlotRange->{{-0.1,1.1},{-0.2,1.1}},
PlotLabel->"f(x) and the Newton polynomial.",
AxesLabel->{"x","y"},DisplayFunction->$DisplayFunction];