Solve x^2 - 5x + 6 = 0.
Show the steps
- Roots of a quadratic equationx = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}with
a = 1, b = -5, c = 6→x1 = 2, x2 = 3, discriminant = 1
Arithmetic, fractions, percentages, ratios, algebraic equations and inequalities, functions, exponentials and logarithms, trigonometry, precalculus and complex numbers.
Math Foundations (math-foundations-ai999x) is an offline Python package for math foundations. It covers arithmetic, fractions, percentages, ratios, algebraic equations and inequalities, functions, exponentials and logarithms, trigonometry, precalculus and complex numbers.
It has 100 capabilities — 100 computational procedures — in 31 topics, the largest being Trigonometry, Arithmetic, Algebra, Functions, Precalculus and Exponentials and logarithms. Ask a question in words with ask(), or call a capability by name with typed inputs with solve(). Every answer carries its value and unit, the steps that produced it and the formula in LaTeX.
When a question is not determined — a value is missing, an input is out of range, or the request is outside the package — it says so and names what it needs, instead of guessing. It runs on an ordinary CPU without a network connection (Python >=3.10), and the same question always gets the same answer.
pip install math-foundations-ai999x hf download AI999X/math-foundations-ai999x --local-dir math-foundations-ai999x
Each question below was put to math-foundations-ai999x and the answer shown is the one it returned, with the steps it took.
Solve x^2 - 5x + 6 = 0.
a = 1, b = -5, c = 6x1 = 2, x2 = 3, discriminant = 1In triangle ABC, a = 8, b = 10 and A = 40 degrees. Solve the triangle.
a = 8, b = 10, A = 40count = 2, B1 = 53.46414901, C1 = 86.53585099, c1 = 12.42304969, B2 = 126.535851, C2 = 13.46414901, c2 = 2.897839169Compute (3 + 2i) / (1 - i).
a = 3, b = 2, c = 1, d = -1, op = /re = 0.5, im = 2.5Find the coefficient of x^3 in (2x - 1)^5.
a = 2, b = -1, n = 5, k = 3coefficient = 80, binomial = 10m.solve("de_moivre_power", a=1, b=1, n=8) a = 1, b = 1, n = 8re = 16, im = 0, modulus = 16, argument_deg = 0Solve |2x + 3| < 7.
a = 2, b = 3, c = 7, rel = <lower = -5, upper = 2, region = between, solution = -5 < x < 2Compute 3/4 + 5/6 as a fraction in lowest terms.
a = 3, b = 4, c = 5, d = 6, op = +numerator = 19, denominator = 12, value = 1.583333333Find the centre and radius of x^2 + y^2 - 4x + 6y - 3 = 0.
dd = -4, ee = 6, ff = -3h = 2, k = -3, rad = 4Every snippet was run as shown; the output under it is what it printed.
import math_foundations_ai999x as m
a = m.ask("Solve x^2 - 5x + 6 = 0.")
print(a.outcome)
print(a.values)
for step in a.steps:
print(step["name"])SOLVED
{'x1': 2.0, 'x2': 3.0, 'discriminant': 1.0}
Roots of a quadratic equation
import math_foundations_ai999x as m
a = m.solve("de_moivre_power", a=1, b=1, n=8)
print(a.outcome)
print(a.values)SOLVED
{'re': 16.0, 'im': 0.0, 'modulus': 16.0, 'argument_deg': 0.0}
import math_foundations_ai999x as m
# an input is missing: the answer says what it needs instead of guessing
a = m.solve("de_moivre_power")
print(a.outcome)
print(a.message)NEEDS_INPUT
de_moivre_power needs a, b, n (real part; imaginary part; the power n). Example: solve('de_moivre_power', a=1, b=1, n=8).
math-foundations-ai999x "Solve x^2 - 5x + 6 = 0."
x1 = 2, x2 = 3, discriminant = 1 1. Roots of a quadratic equation: quadratic formula in a numerically stable form (q = -(b + sign(b)*sqrt(b^2 - 4ac))/2, x = q/a and c/q) with a = 1, b = -5, c = 6 -> x1 = 2, x2 = 3, discriminant = 1 Assumptions: a != 0 (otherwise the equation is linear); real coefficients …
Every value in these figures was computed by the package, each point a run of solve(); in a notebook, plot() and plot_relation() draw a capability's curves the same way.
12 of its 100 formulas; every one is in the capability browser below.
Search by name, formula, input or topic. Each capability opens to show what it takes, what it returns, when it applies, and a question it answered.
abs_linear_inequalitySolve |a*x + b| < c, <= c, > c or >= c (c > 0): the two boundary points and whether x lies between or outside them.
a coefficient of x inside the barsb constant inside the barsc the bound (positive)rel the comparison choicelower the smaller boundary pointupper the larger boundary pointregion between (for < and <=) or outside (for > and >=)solution the solution setfactor_quadratic_integerFactor a*x^2 + b*x + c with whole-number coefficients as g(px + q)(rx + s), or say that it does not factor over the integers.
a coefficient of x^2 (not 0) integerb coefficient of x integerc constant term integerg common factor (sign of a)p x-coefficient of the first factorq constant of the first factorr x-coefficient of the second factors constant of the second factorfactored the factored formpartial_fractions_linearWrite (p*x + q)/((x - r1)(x - r2)) as A/(x - r1) + B/(x - r2).
p coefficient of x in the numeratorq constant of the numeratorr1 root of the first factor x - r1r2 root of the second factor x - r2 (r2 != r1)A numerator over x - r1B numerator over x - r2polynomial_long_divisionDivide one polynomial by another: quotient and remainder, with p = q*d + r and deg r < deg d.
dividend coefficients of the dividend, highest power first vectordivisor coefficients of the divisor, highest power first (degree >= 1) vectorquotient coefficients of the quotient, highest power firstremainder coefficients of the remainder, highest power firstquadratic_inequalitySolve a*x^2 + b*x + c < 0 (or <=, >, >=) when the quadratic has two distinct real roots.
a coefficient of x^2b coefficient of xc constant termrel the comparison with 0 choicer1 the smaller rootr2 the larger rootregion between or outside the rootssolution the solution setradical_equationSolve sqrt(a*x + b) = c*x + d: square, solve, and keep only the roots that satisfy the original equation.
a coefficient of x under the rootb constant under the rootc coefficient of x on the rightd constant on the rightcount number of solutions (0, 1 or 2)solutions the solutions, ascendingextraneous roots of the squared equation that fail the original (extraneous)rational_equationSolve a/(x + b) = c/(x + d) for x, rejecting a candidate that makes a denominator 0.
a numerator on the leftb constant in the left denominator x + bc numerator on the rightd constant in the right denominator x + dx the solutionrational_rootsEvery rational root of a polynomial with whole-number coefficients (degree up to 8).
coefficients whole-number coefficients, highest power first vectorcount number of distinct rational rootsroots the rational roots, ascendingroots_exact the rational roots as fractionsinfinite_geometric_seriesa + a*r + a*r^2 + ... = a/(1 - r) for |r| < 1 (a refusal when the series diverges).
a the first termr the common ratio, |r| < 1sum the sum to infinitysynthetic_divisionDivide a polynomial by x - r: the quotient's coefficients and the remainder, which equals p(r).
coefficients coefficients of the dividend, highest power first (2x^3 - 5x + 1 -> 2, 0, -5, 1) vectorr the number r of the divisor x - rquotient coefficients of the quotient, highest power firstremainder the remainder = p(r)linear_system_3x3Solve three linear equations in x, y and z (a unique solution, or a refusal when there is none).
augmented augmented matrix, one row a b c d per equation a*x + b*y + c*z = d matrixx xy yz zfraction_arithmeticAdd, subtract, multiply or divide two fractions a/b and c/d; the result in lowest terms.
a numerator of the first fraction integerb denominator of the first fraction (not 0) integerc numerator of the second fraction integerd denominator of the second fraction (not 0) integerop the operation choicenumerator numerator of the result in lowest termsdenominator denominator of the result (positive)value the result as a decimalratio_splitShare a total in the ratio a:b (or a:b:c).
total the quantity to sharea first term of the ratio (positive)b second term of the ratio (positive)c third term of the ratio (optional, positive) optionalpart1 first sharepart2 second sharepart3 third share (a three-term ratio only)order_of_operationsThe exact value of an arithmetic expression with + - * / ^ and parentheses, following the order of operations.
expression the expression, e.g. 3 + 4 * (2 - 5)^2 / 6 textvalue the valuenumerator numerator of the exact value in lowest termsdenominator denominator of the exact valuepercent_changeThe percent change from an original value to a new value (negative for a decrease).
old the original value (positive)new the new valuepercent_change percent change (negative = decrease)difference new - olddirection increase, decrease or no changepercent_of_numberp% of x: the part that p per cent of x amounts to.
p the percentage p (per hundred)x the whole xresult p% of xround_decimal_placesRound a number to n decimal places (or to the nearest tenth, hundredth, ten, hundred ...), halves away from zero.
x the number to roundn decimal places (negative: tens, hundreds) integerrounded the rounded numberround_significant_figuresRound a nonzero number to n significant figures, halves away from zero.
x the number to round (not 0)n number of significant figures integerrounded the rounded numberscientific_notationWrite a nonzero number as m × 10^e with 1 <= |m| < 10.
x the number (not 0)mantissa m, with 1 <= |m| < 10exponent the integer power of ten eproportion_solveSolve n1/d1 = n2/d2 for the one unknown term x (in any of the four positions).
p the first known term (reading n1, d1, n2, d2 in order)q the second known termr the third known termposition where the unknown x stands choicex the unknown termunit_rate_compareThe unit rate (amount per one unit) of an offer, and of a second offer with which is cheaper per unit.
n1 quantity of the first offer (positive)c1 amount (price, distance, ...) of the first offern2 quantity of the second offer (optional) optionalc2 amount of the second offer (optional) optionalunit_rate_1 amount per unit, first offerunit_rate_2 amount per unit, second offerbetter the offer with the lower amount per unit: first, second or equalwhat_percentThe percentage p such that `part` is p% of `whole`.
part the partwhole the whole (not 0)percent part as a percentage of wholepercent_of_whatThe whole w of which `part` is p per cent (part is p% of what number?).
part the known partp the percentage that the part is of the wholewhole the wholecomplex_arithmetic(a + bi) + - * / (c + di) in the form re + im*i.
a real part of the first numberb imaginary part of the first numberc real part of the second numberd imaginary part of the second numberop the operation choicere real part of the resultim imaginary part of the resultcomplex_modulus_argument|z| and the principal argument (-180, 180] degrees of z = a + bi, and z in polar form.
a real partb imaginary partmodulus |z|argument_deg principal argument, degrees in (-180, 180]argument_rad principal argument, radianspolar z = r(cos t + i sin t)de_moivre_power(a + bi)^n for a whole number n (|n| <= 40): real and imaginary parts, modulus and argument.
a real partb imaginary partn the power n integerre real part of z^nim imaginary part of z^nmodulus |z^n| = |z|^nargument_deg argument of z^n, degreescomplex_product_modulusThe product (a + b*i)(c + d*i) = re + im*i and the modulus of the product.
a real part of the first numberb imaginary part of the first numberc real part of the second numberd imaginary part of the second numberre real part of the productim imaginary part of the productmodulus modulus of the productcomplex_nth_rootsAll n complex n-th roots of z = a + bi (n from 2 to 12), ordered by argument from 0 to 360 degrees.
a real part of zb imaginary part of zn which roots (2 = square roots) integermodulus the common modulus |z|^(1/n)count the number of roots, nroots the roots, by argument in [0, 360)circle_from_general_formFor x^2 + y^2 + D*x + E*y + F = 0, the centre (h, k) and radius rad.
dd coefficient D of xee coefficient E of yff constant Fh x-coordinate of the centrek y-coordinate of the centrerad radiusdistance_between_pointsThe distance between (x1, y1) and (x2, y2) in the plane.
x1 x-coordinate of the first pointy1 y-coordinate of the first pointx2 x-coordinate of the second pointy2 y-coordinate of the second pointdist distancecounting_choicesThe number of ways to choose k items from n without order (combinations) and with order (permutations).
n number of items to choose from (a whole number)k number of items chosen (a whole number, k <= n)combinations C(n, k) = n! / (k! (n - k)!)permutations P(n, k) = n! / (n - k)!compound_interestThe amount after t years when a principal is compounded n times a year at an annual rate r (a decimal).
principal starting amountr annual interest rate as a decimaln compounding periods per yeart time in yearsamount amount after t yearsdoubling_timeThe time for a quantity growing as N = N0*e^(k*t) to double, for a growth constant k > 0.
k continuous growth constant per unit timetd doubling timehalf_life_remainingThe amount left after time t of a substance with half-life T: N0 * (1/2)^(t/T).
n0 initial amount (positive)half_life the half-life T (positive)t elapsed time, in the unit of Tremaining amount remaining (in the unit of N0)fraction fraction remainingcontinuous_growthN(t) = N0 * e^(k t) for continuous growth (k > 0) or decay (k < 0), including continuous compounding.
n0 initial amount N0k continuous rate per unit time, as a decimal (0.03 for 3%; negative for decay)t elapsed time, in the rate's unitamount N(t)doubling_time_percentThe time for a quantity growing by r% per period (compounded once per period) to double.
r growth rate per period, in percent (positive)doubling_time periods to double (exact)rule_of_70_estimate the rule-of-70 approximation 70/rlog_evaluatelog_b(x) for a positive base b != 1 and x > 0 (log is base 10, ln base e).
b the base (positive, not 1)x the number (positive)value log_b(x)exponential_equation_generalSolve a * b^(c*x + d) = k for x by taking logarithms.
a the coefficient ab the base (positive, not 1; e for the natural base)c coefficient of x in the exponentd constant in the exponentk the right-hand sidex the solutionlog_laws_combineGiven log_b(M) = u and log_b(N) = v, the value of log_b(M^p * N^q) (quotients and roots included).
u log_b(M)v log_b(N)p power of Mq power of N (negative: N in the denominator)value log_b(M^p N^q)log_equation_linear_argumentSolve log_b(c*x + d) = k for x by rewriting it in exponential form.
b the base (positive, not 1; 10 for log, e for ln)c coefficient of x in the argumentd constant in the argumentk the right-hand sidex the solutionexponential_equationSolve b^x = y for x, with b > 0, b != 1 and y > 0.
b the basey the value of the powerx the exponentfactor_monic_quadraticWrite x^2 + b*x + c as (x + p)*(x + q) with real p and q.
b coefficient of xc constant termp first constantq second constantaverage_rate_of_change_definition(f(x_end) - f(x_start)) / (x_end - x_start) from two values of a function.
x_start first inputf_x_start value of the function at the first inputx_end second inputf_x_end value of the function at the second inputarc average rate of changecompose_linear_functionsFor f(x) = a*x + b and g(x) = c*x + d, the composition f(g(x)) = m*x + k.
a slope of fb intercept of fc slope of gd intercept of gm slope of f(g(x))k intercept of f(g(x))distance_point_to_lineThe perpendicular distance from (x0, y0) to the line a*x + b*y + c = 0.
x0 x-coordinate of the pointy0 y-coordinate of the pointa coefficient of xb coefficient of yc constant termdistance the perpendicular distancedomain_sqrt_over_linearThe domain of f(x) = sqrt(a*x + b)/(c*x + d) (or 1/sqrt(a*x + b)): where the radicand is allowed and the denominator is not 0.
a coefficient of x under the rootb constant under the rootc coefficient of x in the denominator (0 for none)d constant in the denominator (1 for none)root_in_denominator true when the root itself is in the denominator (the radicand must then be positive) boolean optionalboundary where the radicand is 0side the inequality x must satisfy with the boundaryexcluded a point removed because the denominator is 0 there (None if none)domain the domain in interval notationevaluate_functionThe value f(x0) of a function given by a formula in x (exact when it is rational).
expression the formula of f in x: numbers, x, + - * / ^, parentheses, sqrt, abs, ln textx the number x0 to put invalue f(x0)numerator numerator of the exact valuedenominator denominator of the exact valuepiecewise_evaluatef(x0) for f(x) = e1 when x < c (or x <= c) and e2 otherwise.
e1 formula of the left piece textleft_rel the left piece holds for x < c or x <= c choicec the break point ce2 formula of the right piece textx the number x0value f(x0)piece which piece applies (1 = left, 2 = right)graph_transformation_pointIf (x0, y0) is on y = f(x), the corresponding point on y = A*f(B*(x - h)) + k.
x0 x-coordinate of the point on y = f(x)y0 y-coordinate of the pointA vertical stretch (negative: reflection in the x-axis) optionalB horizontal compression factor (negative: reflection in the y-axis) optionalh horizontal shift optionalk vertical shift optionalx_new x-coordinate of the imagey_new y-coordinate of the imageline_interceptsThe x- and y-intercepts and the slope of the line a*x + b*y = c.
a coefficient of xb coefficient of yc right-hand sidex_intercept where the line meets the x-axis (y = 0)y_intercept where it meets the y-axis (x = 0)slope the slope -a/binverse_linear_functionFor f(x) = a*x + b (a != 0): f^-1(x) = x/a - b/a, and f^-1(y) for a given y.
a slope of fb intercept of fy a value to invert (optional) optionalinv_slope slope of the inverse, 1/ainv_intercept intercept of the inverse, -b/avalue f^-1(y)composite_function_valuef(g(x0)) or g(f(x0)) for two functions given by formulas.
f the formula of f in x textg the formula of g in x textx the number x0order which composition choiceinner value of the inner function at x0value value of the composite at x0linear_inequalitySolve a*x + b < c (or >): the boundary x0 and the direction s (s = 1 means the solution of the < form is x < x0; s = -1 means it reverses to x > x0 because a < 0).
a coefficient of xb constant on the leftc right-hand sidex0 boundary of the solution sets 1 if the inequality keeps its direction, -1 if it reversesabs_value_inequality_upper_boundFor |x - c| < d with d > 0, the solutions are lower < x < upper.
c centre cd bound dlower lower end of the solution interval (excluded)upper upper end of the solution interval (excluded)abs_value_inequality_lower_boundFor |x - c| > d with d >= 0, the solutions are x < left_limit or x > right_limit.
c centre cd bound dleft_limit x must be below thisright_limit or above thislinear_equation_rootSolve a*x + b = c for x.
a coefficient of xb constant term on the left sidec right-hand sidex the solutionaverage_rate_of_change_linear(y2 - y1) / (x2 - x1) between the points (x1, y1) and (x2, y2).
x1 x-coordinate of the first pointy1 y-coordinate of the first pointx2 x-coordinate of the second pointy2 y-coordinate of the second pointm average rate of changeline_through_two_pointsThe slope m and y-intercept k of the line through (x1, y1) and (x2, y2), in the form y = m*x + k.
x1 x-coordinate of the first pointy1 y-coordinate of the first pointx2 x-coordinate of the second pointy2 y-coordinate of the second pointm slopek y-interceptperpendicular_lines_slope_productThe slope m_perp of a line perpendicular to a line of nonzero slope m.
m slope of the given linem_perp slope of the perpendicular lineconvert_to_slope_interceptThe constant b of y = m*x + b for the line with slope m through (x1, y1).
m slopex1 x-coordinate of the pointy1 y-coordinate of the pointb y-interceptlogarithmic_equationSolve log_b(x) = c for x.
b basec value of the logarithmx the solutionmatrix_2x2_inverseFor the matrix [[a, b], [c, d]], its determinant and the entries of its inverse.
a top-left entryb top-right entryc bottom-left entryd bottom-right entrydet determinanti11 inverse, top-lefti12 inverse, top-righti21 inverse, bottom-lefti22 inverse, bottom-rightdeterminant_2x2_formulaComputes the determinant of a 2x2 matrix using the standard formula.
a entry in row 1 column 1b entry in row 1 column 2c entry in row 2 column 1d entry in row 2 column 2det determinant of the matrixmatrix_scalar_multiple_definitionComputes the entries of a 2x2 matrix scaled by a scalar.
s scalar multipliera11 entry in row 1 column 1a12 entry in row 1 column 2a21 entry in row 2 column 1a22 entry in row 2 column 2b11 entry in row 1 column 1 of resultb12 entry in row 1 column 2 of resultb21 entry in row 2 column 1 of resultb22 entry in row 2 column 2 of resultabsolute_value_equationSolve |a*x + b| = c for x (two solutions when c > 0, one when c = 0).
a coefficient of xb constant inside the absolute valuec right-hand sidex1 solution of a*x + b = cx2 solution of a*x + b = -cquadratic_discriminantThe discriminant b^2 - 4ac of a*x^2 + b*x + c and the nature of the roots it implies.
a coefficient of x^2b coefficient of xc constant termdiscriminant b^2 - 4acnature two distinct real / one repeated real / two complex conjugate rootscubic_rootsSolve a*x^3 + b*x^2 + c*x + d = 0 for x: all three roots, real or complex.
a coefficient of x^3b coefficient of x^2c coefficient of xd constant termx1 first root (real roots ascending, then complex roots)x2 second rootx3 third rootquadratic_rootsSolve a*x^2 + b*x + c = 0 for x: both roots, real or complex.
a coefficient of x^2b coefficient of xc constant termx1 first root (the smaller real root, or the one with positive imaginary part)x2 second rootdiscriminant b^2 - 4acquartic_rootsSolve a*x^4 + b*x^3 + c*x^2 + d*x + e = 0 for x: all four roots, real or complex.
a coefficient of x^4b coefficient of x^3c coefficient of x^2d coefficient of xe constant termx1 first root (real roots ascending, then complex roots)x2 second rootx3 third rootx4 fourth rootbinomial_productExpand (a*x + b)*(c*x + d) into p2*x^2 + p1*x + p0.
a coefficient of x in the first binomialb constant of the first binomialc coefficient of x in the second binomiald constant of the second binomialp2 coefficient of x^2p1 coefficient of xp0 constant termbinomial_coefficient_termThe coefficient of x^k in (a*x + b)^n, by the binomial theorem.
a coefficient of x in the binomialb constant of the binomialn the power n integerk the power of x whose coefficient is wanted integercoefficient coefficient of x^kbinomial the binomial coefficient C(n, k)vector_dot_angleThe dot product, the magnitudes and the angle between two vectors in the plane or in space.
u the first vector, e.g. 3, 4 vectorv the second vector vectordot u . vmag_u |u|mag_v |v|angle_deg the angle between them, degrees (0 to 180)ellipse_parametersFor (x - h)^2/A + (y - k)^2/B = 1: semi-axes a and b, focal distance c, eccentricity and the two foci.
h x of the centrek y of the centreA denominator under the x term (positive)B denominator under the y term (positive)a semi-major axisb semi-minor axisc centre-to-focus distanceeccentricity e = c/af1x first focus xf1y first focus yf2x second focus xf2y second focus yorientation the major axis is horizontal or verticalhyperbola_parametersFor (x - h)^2/A - (y - k)^2/B = 1 (or the vertical form): a, b, c, eccentricity, the asymptotes' slope and the foci.
h x of the centrek y of the centreA denominator of the positive termB denominator of the negative termorientation horizontal (x term positive) or vertical choicea a = sqrt(A)b b = sqrt(B)c centre-to-focus distanceeccentricity e = c/aasymptote_slope slope of the asymptotes (plus or minus this)f1x first focus xf1y first focus yf2x second focus xf2y second focus yparabola_focus_directrixVertex, focal distance p, focus and directrix of (x - h)^2 = 4p(y - k) or (y - k)^2 = 4p(x - h).
orientation vertical axis ((x-h)^2 = m(y-k)) or horizontal choicem the coefficient m = 4ph x of the vertex optionalk y of the vertex optionalp focal distance p = m/4 (signed)focus_x x of the focusfocus_y y of the focusdirectrix the directrix: y = this (vertical axis) or x = this (horizontal axis)vertex_x x of the vertexvertex_y y of the vertexvector_magnitude_directionThe length of the plane vector <x, y> and its direction angle from the positive x-axis (0 to 360 degrees).
x the x-componenty the y-componentmagnitude |v|direction_deg the direction angle, degrees in [0, 360)polar_to_rectangularThe point (x, y) with polar coordinates (r, theta).
r the distance r from the poletheta the angle thetaunit degrees or radians choicex x = r cos(theta)y y = r sin(theta)rectangular_to_polarPolar coordinates (r, theta) of the point (x, y), with r > 0 and theta in [0, 360) degrees / [0, 2 pi).
x x-coordinatey y-coordinater r = sqrt(x^2 + y^2)theta_deg theta in degrees, [0, 360)theta_rad theta in radians, [0, 2 pi)vertex_formWrite a*x^2 + b*x + c as a*(x - h)^2 + k, giving the vertex (h, k).
a coefficient of x^2b coefficient of xc constant termh x-coordinate of the vertexk y-coordinate of the vertexadd_rational_expressions_same_denomAdd two rational expressions that share a common denominator.
num1 numerator of first expressionnum2 numerator of second expressionden common denominatorsum_num numerator of the sumsum_den denominator of the summultiply_rational_expressionsCompute the product of two rational expressions.
num1 numerator of first expressionden1 denominator of first expressionnum2 numerator of second expressionden2 denominator of second expressionprod_num numerator of the productprod_den denominator of the productrational_function_asymptotesThe vertical asymptote x = va and horizontal asymptote y = ha of f(x) = (a*x + b)/(c*x + d).
a coefficient of x in the numeratorb constant of the numeratorc coefficient of x in the denominatord constant of the denominatorva vertical asymptoteha horizontal asymptoteperimeter_of_rectangleThe perimeter p of a rectangle with width w and height h.
w widthh heightp perimetergeometric_sequenceThe n-th term and the sum of the first n terms of the geometric sequence with first term g1 and common ratio q (q != 1).
g1 first termq common ration position of the termgn the n-th termsn the sum of the first n termsarithmetic_sequenceThe n-th term and the sum of the first n terms of the arithmetic sequence with first term a1 and common difference d.
a1 first termd common differencen position of the term (a positive whole number)an the n-th termsn the sum of the first n termslinear_system_2x2Solve a*x + b*y = c and d*x + e*y = f for x and y.
a coefficient of x in the first equationb coefficient of y in the first equationc right-hand side of the first equationd coefficient of x in the second equatione coefficient of y in the second equationf right-hand side of the second equationx the value of xy the value of ymidpoint_of_segmentThe midpoint (mx, my) of the segment from (x1, y1) to (x2, y2).
x1 x-coordinate of the first endpointy1 y-coordinate of the first endpointx2 x-coordinate of the second endpointy2 y-coordinate of the second endpointmx x-coordinate of the midpointmy y-coordinate of the midpointheron_areaThe area of a triangle with sides a, b, c, and its semi-perimeter s.
a side ab side bc side carea the areas the semi-perimeter (a + b + c)/2deg_to_radConvert an angle in degrees to radians (also as a multiple of pi).
deg the angle in degreesradians the angle in radianspi_multiple the angle as a multiple of piexact exact form, e.g. 3pi/4unit_circle_exactThe exact sin, cos and tan of an angle that is a multiple of 30 or 45 degrees (pi/6, pi/4), with the reference angle.
deg the angle in degrees (a multiple of 30 or 45)sin sin of the anglecos cos of the angletan tan of the angle (None where undefined)sin_exact exact sincos_exact exact costan_exact exact tanreference_angle the reference angle, degreeslaw_of_cosines_sssGiven the three sides a, b, c: the angles A, B, C.
a side ab side bc side cA angle A, degreesB angle B, degreesC angle C, degreeslaw_of_cosines_sasGiven sides b and c and the included angle A: the third side a and the angles B and C.
b side bc side cA the included angle A, degreesa side aB angle B, degreesC angle C, degreeslaw_of_sines_aasGiven angles A and B and the side a opposite A: the third angle C and the sides b and c.
A angle A, degreesB angle B, degreesa side a, opposite AC angle C, degreesb side bc side claw_of_sines_ssaGiven sides a and b and the angle A opposite a: how many triangles exist (0, 1 or 2) and every one of them.
a side a, opposite Ab side bA angle A, degreescount number of triangles (1 or 2; none is refused)B1 angle B of the first triangle (the acute one)C1 angle C of the first trianglec1 side c of the first triangleB2 angle B of the second triangle (obtuse), when there are twoC2 angle C of the second trianglec2 side c of the second trianglerad_to_degConvert an angle in radians (a number, or a multiple of pi such as 3pi/4) to degrees.
rad the angle in radiansdegrees the angle in degreesright_triangle_leg_hypotenuseGiven a leg a and the hypotenuse c of a right triangle: the other leg b and the acute angles A (opposite a) and B.
a the known leg (positive)c the hypotenuse (longer than the leg)b the other legA angle opposite a, degreesB angle opposite b, degreesright_triangle_angle_sideGiven an acute angle A and one side (the hypotenuse, the side opposite A or the side adjacent to A): every side and the other angle.
A the acute angle A in degreesside the length of the known sidewhich which side is known choiceopposite side opposite Aadjacent side adjacent to Ahypotenuse the hypotenuseB the other acute angle, degreesright_triangle_legsGiven the legs a and b of a right triangle: the hypotenuse c and the acute angles A (opposite a) and B.
a the leg opposite angle A (positive)b the leg opposite angle B (positive)c the hypotenuseA angle opposite a, degreesB angle opposite b, degreestrig_equation_intervalEvery solution of a*sin(n x) = k (or cos, tan) with 0 <= x < 360 degrees or 0 <= x < 2 pi.
func sin, cos or tan choicek the value the function must take (after dividing by its coefficient)n the multiple n in f(n x) (default 1) integer optionalunit degrees ([0, 360)) or radians ([0, 2pi)) choice optionalcount number of solutions in the intervalsolutions the solutions, ascendingtrig_values_from_oneGiven sin, cos or tan of an angle and its quadrant: sin, cos, tan, sin 2t and cos 2t (Pythagorean and double-angle identities).
func the function whose value is known choicevalue its valuequadrant the quadrant of the angle (1 to 4) integersin sin tcos cos ttan tan tsin2 sin 2tcos2 cos 2t| Version | Released |
|---|---|
| 1.0.0 | 2026-10-25 |
15 files, 46.4 MB in total. The largest:
| File | Size |
|---|---|
| model.safetensors | 18.9 MB |
| dist/math_foundations_ai999x-1.0.0-py3-none-any.whl | 18.2 MB |
| onnx/search/encoder.int8.onnx | 4.9 MB |
| docs/math_foundations_ai999x_capabilities.pdf | 3.4 MB |
| onnx/search/index.json | 403.3 KB |
| docs/math_foundations_ai999x_capabilities.html | 263.7 KB |
| docs/math_foundations_ai999x_capabilities.md | 188.9 KB |
| onnx/search/tokenizer.json | 176.4 KB |
| README.md | 23.5 KB |
| LICENSE | 11.4 KB |
| evaluation/release_gate.md | 2.3 KB |
| evaluation/KNOWLEDGE_CARD.md | 1.8 KB |
Math Foundations answers questions in math foundations: arithmetic, fractions, percentages, ratios, algebraic equations and inequalities, functions, exponentials and logarithms, trigonometry, precalculus and complex numbers. Each answer gives the value with its unit, the steps and the formula in LaTeX.
With pip: pip install math-foundations-ai999x. The same files are on Hugging Face (hf download AI999X/math-foundations-ai999x --local-dir math-foundations-ai999x) and GitHub.
Yes. It is a Python package that runs on an ordinary CPU without a network connection (Python >=3.10); no GPU and no API key are needed.
100 capabilities in 31 topics, including Trigonometry, Arithmetic, Algebra, Functions, Precalculus.
Field: Mathematics & Statistics. Tasks: Question Answering, Token Classification, Text Classification, Sentence Similarity, Feature Extraction.
Asked "Solve x^2 - 5x + 6 = 0.", it answers: x1 = 2, x2 = 3, discriminant = 1.
It says so and names what is missing or out of range, instead of guessing a number.