Question: How to solve a set of polynomial eq. using fsolve()?

Hi,

 

I have the eq. as shown below:

2*x^3+(2*K1*nbo4+3*K2*nbo4*PH2O)*x^2+3*K1*x*nbo4^2*K2*PH2O-3*K1*nbo4^2*Ti*K2*PH2O = 0

where x is the only variable, however I would like to solve this eq with respect to x for a list of 5 different values for the constant K1 (e.g. 1, 2, 3, 4, 5), and then get an output with the 5 numerical solutions to the eq.

I have tried to make the following matrix:

K1 := [1,2,3,4,5]

fsolve(2*x^3+(2*K1*nbo4+3*K2*nbo4*PH2O)*x^2+3*K1*x*nbo4^2*K2*PH2O-3*K1*nbo4^2*Ti*K2*PH2O = 0, x, 0 .. 10^10)

What I get is just the eq. with the matrix inserted for the constant...

How can this be done? I know it just a question of syntax, but I have not been successful, please help me :)

 

Sincerely,

Morten Huse

Please Wait...