|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Logic to solve a Cubic Equation
Hi All,
I have a cubic equation Y = a+ bx+ cx**2+dx**3 where Y,a,b,c,d are constants (known values). I need to find the value of x. Could anybody help me out with a logic?? ![]() |
|
#2
|
||||
|
||||
|
When in doubt, Google:
http://www.sosmath.com/algebra/fact...111/fac111.html http://mathworld.wolfram.com/CubicEquation.html IIRC, there are published analytic solutions for equations up to the 7th power. For higher powers, you could always use an approximation technique like Newton Raphson method, where you run the equations multiple times to converge on a solution. (Now I'm getting flashbacks of my numerical methods classes ).
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
|
#3
|
|||
|
|||
|
Just like Scorpions4ever (what a name btw
pointed out: the solution for this (mathematical) "problem" already exists. You just have to write code to implement it. |
|
#4
|
|||
|
|||
|
Looking for an Implemented Code
Hi All,
I am aware that there are solutions to solve cubic equations. But i am looking for an implemented code. |
|
#5
|
||||
|
||||
|
You haven't specified the language you're intending to use, but if I recall correctly, the books Numerical Recipes in C and Numerical Recipes in Fortran both had the routines. http://www.amazon.com/exec/obidos/t...79113?vi=glance
I guess you could check out the book in your local bookstore to verify that the code is there or not. Also http://www.nr.com/ has all the code from the books available online. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Software Design > Logic to solve a Cubic Equation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|