# Function domain and range

- Human page: https://happytails.ai/en/calculators/function-domain-and-range/
- Markdown: https://happytails.ai/en/calculators/function-domain-and-range.md
- Structured JSON: https://happytails.ai/agents/en/calculators/function-domain-and-range/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `function-domain-and-range` |
| Category | calculators |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Solves the domain exactly on your device and finds the exact range of polynomial and rational functions, for expressions up to 1,000 characters.

### Inputs and settings

Text input: Function.

Example or placeholder shown in the interface (not a validated fixture):

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

Use one variable, ^ for powers and functions such as sqrt(x) or ln(x). Up to 1,000 characters. Review the settings before running.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `variable` | Variable | text | "x" |  |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Functions are limited to 1,000 characters, one variable, 24 nesting levels, 100 digits per number, 4 abs terms and polynomial factors up to degree 24. Everything is computed on your device in a background worker with a 15 second limit. Downloads are a JSON report and a CSV of points.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "function-domain-and-range",
  "category": "calculators",
  "built": true,
  "requirements": "Functions are limited to 1,000 characters, one variable, 24 nesting levels, 100 digits per number, 4 abs terms and polynomial factors up to degree 24. Everything is computed on your device in a background worker with a 15 second limit. Downloads are a JSON report and a CSV of points.",
  "implementation": {
    "fields": [
      {
        "key": "variable",
        "label": "Variable",
        "value": "x",
        "type": "text",
        "maxLength": 4,
        "help": "One letter other than e, optionally followed by digits, such as x or t."
      }
    ],
    "presentation": "metrics",
    "inputCodeDirection": "ltr",
    "registrationFamily": "exact-math-functions",
    "inputMaxLength": 1000,
    "inputErrorCode": "EXACT_MATH_FUNCTIONS_EXPRESSION_TOO_LONG",
    "note": "Solves the domain exactly on your device and finds the exact range of polynomial and rational functions, for expressions up to 1,000 characters.",
    "experience": {
      "automatic": false,
      "single": true,
      "inputMaxLength": 1000,
      "inputMode": "text",
      "label": "Function",
      "placeholder": "(x^2 - 1)/(x^2 - 4)",
      "help": "Use one variable, ^ for powers and functions such as sqrt(x) or ln(x). Up to 1,000 characters. Review the settings before running.",
      "helpParts": [
        "Use one variable, ^ for powers and functions such as sqrt(x) or ln(x).",
        "Up to 1,000 characters.",
        "Review the settings before running."
      ],
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Find the exact domain of a function and, for polynomial and rational functions, its exact range. Excluded values and irrational endpoints such as sqrt(2) are shown exactly.

### How to use Function domain and range

1. Type the function, such as (x^2 - 1)/(x^2 - 4).
2. Check the variable name.
3. Run the calculation and read the domain, the range and the listed endpoints.
4. Download the JSON report or the CSV of points.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

## Useful next steps

- [Graphing calculator](https://happytails.ai/en/calculators/graphing-calculator/) ([Markdown](https://happytails.ai/en/calculators/graphing-calculator.md))

- [Quadratic formula calculator](https://happytails.ai/en/calculators/quadratic-formula/) ([Markdown](https://happytails.ai/en/calculators/quadratic-formula.md))

- [Slope calculator](https://happytails.ai/en/calculators/slope-calculator/) ([Markdown](https://happytails.ai/en/calculators/slope-calculator.md))

Functions are limited to 1,000 characters, one variable, 24 nesting levels, 100 digits per number, 4 abs terms and polynomial factors up to degree 24. Everything is computed on your device in a background worker with a 15 second limit. Downloads are a JSON report and a CSV of points.

## Domain

The tool collects every condition the expression needs: denominators not equal to zero, square roots and fractional powers of nonnegative values, logarithms of positive values, and asin or acos of values between -1 and 1. It solves them exactly with Sturm sequences and sign charts. Method: OpenStax, College Algebra 2e, section 3.2 Domain and Range (2021); Basu, Pollack and Roy, Algorithms in Real Algebraic Geometry, chapter 2 (2006).

### Range

For polynomial and rational functions, including abs terms, the real line is split at critical points, excluded values and domain endpoints. On each piece the function is monotone, so the range is built from exact values and limits. Values that would need roots of degree 3 or higher are refused instead of guessed.

### What is refused

Ranges of functions with sqrt, logarithms, trigonometric functions, pi or e are not computed, and domains with infinitely many exclusions such as tan(x) are rejected. The report says why.
