# solving of a polynomial equation with large coefficients

m trying to solve a polynomial equation with degree 4.. i have given the code below.. but it's taking too long and at the end shows a message that it has exceeded the time limit.. please help

a1[rho_, k_] = rho/k + Coth[k]/(2*k) + Tanh[k]/(2*k);
b1[rho_, k_, u1_] = 2*I*(rho*u1 + Coth[k]/2 + Tanh[k]/2);
c1[rho_, k_, we1_, u1_] = k^2/we1 - k*rho*u1^2 - (k*Coth[k])/2 - (k*Tanh[k])/2;

d1[k_] = Tanh[k]/(2*k) - Coth[k]/(2*k);
e1[k_] = 2*I (Tanh[k]/2 - Coth[k]/2);
f1[k_] = (k*Coth[k])/2 - (k*Tanh[k])/2;
a2[k_] = Tanh[k]/(2*k) - Coth[k]/(2*k);
b2[k_] = Tanh[k]/(2*k) - Coth[k]/(2*k);
c2[k_] = 2*I (Tanh[k]/2 - Coth[k]/2);
d2[rho_, k_] = (rho/k + Coth[2 k]/(2 k) + Tanh[k]/(2 k));
e2[rho_, u2_, k_] = 2 I (rho*u2 + Coth[k]/2 + Tanh[k]/2);
f2[k_, we1_, rho_, u2_] = (k^2/we1 - k*rho*u2^2 - (k*coth[k])/2 -(k*Tanh[k])/2);
x1 = a1[rho, k]*d2[rho, k] - (d1[k])^2;
x2 = a1[rho, k]*e2[rho, u2, k] + b1[rho, k, u1]*d2[rho, k] - 2 d1[k]*e1[k];

x3 = a1[rho, k]*f2[k, we1, rho, u2] + b1[rho, k, u1]*e2[rho, u2, k] +c1[rho, k, we1, u1]*d2[rho, k] - (e1^2)[k] - 2 d1[k]*f1[k];

x4 = b1[rho, k, u1]*f2[k, we1, rho, u2] + c1[rho, k, we1, u1]*e2[rho, u2, k] - 2 e1[k]*f1[k];

x5 = c1[rho, k, we1, u1]*f2[k, we1, rho, u2] - (f1[k])^2;
expression2[s_] = x1*s^4 + x2*s^3 + x3*s^2 + x4*s + x5;
Simplify[Solve[expression2[s] == 0, s]]

• Solve will return analytic solutions, and unless there's some reason to believe that the solutions will simplify (which doesn't appear to be the case), then the analytic roots of that polynomial are extremely messy, and there's never any reason why you would want to work with them. I recommend plugging in numbers for the parameters and using NSolve to get the numerical roots. Then, if you need to vary the parameters, make a Table to iterate over the different parameters. Dec 2, 2016 at 17:52

expression2[s_]=qx1*s^4+qx2*s^3+qx3*s^2+qx4*s+qx5;