home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / sm30a.zip / SERIES.(X) < prev    next >
Text File  |  1993-10-16  |  375b  |  9 lines

  1. # series(f,x,order)    generates a Taylor power series expansion for 
  2. #            f about the point x=0 to order x^n.
  3. # series(f,x)        with the default order n=5.
  4. #     e.g. series(sin(x), x)    gives x-x^3/6+x^5/120
  5. # generate the Taylor power series for sin(x)
  6.  
  7. series(y_,x_,n_) := subs(subs(y+sum(d(y, x, j)*xx^j/j!, j from 1 to n, 1),x = 0), xx = x)
  8. series(y_,x_) := series(y,x,5)
  9.