[BUG] Comparison fails
02-20-2014, 10:56 PM
Post: #1
 Stefan Member Posts: 87 Joined: Dec 2013
[BUG] Comparison fails
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
02-21-2014, 07:18 AM
Post: #2
 parisse Senior Member Posts: 1,093 Joined: Dec 2013
RE: [BUG] Comparison fails
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.
02-21-2014, 07:01 PM
Post: #3
 Stefan Member Posts: 87 Joined: Dec 2013
RE: [BUG] Comparison fails