# HP Forums

Full Version: [BUG] Comparison fails
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The following comparison fails (which is true when you do it by hand):
$$\frac{\partial \left( \frac{x^n}{n^3\cdot\left(1+x^n\right)}\right)}{\partial x} =\frac{x^{n-1}}{n^2\cdot(x^n)^2+2\cdot n^2\cdot x^n+n^2}== \frac{x^{n-1}}{n^2\cdot\left(1+x^n\right)^2}$$

(The term in the middle is what the differential is solved to by the Prime. It doesn't matter whether it is compared directly to the differential or to the solution).
It also doesn't matter whether you make the following assumptions about x and n:
n Integer and >0
x >0
It's not a bug. == checks if the expressions are the same, not if they are mathematically equivalent. To do that the easiest is to simplify the difference between both sides and check if it's 0 or not. The reason is that automatic simplification may fail and would cost time, it's better to leave the programmer/user simplify himself (here factor should work for example), and that's what all CAS do.