How do I simplify polynomial coefficients with symbolic variables to the least possible forms?
23 views (last 30 days)
Show older comments
I am working on a two-area LFC system. The characteristic polynomials are represented as a function of system parameters (symbolic variables). Here, I want to simplify the polynomial coefficients to their simplest form. I tried using Matlab's "simplify" and "collect" functions, but I was unable to achieve the desired result. I welcome your recommendations.
0 Comments
Answers (1)
John D'Errico
on 26 Apr 2023
The simplest form in your eyes is not always what a computer sees as the simplest form. It may require factoring the polynomial to make it looks better. But that need not be easy to find those factors. You can try using the simplify options.
help simplify
For example:
syms x y
P = x^2 + 4*x + 4 + x*y
But is the expression
(x+2)^2 + x*y
a simpler expression? Sometimes simplfy can give you a better result. But here it does not.
simplify(P,'steps',100,'all',true)
See Also
Categories
Find more on Polynomials in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!