What is the direct variation equation?
Type one known pair of x and y, and the power n (1 for y = kx). The direct variation calculator finds the constant of variation k, writes the direct variation equation, and gives y at a new x or x at a new y.
- Answer
- y = 30
With y = 3x, y = 30.
- Constant of variation k
- 3
- Equation
- y = 3x
Answer: y = 30. With y = 3x, y = 30.
How to calculate
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.
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.
Method: y = kxⁿ: k = y₁ ÷ x₁ⁿ; then y₂ = k × x₂ⁿ, or x₂ = (y₂ ÷ k)^(1/n), ± for even n.
- 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
Each example is checked against the calculator on every build.
- Power n 1, Known x 4, Known y 12, Find y at a new x, New x 10 gives Answer y = 30, Constant of variation 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
- Power n 3, Known x 2, Known y 25, Find y at a new x, New x 6 gives Answer y = 675, Constant of variation 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
- Power n 3, Known x 2, Known y 25, Find x at a new y, New y 675 gives Answer x = 6.
- Power n 2, Known x 3, Known y 18, Find x at a new y, New y 50 gives Answer x = ±5, Equation y = 2x².
- Power n 1, Known x 0.3, Known y 0.1, Find x at a new y, New y 2 gives Answer x = 6, Constant of variation k 1/3 (0.3333333333), Equation y = (1/3)x.
- Power n 2, Known x 1, Known y 1, Find x at a new y, New y 2 gives Answer x = ±1.414213562.
How it works
Direct variation with power n: y = kxⁿ, with k ≠ 0.
- Constant of variation: k = y₁ ÷ x₁ⁿ from the known pair (x₁, y₁).
- y at a new x: y₂ = k × x₂ⁿ.
- x at a new y: x₂ⁿ = y₂ ÷ k, so x₂ = (y₂ ÷ k)^(1/n). For an even n there are two answers, ±; when y₂ ÷ k is negative and n is even there is no real x. For an odd n, x₂ has the sign of y₂ ÷ k.
Rules. The known x and the known y may not be 0 (x₁ = 0 gives no k, and y₁ = 0 gives k = 0); the page says so. n is a whole number from 1 to 10. Each value is from −10¹² to 10¹².
Exact arithmetic. Each value is read as the exact decimal typed (0.1 is exactly 1/10). k and y₂ are exact fractions. x₂ is exact when y₂ ÷ k is a fraction whose top and bottom are both nth powers of whole numbers below 2⁵³ (9,007,199,254,740,992); otherwise it is the nth root as a decimal number, rounded to 10 significant figures. When that root is too large or too small to show as a number, there is no answer.
Output format. k and each exact answer show as a fraction in lowest terms; when it is not a whole number, its decimal follows in brackets, rounded half up to 10 significant figures. Minus signs are true minus signs. The equation writes y = kxⁿ with the power as a superscript (no power for n = 1), k = 1 left out, k = −1 as −, and a fraction k in brackets: y = (25/8)x³.
Worked examples by hand
y = 12 when x = 4; y at x = 10. k = 12 ÷ 4 = 3, so y = 3x, and y = 3 × 10 = 30.
OpenStax Example 1. y varies with x³; y = 25 when x = 2, so k = 25 ÷ 8 = 25/8 (3.125) and y = (25/8)x³. At x = 6: y = 25/8 × 216 = 675.
The same in reverse. y = 675: x³ = 675 ÷ 25/8 = 216, so x = 6.
y = 18 when x = 3, n = 2; x at y = 50. k = 18 ÷ 9 = 2, y = 2x². x² = 25, so x = ±5.
y = 0.1 when x = 0.3; x at y = 2. k = 0.1 ÷ 0.3 = 1/3 (0.3333333333) exactly, y = (1/3)x, so x = 2 ÷ 1/3 = 6.
y = 1 when x = 1, n = 2; x at y = 2. k = 1, x² = 2, x = ±1.414213562 (±√2).
Other questions people ask
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.