Is the solution from wolfram alpha for $x^4+bx^3+f=0$ only wrong for $b=0$? edit, tldr: it seems like the question is interpreted as "for which combinations of a and f is there a solution to the expression"? I'm only interested in "for which combinations of a and f is the wolfram formula wrong". When the wolfram formula takes square roots of negative numbers or divides by zero, I consider it still correct if there was no solution anyway. But it has divisions by zero for b=0 and f=-1, while there should be solutions then. Does that also hold for some nonzero values of b?

For my hobby computer science project, I need to solve $x$ for $x^4+bx^3+f=0$. ($x, b, f\in \mathbb{R}$). I put the formula in wolfram alpha:

http://www.wolframalpha.com/input/?i=solve+x%5E4+%2B+b+x%5E3+%2B+f+%3D+0+for+x 

and implemented the resulting four formula's from that page in Java. This works pretty well, for random values of $a$ and $f$ it always generates a good approximation of the solution set. However, for the "non-random" input {$b=0, f=-1$}, the wolfram formula (and hence my program) fail. It should have two solutions, $x=1$ and $x=-1$, but it gives none. I took a close look at the formula. Each of the four solutions has the same part $\frac{b^3}{\psi}$ (note the 3). When substituting $b=0$ and $f=-1$ into $\psi$, you'll get the formula here (removing the 4 and the square root):

http://www.wolframalpha.com/input/?i=cbrt(sqrt(3)+sqrt(256))+%2F+(cbrt(2)+3%5E(2%2F3))+%2B+4+(cbrt(-2%2F3))+%2F+cbrt(sqrt(3)+sqrt(256))

Indeed, $\psi=0$ and $\frac{b^3}{\psi}$ is a division by zero.


Is the solution given by wolfram wrong (1st link)?
I can easily solve this in my program by checking if $b=0$. But is that enough or are there other combinations of $b$ and $f$ where this formula goes wrong?
The formulas given by Wolfram Alpha are not wrong, they're "generic".  (Which is a very specific form of wrong which means "only wrong on a set so small that you shouldn't ever care if you're picking random numbers, but always contains the point your boss randomly asks about".  Okay.  Not really, but some days...)

The not generic versions can be generated via Mathematica's Reduce[] function because Reduce[], unlike Solve[] and Integrate[], does not give generic solutions.

Simplify[
  Reduce[x^4 + b x^3 + f == 0, x, Reals],
  TransformationFunctions -&gt; {Automatic, ToRadicals}
]

(*  (b &lt; 0 &amp;&amp; (
      (f == 0 &amp;&amp; (x == Root[b #1^3 + #1^4 &amp;, 1] || x == Root[b #1^3 + #1^4 &amp;, 4])) || 
      ((0 &lt; f &lt; (27 b^4)/256 || f &lt; 0) &amp;&amp; (x == 0 || 
                                           x == -b )))) || 
    (x == Root[f + b #1^3 + #1^4 &amp;, 1] &amp;&amp; (27 b^4 == 256 f || (b &gt;= 0 &amp;&amp; 256 f &lt; 27 b^4))) || 
    (x == Root[f + b #1^3 + #1^4 &amp;, 2] &amp;&amp; b &gt;= 0 &amp;&amp; 256 f &lt; 27 b^4)
*)


It turns out the behaviour you notice requires $f = 0$ and $b &lt; 0$.  You already have the Root[] expressions for the other cases from Wolfram Alpha.  The conditional ladder/tree shown above may not be optimal.
There's a real root if and only if $256f \leq 27b^4$. I derived this inequality from the derivative to locate the local minimums.

The case is trivial if $b = 0$, so assume $b \neq 0$. Check that the end behavior of the function $g(x) = x^4 + bx^3 + f$ satisfies $g(x) \rightarrow \infty$ as $x \rightarrow \pm \infty$. Thus, there is no guarantee that there exists a real root. Consider the derivative, that is $g'(x) = 4x^3 + 3bx^2 = x^2(4x + 3b)$. It must be the case that $x = 0$ is an inflection point and $x = \frac{-3b}{4}$ is a local minimum since $g''\big(\frac{-3b}{4}\big) = \frac{9b^2}{4}$. Therefore, the function attains a real root if and only if $g\big(\frac{-3b}{4}\big) = f - \frac{27b^4}{256}$ is non-positive.