# What is the direct variation equation?

Finds the constant of variation k in y = kx or y = kxⁿ from one pair of values, writes the equation, and gives y at a new x or x at a new y, in exact fractions.

- Page: https://www.acalculator.org/math/direct-variation-calculator
- JSON spec: https://www.acalculator.org/math/direct-variation-calculator.json
- Version: 3f715c4e6847

## Default answer

Example with the default inputs (Power n 1, Known x 4, Known y 12, Find y at a new x, New x 10): With y = 3x, y = 30.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| n | Power n | y varies directly with the nth power of x: 1 for y = kx, 2 for y = kx², and so on to 10. |
| x1 | Known x | The x of a known pair. |
| y1 | Known y | The y that goes with the known x. |
| find | Find | Find y at a new x, or x at a new y. |
| x2 | New x | The x at which to find y. |
| y2 | New y | The y at which to find x. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| answer | Answer | The new y, or the new x. |
| k | Constant of variation k | k = y ÷ xⁿ from the known pair. |
| equation | Equation | The direct variation equation y = kxⁿ. |

## Method

y = kxⁿ: k = y₁ ÷ x₁ⁿ; then y₂ = k × x₂ⁿ, or x₂ = (y₂ ÷ k)^(1/n), ± for even n.

## Assumptions

- The known x and y are not 0, so k is not 0. Values are read as the exact decimals typed.
- n is a whole number from 1 to 10; an even n gives two values of x, ±.

## Worked examples

1. n = 1, x1 = 4, y1 = 12, find = y, x2 = 10 gives answer = y = 30, k = 3, equation = y = 3x. Source: OpenStax, Algebra and Trigonometry 2e, §5.8 Modeling Using Variation (y = kxⁿ, k = y ÷ xⁿ), https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-8-modeling-using-variation.
2. n = 3, x1 = 2, y1 = 25, find = y, x2 = 6 gives answer = y = 675, k = 25/8 (3.125), equation = y = (25/8)x³. Source: OpenStax, Algebra and Trigonometry 2e, §5.8 Modeling Using Variation, Example 1 (y varies with x³; y = 25 at x = 2 gives k = 25/8 and y = 675 at x = 6), https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-8-modeling-using-variation.
3. n = 3, x1 = 2, y1 = 25, find = x, y2 = 675 gives answer = x = 6.
4. n = 2, x1 = 3, y1 = 18, find = x, y2 = 50 gives answer = x = ±5, equation = y = 2x².
5. n = 1, x1 = 0.3, y1 = 0.1, find = x, y2 = 2 gives answer = x = 6, k = 1/3 (0.3333333333), equation = y = (1/3)x.
6. n = 2, x1 = 1, y1 = 1, find = x, y2 = 2 gives answer = x = ±1.414213562.

## FAQ

### What is direct variation?

y varies directly with x when y = kx for a constant k that is not 0. Doubling x doubles y. More generally, y varies directly with the nth power of x when y = kxⁿ.

### How do I find the constant of variation?

Divide y by x (or by xⁿ) for any known pair. If y = 12 when x = 4, k = 12 ÷ 4 = 3 and the equation is y = 3x.

### How do I solve a direct variation problem?

Find k from the known pair, write y = kxⁿ, then put in the new value. OpenStax: y varies with x³ and y = 25 when x = 2, so k = 25/8, and at x = 6, y = (25/8) × 216 = 675.

### How do I find x from y?

Divide y by k, then take the nth root: x = (y ÷ k)^(1/n). For y = 2x² and y = 50, x² = 25, so x = ±5. An even power gives two answers, and no real x when y ÷ k is negative.

### How is direct variation different from a linear function?

y = kx is a line through the origin. A line y = mx + b with b ≠ 0 is linear but not direct variation, because y ÷ x is not constant.

### Can k be negative?

Yes, as long as it is not 0: then y gets smaller as x gets larger. OpenStax treats k > 0 in its examples; the same formulas hold for a negative k.

## Sources

- OpenStax, Algebra and Trigonometry 2e, §5.8 Modeling Using Variation (direct variation y = kxⁿ, k the constant of variation; Example 1: y varies with x³, y = 25 when x = 2, so k = 25/8 and y = 675 when x = 6). https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-8-modeling-using-variation (retrieved 2026-10-05)
