Re: Square root of a square
- To: mathgroup at smc.vnet.net
- Subject: [mg108159] Re: Square root of a square
- From: "janjitse at gmail.com" <janjitse at gmail.com>
- Date: Tue, 9 Mar 2010 06:25:25 -0500 (EST)
- References: <201002270813.DAA11868@smc.vnet.net> <4E497595-481A-4F1F-9E33-86865698E172@mimuw.edu.pl>
On Feb 28, 10:52 am, Adam Strzebonski <ad... at wolfram.com> wrote: > Andrzej Kozlowski wrote: > > On 27 Feb 2010, at 09:13, Mariano Su=E1rez-Alvarez wrote: > > >> Hi all, > > >> Mathematica evaluates FullSimplify[Sqrt[x^2]] to Sqrt[x^2], while it > >> tells me that FullSimplify[Sqrt[x^2] == x] is True. > >> Are these the expected answers? > > >> -- m > > > The second certainly not the answer I would expect, in fact this looks to me like a serious (perhaps even "shocking") bug. It certainly contradicts this answer: > > > FindInstance[Sqrt[x^2] != x, x] > > > {{x -> -(109/5) + (11*I)/5}} > > > Andrzej Kozlowski > > It is a bug in V7.0. The function used by FullSimplify to > simplify equations involving holonomic functions does not > handle branch cuts correctly. It can be disabled with > > In[1]:= Unprotect[Holonomic`HolonomicFullSimplify]; > Clear[Holonomic`HolonomicFullSimplify]; > > In[2]:= FullSimplify[Sqrt[x^2] == x] > > 2 > Out[2]= Sqrt[x ] == x > > Best Regards, > > Adam Strzebonski > Wolfram Research This type of error seems to be more wide-spread in Mathematica. The following Mathematica code gives two answers, one of which is incorrect, even after entering the unprotect and clear commands above: DSolve[{y'[x] == 2 y[x] (x Sqrt[y[x]] - 1), y[0] == 1}, y[x], x] {{y[x] -> 1/(-1 + 2 E^x - x)^2}, {y[x] -> 1/(1 + x)^2}} The error appears for me in all Mathematica versions I could test, that is 5.2, 6.0 and 7.0. The first solution can only be imagined to be correct if you assume Sqrt[x^2] ==x. Regards, Jan Jitse Venselaar
- Follow-Ups:
- Re: Square root of a square
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Square root of a square