From: Christoph Lhotka on 9 Mar 2010 06:17 hi, the concept of testing the algebraic equality/inequality of algebraic expressions is indeed one of the most complex issues to do (it is easy for you, because you already did it - and see it) but not easy from an algorthmic point of view! I would suggest 3 things: 1) try to find a normal form for the expressions, so they can be compared easily: PowerExpand[r^2 Sqrt[(r^3 + r + 2)/r] - Sqrt[r^3 (r^3 + r + 2)]] 0 2) use Simplify with all its power using Assumptions (are the any conditions on the subexpressions, are they real/positive/etc...). e.g. Simplify[r^2 Sqrt[(r^3 + r + 2)/r] - Sqrt[r^3 (r^3 + r + 2)],r>0] will work, but r<0, etc unfortunatly not. 3) it is easy to implement the identites you (really) know into Mathematica by using rules. whatIknow= { r_^2 Sqrt[(r_^3 + r_ + 2)/r_] - Sqrt[r_^3 (r_^3 + r_ + 2)]->0, r_^2 Sqrt[(r_^3 + r_ + 2)/r_] -> - Sqrt[r^3 (r^3 + r + 2)], .... }; This looks laborous, but after a while you while have a list of things, you know and Mathematica can immediatly apply to your expressions: r^2 Sqrt[(r^3 + r + 2)/r] - Sqrt[r^3 (r^3 + r + 2)]/.whatIknow 0 or combine 1), 2) and 3) ! Christoph On Mo, 8.03.2010, 12:09, mmdanziger wrote: > This isn't the first time that I've encountered something like this in > Mathematica but in my calculations I got a term like this: > > r^2 Sqrt[(r^3 + r + 2)/r] - Sqrt[r^3 (r^3 + r + 2)] > > Which is obviously identically zero. For some reason Simplify or even > FullSimplify can't figure this out. Once you get dependent on > Mathematica these things are pretty disturbing...you forget about your > own knowledge because the program tells you that things are > different. Then you sit there like an idiot checking an algebraic > identity that any beginning precalc student should be able to solve no > problem. > > Is there any way to get Mathematica to "wake up" to these things? It > has such a powerful algebraic engine for most things, why can't it see > something simple like the above? Do you really have to manually > override and tell the program when things should be zero? > > For the time being I'll just sift through and test things by hand but > I can't believe that there isn't a better way. > > Best, > md >
From: DrMajorBob on 9 Mar 2010 06:20 Your expression is NOT identically zero, since, for instance: r^2 Sqrt[(r^3 + r + 2)/r] - Sqrt[r^3 (r^3 + r + 2)] /. r -> I -2 + 2 I When r is Real, on the other hand: r^2 Sqrt[(r^3 + r + 2)/r] - Sqrt[r^3 (r^3 + r + 2)] // PowerExpand 0 Bobby On Mon, 08 Mar 2010 05:09:56 -0600, mmdanziger <mmdanziger(a)gmail.com> wrote: > This isn't the first time that I've encountered something like this in > Mathematica but in my calculations I got a term like this: > > r^2 Sqrt[(r^3 + r + 2)/r] - Sqrt[r^3 (r^3 + r + 2)] > > Which is obviously identically zero. For some reason Simplify or even > FullSimplify can't figure this out. Once you get dependent on > Mathematica these things are pretty disturbing...you forget about your > own knowledge because the program tells you that things are > different. Then you sit there like an idiot checking an algebraic > identity that any beginning precalc student should be able to solve no > problem. > > Is there any way to get Mathematica to "wake up" to these things? It > has such a powerful algebraic engine for most things, why can't it see > something simple like the above? Do you really have to manually > override and tell the program when things should be zero? > > For the time being I'll just sift through and test things by hand but > I can't believe that there isn't a better way. > > Best, > md > -- DrMajorBob(a)yahoo.com
|
Pages: 1 Prev: PlotLegend interferes with Graphics Next: Using NMinimize on a vector |