The desired output is in the form of a product of factors that has been combined, like the larger font size formulas on the right side of the image. (a+b)^2=a^2+2ab+b^2
Or is this combination not the expected behavior of the combine function? In that case, is there any function to reach my desired output?
The combine function is meant to act as a way to combine the powers of an equation. The horner function will be useful when you have a nested "polynomial" expression. In your case, neither of these functions will be of use. You can infact achieve what youre trying to do with "simplify()".
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.