Is a useful program for doing symbolic algebra

This preview shows page 2 - 4 out of 4 pages.

Mathematica isn’t covered in this class, it may be useful to see what it can do easily. Itis a useful program for doing symbolic algebra, manipulating lists, and for employing avariety of common mathematical functions without having to write too much code. Ofcourse for this problem you could also have written some MATLAB code to accomplishmore or less the same thing, or written out more steps by hand.In[389]:= Binomial[0.25, 2]Out[389]= -0.09375In[390]:= Binomial[0.25, 3]Out[390]= 0.0546875In[391]:= Binomial[0.25, 4]Out[391]= -0.0375977In[379]:= f = {1.0, 1.22140, 1.49182, 1.82212, 2.22554}Out[379]= {1., 1.2214, 1.49182, 1.82212, 2.22554}In[383]:= Df = Table[f[[i + 1]] - f[[i]], {i, 4}]Out[383]= {0.2214, 0.27042, 0.3303, 0.40342}In[385]:= DDf = Table[Df[[i + 1]] - Df[[i]], {i, 3}]Out[385]= {0.04902, 0.05988, 0.07312}In[387]:= DDDf = Table[DDf[[i + 1]] - DDf[[i]], {i, 2}]Out[387]= {0.01086, 0.01324}In[388]:= DDDDf = Table[DDDf[[i + 1]] - DDDf[[i]], {i, 1}]Out[388]= {0.00238}
MATH 128A, SUMMER 2010, HOMEWORK 5 SOLUTION316. For a functionf, the Newton divided-difference formula gives the interpolating polynomialP3(x) = 1 + 4x+ 4x(x-0.25) +163x(x-0.25)(x-0.5),on the nodesx0= 0,x1= 0.25, andx3= 0.75. Findf(0.75).
2. Use Theorem 3.9 or Algorithm 3.3 to construct an approximating polynomial for the follow-ing data.a.xf(x)f0(x)01.000002.000000.52.718285.43656

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture