# Domain and range in Sage Math

How do i find the domain and range in Sage Math of a function:

```
f(x) = x/(x^2-1)
g(x) = e^(-x^2) ?
```

Domain and range in Sage Math

How do i find the domain and range in Sage Math of a function:

```
f(x) = x/(x^2-1)
g(x) = e^(-x^2) ?
```

add a comment

0

Hello,

Be careful that your question is not well defined. In the definition of a function there is already a domain and a codomain (and the range is a subset of the codomain). In particular it makes no sense to compute the domain.

I guess that what you meant is : on which set of numbers the expression XXX is valid ? Remark that this is relatively subtle because an expression like

```
(x^2 - 1) / (x^2 - 1)
```

is not well defined at x=1 since 0 / 0 is not defined.

The question is still not well defined since you might want to consider this expression over the real numbers, the complex numbers, the Riemann sphere or something even more complicated. Depending on the question, you have first to see where the expression makes sense and then to compute the range. For this last computation Sage can currently not help.

Vincent

0

Asked: **
2014-10-26 08:51:29 -0500
**

Seen: **2,350 times**

Last updated: **Oct 26 '14**

Determine domain and range of linear equation?

How to enforce limits to the x-axis in plots?

Limiting the display range of a 3d plot

is there a method to draw fundamental domain for ? 0(N)\Gamma_0(N)

Sage Math Cloud Plotting Error, ValueError: cannot convert x to int

'int' object has no attribute 'is_prime'

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.