Solution of two variables parametric (in one) equation

Dear colleagues,
I have a complex equation of the form: -xr + ar^5 - br^4 + cr^3 - dr^2 + er + 1.22 = 0, where x and r are two variables and a, b, c d & e are constants. I may ask for your kind suggestion to find the values of x and r.
Best regards, Imran

6 Comments

You can consider this problem as solving roots of 5th degree polynomial in r with all coefficients given expect coefficient of r (power 1).
Check symbolic math toolbox (syms), it does exactly what you want.
Dear Mostafa,
I tried the toolbox and code looks like as follow:
syms rho r f = -1.71*10^-9*rho*r+0.0877*r^5-3.93*r^4+82.6*r^3-18.06*r^2+131670*r+1.22; sol = solve(f==0); sol
The output shows some strange roots.
What is rho? If it's a constant you don't need to assign it to a syms object, else the equation will be solved for 3 variables instead of 2.
rho is a variable. In the equation, there are two variables (rho and r), which third vaiable you mean?
Actually I've just noticed that you have one equation in two unkowns, so basically you can have an unlimited number of solutions. Unfortunately I don't have access to matlab right now, so I can't verify the output, but I think that's the issue with that. Maybe the default algorithm to calculate the result contains both real & imaginary parts, so it gives you the answer you mentioned.

Sign in to comment.

Answers (1)

You have ONE equation, in TWO unknowns.
You cannot solve for both unknowns. At best, you can solve for one as a function of the other. So, if you choose to fix the value of r, then paper and pencil are sufficient to solve for x, AS A FUNCTION OF r.
Alternatively, if you choose to fix the value of x, then you have a 5th degree polynomial, with non-trivial coefficients. For almost ALL such sets of coefficients (except for some trivial sets) there are NO analytical solutions. This was proven a long time ago. At best, you can solve for the numerical roots. So the symbolic toolbox will return expressions that involve calls to the function "rootof".
But again, if you want to solve for both x and r at the same time this is simply NOT possible. One equation in two unknowns is insufficient information.

Categories

Find more on Mathematics in Help Center and File Exchange

Asked:

on 27 Oct 2016

Commented:

on 27 Oct 2016

Community Treasure Hunt

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

Start Hunting!