# Is a useful program for doing symbolic algebra

• Notes
• 4
• 100% (1) 1 out of 1 people found this document helpful

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:= Binomial[0.25, 2]Out= -0.09375In:= Binomial[0.25, 3]Out= 0.0546875In:= Binomial[0.25, 4]Out= -0.0375977In:= f = {1.0, 1.22140, 1.49182, 1.82212, 2.22554}Out= {1., 1.2214, 1.49182, 1.82212, 2.22554}In:= Df = Table[f[[i + 1]] - f[[i]], {i, 4}]Out= {0.2214, 0.27042, 0.3303, 0.40342}In:= DDf = Table[Df[[i + 1]] - Df[[i]], {i, 3}]Out= {0.04902, 0.05988, 0.07312}In:= DDDf = Table[DDf[[i + 1]] - DDf[[i]], {i, 2}]Out= {0.01086, 0.01324}In:= DDDDf = Table[DDDf[[i + 1]] - DDDf[[i]], {i, 1}]Out= {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
• • • 