cubic polynomial with variables

4 visualizaciones (últimos 30 días)
mark wentink
mark wentink el 4 de Jul. de 2012
Hello everyone,
This is probably a fairly easy question to answer.
I am trying to solve a 3rd degree polynomial with 4 variables, a b c d, each functions of k1, k2, Tr, Tf (or some of those).
Is it possible to obtain the roots of the polynomial in terms of k1, k2, Tf, Tr?
Thanks for your help,
Mark

Respuestas (3)

Mark Whirdy
Mark Whirdy el 4 de Jul. de 2012
Hi Mark
Can you write the polynomial out in full here?
Mark

Walter Roberson
Walter Roberson el 4 de Jul. de 2012
syms x k1 k2 Tr Tf
a = SomeFunction(k1,k2,Tr,Tf);
b = SomeOtherFunction(k1,k2,Tr,Tf);
c = AThirdFunction(k1,k2,Tr,Tf);
d = FourthFunction(k1,k2,Tr,Tf);
CubeRoots = solve( a*x^3 + b*x^2 + c*x + d, x);
You might also want to simplify() each of the roots.
I will caution you that the results you get out are likely to be messy to read: the generalized solution for a cubic is not fun to make mental sense of. (Quadratic can be a lot worse though!)

mark wentink
mark wentink el 4 de Jul. de 2012
I tried the solve function, followed by simplify, which gives me a root of about 10 lines, is there another way of getting it simplified?
The actual polynomial is:
(k1/2) * x^3 + (k1*(k2+Tf-Tr)-2*(k2 ^2))/2 * x^2 + k2*Tr*((4*k2-k1)/2) * x - k2^2*Tr^2 = 0
Also, I imagine it would help if I had an actual value for k1. I've got an average with a standard deviation. Is there any way of incorporating that error? Or should I just use the average?
  1 comentario
Walter Roberson
Walter Roberson el 5 de Jul. de 2012
Only about 10 lines? Then MuPAD has already done quite a good job of simplifying: the result that I find is over 4000 characters, about 30 lines each over 128 characters long.
Symbolic forms of cube roots are long, period. There isn't much in the way of simplification available. There is common sub-expression optimization, which gives you efficiencies but often isn't much more readable.

Iniciar sesión para comentar.

Categorías

Más información sobre Polynomials en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by