Yea. But it can only do some basic factorization.
Examples:
Ex1)
Input: factor(x^2 - 2x + 1)
Output: (x-1)^2
Ex2)
Input: factor(x^3 - 3x^2 + 3x - 1)
Output: (x-1)^3
Ex3)
Input: factor(x^3 - 4x^2 - 7x + 10)
Output: ((x-5)*(x-1))*(x+2)
Ex4)
Input:factor(2x^6 + 5/2 x^5 + 4x^4 + 5x^3)
Output:(((x^3*(4*x+5))*((x^2)+2))/2) \(\dfrac{(x^3)(4x+5)(x^2+2)}{2}\)
.