# Math question

• 05-22-2007
leonm54
Math question
No, I am not looking for a code solution, I am looking for where to go to get a "tutorial" on how to solve the attached equation.

Thanks.
• 05-22-2007
ChaosEngine
what has this got to do with C++ programming?
• 05-22-2007
leonm54
I am attempting to implement it in C++, but have not touched this level of math in at least a decade. I don't even know what to call this type of formula. I don't want to get a C++ solution. I am looking for a bord that might discuss this type of math or how discussion/tutorial on implementing such math in C++
• 05-22-2007
ChaosEngine
well, I'd start by reading up on polynomial equations
• 05-22-2007
pjeremy
• 05-22-2007
laserlight
Moved to General Discussions.
• 05-23-2007
twomers
How? Matlab or mathematica :)
• 05-24-2007
Sang-drax
One common way to find the roots of an arbitrary polynominal is to construct a matrix with the desired roots as eigenvalues (search for "companion matrix"). Then use an iterative way ("power iteration" is simple, "QR algorithm" is somewhat more advanced, but popular) to find the eigenvalues.

You can also try to find a root using Newton's method and then divide the polynominal by (x-root) to reduce it to degree 4. There will always be at least one real root.
• 05-24-2007
QuestionC
Quote:

Originally Posted by leonm54
No, I am not looking for a code solution, I am looking for where to go to get a "tutorial" on how to solve the attached equation.

Thanks.

Viola!
Code:

```float solve_poly (float a0, float a1, float a2, float a3, float a4, float a5, float x) {   return a0 + a1 * x + a2 * x * x + a3 * x * x * x + a4 * x * x * x * x + a5 * x * x * x * x * x; }```
Honestly... 'solve' is a very vague word.
• 05-24-2007
Sang-drax
Quote:

Originally Posted by QuestionC
Honestly... 'solve' is a very vague word.

Is it?´He said "how to solve the attached equation". I think it is pretty clear what he meant.