方程式ソルバー
一次方程式、二次方程式、三次方程式、連立方程式をステップバイステップの計算過程で解きます。
このツールについて
係数を入力すると、ソルバーは4種類の方程式を処理します:一変数一次方程式(ax + b = c)、実数根と複素数根を持つ二次方程式(ax² + bx + c = 0)、クラメルの法則による2×2線形方程式系、ニュートン-ラフソン反復法による三次方程式(ax³ + bx² + cx + d = 0)。すべての解にはステップバイステップの計算過程が含まれ、有理数根は分数で表示されます。
使い方
- 1 上部のタブボタンを使用して方程式の種類を選択してください。
- 2 表示された入力フィールドに必要な係数を入力してください。
- 3 「解く」をクリックして解を計算してください。
- 4 結果の下に表示されるステップバイステップの計算過程を読んで、使用された手法を理解してください。
What this solver covers
This tool solves four of the equation types you meet most often in algebra and early calculus, each with full step-by-step working rather than just an answer:
- Linear —
ax + b = c, one unknown, one solution. - Quadratic —
ax² + bx + c = 0, solved by the quadratic formula, including complex roots. - 2×2 system — two linear equations in
xandy, solved by Cramer's rule. - Cubic —
ax³ + bx² + cx + d = 0, solved numerically.
A useful detail: the solver tries to express answers as exact fractions when it can. Internally it searches for a small denominator that reproduces the decimal result, so a root of 0.5 is shown as 1/2 and 1.333… as 4/3, falling back to a rounded decimal only when no clean fraction fits. Everything runs in your browser, so it works offline and nothing you type is sent anywhere.
How the quadratic case works — a worked example
Take the default x² − 3x + 2 = 0 (so a=1, b=−3, c=2). The solver computes the discriminant first: Δ = b² − 4ac = 9 − 8 = 1. The sign of Δ decides everything:
| Discriminant | Meaning | Roots |
|---|---|---|
| Δ > 0 | Two distinct real roots | x = (−b ± √Δ) / 2a |
| Δ = 0 | One repeated real root | x = −b / 2a |
| Δ < 0 | Two complex conjugate roots | x = (−b ± i√−Δ) / 2a |
Here Δ = 1 > 0, so x = (3 ± 1) / 2, giving x₁ = 2 and x₂ = 1. Change c to 5 and the discriminant becomes 9 − 20 = −11; the solver switches to complex output and reports the conjugate pair built from the real part −b/2a and the imaginary part √11 / 2. This is the value of seeing the working: the discriminant tells you the character of the solutions before you ever reach the final line.
Systems and the determinant
For a 2×2 system ax + by = c and dx + ey = f, the solver uses Cramer's rule. It computes the determinant D = ae − bd. If D is non-zero there is exactly one solution: x = (ce − bf)/D and y = (af − cd)/D. If D = 0 the two lines are either parallel (no solution) or the same line (infinitely many), and the tool tells you there is no unique solution rather than dividing by zero. Geometrically, the determinant measures whether the two lines actually cross at a single point.
How the cubic is solved (and what that means for you)
The cubic solver does not use the closed-form Cardano formula. Instead it applies Newton–Raphson iteration from several starting guesses (spread from −10,000 to +10,000), keeping each distinct value of x where the equation evaluates to essentially zero. This is robust and finds all the real roots, and the tool reports a residual like f(x) ≈ 2e-9 so you can see how close each root is. Two practical consequences follow: a cubic with one real root and two complex roots will show only the single real root here, and roots are found numerically, so they are extremely accurate but expressed as the nearest clean fraction or a rounded decimal rather than a symbolic surd like ∛2.
Common mistakes the tool helps you avoid
- Putting the quadratic in the linear box. The linear solver expects
ax + b = c. If you enter a quadratic by settinga = 0, it correctly refuses and points you to the right tab. The quadratic tab likewise rejectsa = 0and sends you to the linear solver. - Sign errors in the formula. The most common hand-calculation bug is mishandling the
−bterm whenbis already negative. Because the tool prints each substitution explicitly, you can compare your scratch work line by line and find exactly where a sign flipped. - Forgetting the "= c" side. A linear equation here is
ax + b = c, notax + b = 0. To solve2x + 3 = 0, enterc = 0. - Expecting complex roots from the cubic tab. If a cubic returns fewer than three roots, the missing ones are complex; the numerical method here reports real roots only.
- Reading the fraction as the only truth. When a root is irrational, the fraction shown is a close rational approximation (note the
≈). For exact irrational answers, treat the decimal as the precise value and the fraction as a readable hint.
Used well, the step-by-step output makes this more than an answer key: it is a way to check your own algebra and to see why an equation has the number and type of solutions it does.