# solution of $\frac{1}{x}=\infty$

Is there a way to obtain solution $$x=0$$ for the equation $$\frac{1}{x}=\infty$$ in Mathematica?

I tried Solve, Reduce, FindInstance and with different options, but Mathematica keeps beeping on me that system contains an infinite object or it gives {} as answer, meaning no solution. I tried with Infinity and ComplexInfinity.

Maple gives $$x=0$$ as solution.

Why is 0 not a solution to $$\frac{1}{x}=\infty$$ ? Since 1/0 gives ComplexInfinity

Some attempts

ClearAll[x];
eq = 1/x == ComplexInfinity;
Solve[eq, x, Reals, Method -> "Reduce"]
Solve[eq, x]
Reduce[eq, x]
FindInstance[eq, x]
SolveAlways[eq, x]


Maple:

Is there some deep mathematical reason why $$0$$ can not be solution to this equation according to Mathematica, and is there some workaround?

• "Is there some deep mathematical reason why 0 can not be solution to this equation[...]?" 0 doesn't contain any directional information. 1/x with x tending to 0 is infinity if 0 is approached from a positive direction, but what about a negative or imaginary one? Commented Jun 20, 2021 at 17:15
• Why not to solve 1/x==a and then go to a limit? Commented Jun 20, 2021 at 18:24
• As @AlexeiBoulbitch suggested, Limit[x /. Solve[1/x == a, x][[1]], a -> Infinity] Commented Jun 20, 2021 at 18:27
• @AlexeiBoulbitch because I do not know what the equation looks like before hand. This is done in a program, the equation (generated by another part of the program) can be anything and it needs to solve for $x$. It is not an interactive session where one looks at the screen and then decides what to do. Commented Jun 20, 2021 at 18:48
• You can also do something less potentially breaking by using a custom-defined infinity instead of 0 as the value at x==0: infinity /: infinity^(-1) = 0; Solve[(x |-> Piecewise[{{1/x, x != 0}, {infinity, x == 0}}])[s] == infinity, s] Commented Jun 20, 2021 at 21:36

It makes sense on the complex projective line. If you can restrict your computations to that domain, there shouldn't be a problem.

eq = 1/x == ComplexInfinity;
Join @@ Map[
Solve[#, x] &,
1/$$i == 0 /. Solve[eq /. ComplexInfinity ->$$i, $i] ] (* {{x -> 0}} *)  (You can put $i in a Module etc. if you want to turn it into a function.)

• No arithmetic operations are defined on the complex projective space, in particular, on the complex projective line (see Wiki). In complex analysis the complex plane is compactified by adding ComplexInfinity (in WL notation) to continuously extend fractional-linear functions on Union[Complexes,ComplexInfinity], no more and no less (see Encyclopedia of Mathematics). Commented Jun 21, 2021 at 15:35
• I'd like to stress again thar the Riemann sphere is a topological notion, not an algebraic notion. Commented Jun 21, 2021 at 15:44
• It should be "compactified by the addition..." in the above. Commented Jun 21, 2021 at 15:57
• @user64494 I changed the reference. I hope it’s clearer, but the phrase I used (which was never “Riemann sphere”) is still correct. Commented Jun 21, 2021 at 16:29
• @user64494 I repeat: Algebraic geometry has been using rational functions on the projective line/space for over a century. Beyond that, meromorphic functions may be naturally viewed as functions $\Bbb C \rightarrow P^1(\Bbb C)$. See ref. Commented Jun 21, 2021 at 19:47

Because both ComplexInfinity \[Element] Complexes and Infinity \[Element] Reals return False, the equation 1/x==\[Infinity] makes no sense in traditional math. Maple developers must master their math knowledge.

• BTW, the definition 1/0==ComplexInfinity contradicts traditional math. Commented Jun 21, 2021 at 5:09
• See Encyclopedia of Mathematics and Wiki to this end. Commented Jun 21, 2021 at 6:39
• “the equation 1/x==Infinity makes no sense in traditional math” — this is just plain wrong, unless by “traditional” you mean school-kid math. Algebraic geometry has been dealing with such equations for something like 150 years. Commented Jun 21, 2021 at 16:27

There is a way of doing this

expr := Solve[1/x == ComplexInfinity, x]

expr
(* Solve::infc: The system 1/x==ComplexInfinity contains an infinite object ComplexInfinity. *)
(* Solve[1/x == ComplexInfinity, x] *)

Unprotect[Solve];
Solve[1/u_ == ComplexInfinity, u_] := {u -> 0}
Protect[Solve];

expr
(* {x -> 0} *)


As a general rule, I would think this is a very unwise thing to do, but as a bodge to fix a particular problem, it might work.