# How to solve quadratic over square root of quartic equals constant?

We need to solve the following equation for l.

$$\frac{n_1 - \ell n_2 + \ell ^2 n_3}{\sqrt{d_1 - \ell d_2 + \ell ^2d_3 - \ell ^3d_4 + \ell ^4d_5}} - \cos{a_0} = 0$$

We have already tried linearisation of our formulas so that the above equation would look like this:

$$\frac{c_1 - \ell c_2}{\sqrt{c_3 - \ell c_4 + \ell^2c_5}} - \cos{a_0} = 0$$

However the result of the second equation is not accurate enough for our calculation. For the second equation we were able to solve with it mathematica. However the second equation could not be solved by mathematica.

What approaches are possible to get the solutions or good approximations of the first equation?

-
Have you tried Newton's method? –  deoxygerbe Feb 2 '12 at 10:23
So could or couldn't Mathematica solve the second equation? Error in the text? –  Hidde Feb 2 '12 at 10:46
No it takes to long. I stopped the calculation after 1h. –  tune2fs Feb 2 '12 at 10:51
Can't you square and rearrange to a quartic, solve the quartic with Sturm sequences and Newton's method, and then check the solutions against the original equation? –  Peter Taylor Feb 2 '12 at 11:00

This can be reduced to a quartic equation amenable to exact treatment (e.g. see here). You can see this in the following way:

$$\frac{n_1 - \ell n_2 + \ell ^2 n_3}{\sqrt{d_1 - \ell d_2 + \ell ^2d_3 - \ell ^3d_4 + \ell ^4d_5}} - \cos{a_0} = 0$$

can be rewritten as

$$(n_1 - \ell n_2 + \ell ^2 n_3)^2=(d_1 - \ell d_2 + \ell ^2d_3 - \ell ^3d_4 + \ell ^4d_5)\cos^2{a_0}$$

provided $d_1 - \ell d_2 + \ell ^2d_3 - \ell ^3d_4 + \ell ^4d_5\ne 0$, that is

$$n_1^2 +\ell^2 n_2^2 + \ell ^4 n_3^2-2\ell n_1n_2+2\ell^2n_1n_3-2\ell^3n_2n_3=(d_1 - \ell d_2 + \ell ^2d_3 - \ell ^3d_4 + \ell ^4d_5)\cos^2{a_0}.$$

Then, collecting similar terms one gets

$$(n_3^2-d_5\cos^2{a_0})\ell^4-(2n_2n_3-d_4\cos^2{a_0})\ell^3+(2n_1n_3+n_2^2-d_3\cos^2{a_0})\ell^2-(2n_1n_2-d_2\cos^2{a_0})\ell+n_1^2-d_1\cos^2{a_0}=0.$$

Now you can solve it analytically or numerically but formulas are well known as you can get from the link I gave above.

-
Thanks, now i could find some solutions. Shame on me that I did not figure this out. –  tune2fs Feb 2 '12 at 11:23