       Re: Mathematica 6.01 does not know one can not divide by 0??

• To: mathgroup at smc.vnet.net
• Subject: [mg107221] Re: Mathematica 6.01 does not know one can not divide by 0??
• From: JH <jlucio at ubu.es>
• Date: Fri, 5 Feb 2010 07:13:41 -0500 (EST)
• References: <hkean1\$stj\$1@smc.vnet.net>

```OK, it seems Mathematica always tries to simplify an expression (for
example cancelling common factors in fractions) before evaluating it:
for instance

Simplify[(3 (x - 2))/(x - 2), x == 2]

gives 3 (even expressing the condition that x==2!!) or

N[(3 (x - 2))/(x - 2) /. x -> 2] or simply

(3 (x - 2))/(x - 2) /. x -> 2 ....

also give 3.

Clearly Mathematica first cancels, simplifies, then evaluates, unless
it is obliged to do the opposite:

N[3 (x - 2) /. x -> 2]/N[(x - 2) /. x -> 2] or

Evaluate[3 (x - 2) /. x -> 2]/Evaluate[(x - 2) /. x -> 2]

give the correct? answer: "... Indeterminate expression ..."

I'm not sure: is mathematically legal ALWAYS to cancel common factors
in a fraction (i.e. simplify an expression) without (before) taking
into account special cases?

This difference (general or generic solution vs complete solution)
sounds to the difference between SOLVE and REDUCE. Perhaps

Solve[(3 (x - 2))/(x - 2) == y, y] (gives {{y -> 3}}) should be right

but

Reduce[(3 (x - 2))/(x - 2) == y] (gives y == 3) should give

x==2 && y==Indeterminate || x!=2 && y==3,    NO?????

JH

```

• Prev by Date: Re: Can Mathematica interpolate non-uniform scatter data?