MATLAB: How can I use partfrac command

partfracundefined variable

Hi
i want to find the partial fraction expansion for the function
f(x) = (8x^2+37x+32)/((x+1)(x+2)(x+4))
I want to find it using partfrac command
when I try partfrac((8*(x^2) + 37*x + 32) / ((x + 1) * (x+2) * (x+4)))
I get an error: Undefined function or variable 'x'.
How can I do it?

Best Answer

syms x
partfrac((8*(x^2) + 37*x + 32) / ((x + 1) * (x+2) * (x+4)))