# x/x = 1 at x=0?

How can I find that x/x is undefined at x=0?

Or any way when I write x/x, it returns x/x instead of 1?

add a comment

x/x = 1 at x=0?

How can I find that x/x is undefined at x=0?

Or any way when I write x/x, it returns x/x instead of 1?

add a comment

0

There are a few ways to do this, though I do not know exactly what you need for this so it may or may not fill your needs.

```
sage: f = x.mul(1/x,hold=True)
sage: f
x/x
sage: f(x=3)
1
sage: f(x=0)
<snip>
RuntimeError: power::eval(): division by zero
```

However, this will still give

```
sage: f.derivative(x)
0
```

So I don't know if this is exactly what you want. Also, we still don't have a way to 'unhold' other than simplification at this time.

```
sage: f.simplify()
1
```

Asked: **
2011-02-28 06:45:13 -0500
**

Seen: **85 times**

Last updated: **Feb 28 '11**

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.