Quartic Equation Solution Help
Quartic Equation Solution Help
(OP)
Hi,
I have currently developed a VB script that produces 4 coefficients e.g (A1,A2,A3,A4). These four coefficients make up the constants of a quartic equation.
A1x^4 + A2x^3 + A3x^2 + A4x = 0
Where I need to solve for x.
I am not strong in visual basic and was thinking the Newton Raphson method may be appropriate to solve this. However I am not proficient enough to write this code in vb. Does anyone have a suitable VB script that may solve this equation for me or any advice on an alternative method.
Any help would be greatly appreciated.
Cheers,
M
I have currently developed a VB script that produces 4 coefficients e.g (A1,A2,A3,A4). These four coefficients make up the constants of a quartic equation.
A1x^4 + A2x^3 + A3x^2 + A4x = 0
Where I need to solve for x.
I am not strong in visual basic and was thinking the Newton Raphson method may be appropriate to solve this. However I am not proficient enough to write this code in vb. Does anyone have a suitable VB script that may solve this equation for me or any advice on an alternative method.
Any help would be greatly appreciated.
Cheers,
M
RE: Quartic Equation Solution Help
It looks to me as if those equations could be incorporated into a VB function that would also be able to handle the special cases and return some roots for you. It looks like it would take some work and testing but if those equations work for your purposes it should be possible. Otherwise is there any chance you could send those variables to Matlab (or similar) for processing?
I hope that is any help at all, and I'd be happy to help with VB function construction suggestions too.
Eric
RE: Quartic Equation Solution Help
Do you have an estimate of where the roots are that you want to find?
The answers to the above questions will help determine which method to use.
For some reading on numerical methods go to www.nr.com it is the numerical recipies site, they have some useful info and algorithms.
RE: Quartic Equation Solution Help
However, I was able to solve this using a quartic solution formula I found on the web.
For anyone who is interested there is a helpful solution for a quartic polynomial which can be found at
http://www.1728.com/quartic2.htm.
This steps out a process that isn't too bad to put into vb.
Thanks for your help
M.
RE: Quartic Equation Solution Help
Anyone interested can download from:
http://www.interactiveds.com.au/software.html
The file should be self explanatory, but if not please ask.
It's open source, any comments on the code are welcome.
Doug Jenkins
Interactive Design Services
www.interactiveds.com.au
dougjenkins@interactiveds.com.au