LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help me - solve equation

hi

i  want to find x in this eqation by labview

 

how can calculate and find x in this equation: (a/x)+(b/x2)+(c/x^3)+(d/x^4)+(e/x^5)+(f/x^6)=g

a,b,c,d,e,f,g are known $ i unknown how can solve by labview

thank

0 Kudos
Message 1 of 5
(3,944 Views)

There is no perfect answer to this question. For polynomials up to degree 4, there are explicit solution formulas similar to that for the quadratic equation (the Cardano formulas for third-degree equations, see here, and the Ferrari formula for degree 4, see here).

For higher degrees, no general formula exists (or more precisely, no formula in terms of addition, subtraction, multiplication, division, arbitrary constants). This result is proved in Galois theory and is known as the Abel-Ruffini theorem.

 

Edit: Note that for some special cases solution formulas exist, but they do not generalize to all polynomials.

 

 

0 Kudos
Message 2 of 5
(3,927 Views)

What do you know about finding the roots of a polynomial equation?  [It is not at all clear what equation you mean, by the way, as you've written it in an unconventional style with probably at least one typo].

 

You've already been told (and may also already know) that there is no "closed form" solution for fifth and higher-order polynomials.  There are, however, numerical methods that you can use.  If you have an algorithm, you can simply "translate" it into LabVIEW code.  Go find (or derive) an algorithm ...

 

Bob Schor

0 Kudos
Message 3 of 5
(3,894 Views)

Actually the previous replies is not the end of the road. With the substitution z=1/x (assuming x != 0), your equation can be written as

 

f*z^6 + e*z^5 + d*z^4 + c*z^3 + b*z^2 + a*z - g = 0

 

If we allow z to be complex number, the left side polynom must have between 1 and 6 roots; i.e. values of z which solve your equation (Wiki link).

 

What is even better: LabVIEW can calculate these roots for you, the function is called Polynomial Roots.vi. Not all values from this VI can be used. You should check if the values are real numbers (imaginary part of the complex number close to 0), and if they appear multiple times in the array. For instance, for the  polynom z^2 - 2*z + 1 has only one root at z = 1, but the VI will  return the root 1+0i twice.

 

 P. S. to make it clear, this method is a numeric one and does not necesserily return exact solutions. 

0 Kudos
Message 4 of 5
(3,883 Views)

The nice thing for double posts are discussions held twice…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(3,875 Views)