HP Forums

Full Version: HP Prime: CAS taylor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.


In CAS, for example, if I input

the output is
x -(1/2)*x^2+(1/3)*x^3+x^4*order_size(x)
as expected from the documentation. But
taylor((x+x^2+2*x^3)/(1+2*x-x^2+6*x^3), x,3)
instead of

Why the extra term?

The third parameter is the order used for series expansion, not necessarily the final order.

Thank you. So if I want to obtain the Taylor polynomial of degree n of a function f(x), what is the correct command to use? (I want the result to be a polynomial of degree less than or equal to n, and I do not want the extra "order_size" term)

rem(convert(series(expression,x=limit_point,order),polynom),x^(order+1)) should do that: convert(.,polynom) will remove the order_size remainder term, and rem will remove all monomials of degree>=order+1. You have no warranty to get the full Taylor expansion however, since the remainder term has been erased...

Thanks. But it looks that such command is not available in the HP prime. The example in page 157 of the "Symbolic algebra and Mathematics with Xcas"

"Error: Unmatch control word"

But it looks like "truncate" is in Prime, and does more or less the same.