# Re: Solve, Plot and limits

*To*: mathgroup@smc.vnet.net*Subject*: [mg10847] Re: Solve, Plot and limits*From*: Adam Strzebonski <adams@wolfram.com>*Date*: Tue, 10 Feb 1998 21:01:57 -0500*Organization*: Wolfram Research, Inc.*References*: <6bbqej$ppc$7@dragonfly.wolfram.com>

You need to take into account the order in which Mathematica evaluates expressions. Solve does not have HoldAll or HoldFirst attributes, so the equation is evaluated before Solve gets to look at it: In[1]:= x/x+x==1 Out[1]= 1 + x == 1 So the actual equation that is solved is 1+x==1, and 0 is its correct solution. Adam Strzebonski Wolfram Research Andrzej Kozlowski wrote: > Subject: [mg10847] Solve, Plot and limits > mathgroup@smc.vnet.net > > >Subject: [mg10847] Re: > >Sent: 1/30/98 3:31 PM > >Received: 2/1/98 9:09 AM > >From: seanross@worldnet.att.net To: mathgroup@smc.vnet.net > >To: mathematica users group, mathgroup@smc.vnet.net > > Andrzej Kozlowski, andrzej@tuins.ac.jp > > > >Andrzej Kozlowski wrote: > >> > >> In article <6ahorb$pkh@smc.vnet.net>, seanross@worldnet.att.net wrote: > >> > >> > alok. menghrajani wrote: > >> > > > >> > > Hi, > >> > > > >> > > I'm 16 and I can't understand how I (why me?) found this bug in > >> > > mathematica. It's such a silly thing: > >> > > > >> > > Solve [x/x+x=1, x] returns x=0 but if x=0 then x/x has no sence! > >> > > > >> > > Bye, ALok > >> > > > >> > > (Pls reply to my email: robot@writeme.com) > >> > > >> > > >> > Its not a bug. You are missing a pre-calculus course in limits. Perhaps > >> > your high school offers one. > >> > >> It may sound very pedantic but I must say I feel this reply is a little > >> unfair to Alok. The equation x/x+x== 1 is an algebraic equation and > >> the solution {x->0} is certainly incorrect. I would fail any of my > >> students who claimed it was. > > > >On what basis do you argue that x/x+x==1 being solved by x->0 is > >"certainly" incorrect? Your comment about modular equations is > >irrelevant since we aren't dealing with modular arithmetic. > >Try, for example: > > > >Plot[x/x+x-1,{x,.001,10}] > > > >To see where the limit points to. I also disagree with calling this > >certain equation "algebraic", which indicates that it is soluble by > >methods of algebra as opposed to a trancendental equation which is not. > >x/x+x==1 is soluble by algebra except at the point x->0 in which case, > >limits are necessary. > > > >Since you would "fail" me for saying x->0 was a solution to the > >equation, what would you tell me the correct answer was? I can't find > >any other real solutions besides zero. > > > >-- > >Remove the _nospam_ in the return address to respond. > 1. Cancelling x's in x/x has nothing to do with "taking limits". If > Mathematica is "taking limits" why does Solve[Sin[x]/x+x==1,x] not work? > > 2. To find the correct solution try Solve[{x/u+x==1,x==u},{x,u}] > The answer is {}, in other words there is no solution. Try it > yourself.(This time Mathematica uses Groenber basis to solve the > equations and so it never needs to cancel x/x) Now, if the other > answwer is correct than this presumabl is a bug? Or do you claim that > these equations are not equivalent? > > Finally, the documentation for Solve mentions nothing at all about any > limits. On the contrary, all the techniques involved work for equations > over fields of charactersitic 0, and that is also why they can be > modified to solve modular equations.This fact excludes any possibility > of using limits. On the other hand, Plots of course work only for real > numbers, and then it does make sense to talk of limits. That is why > Plot[Sin[x]/x+x-1,{x,-Pi,Pi}] does work while Solve[Sin[x]/x+x==1,x] > does not. > > Andrzej Kozlowski > Department of Mathematics > Toyama International University > Japan

**Re: How to change the argument of a function?**

**Re: nasty integrals that Mathematica can't do**

**Solve, Plot and limits**

**Re: Solve, Plot and limits**