Removing the remainder function from Taylor expansions.

  • Maple TA Interns 2016

    When trying to set up a question such as

    it is natural to use the maple function taylor(expression, x=a, n) to generate the answer, eg in this example, one would use:

    y := taylor((5+6*x)*exp(x), x=0, 3).

    However calling this function does not return a polynomial, it instead returns the polynomial we want for the grading code with the addition of the remainder function, simply being O(x^3).

    So the line above would return:


    To get rid of the O(x^3) to make grading easier, one needs to convert the output to a polynomial using:

    z := convert(y, polynom)

    which then returns:


    This can then be easily marked in a maple graded question.