Course Test · School: high school

Algebra I: RatMath answers

The same twenty exercises, answered with RatMath Core and the Shelf libraries only. The code below was run when this page was built; its output is shown as printed, and compared with the independent answer.

Agrees 20

Libraries used here: core, symbolic, geo. In this code each library is in scope under its own name (linalg.det, stats.tTest), and Core's names (R, Rational, …) are in scope directly.

  1. 1.Multi-step equationAgrees
    Solve 4(2x−3)−5=3x+84(2x - 3) - 5 = 3x + 8.
    Independent answer
    8x−17=3x+88x - 17 = 3x + 8, 5x=255x = 25, x=5x = 5.
    RatMath code
    symbolic.solve("4(2x - 3) - 5 = 3x + 8", "x")
    Output
    x = 5
  2. 2.Literal equationAgrees
    The area of a trapezoid is A=12h(b+c)A = \tfrac12 h(b + c). Solve for bb.
    Independent answer
    b=2Ah−cb = \dfrac{2A}{h} - c.
    RatMath code
    symbolic.solve("A = 1/2*h*(b + c)", "b")
    Output
    b = (2*A - c*h)/h
      provided -h != 0
  3. 3.Compound inequalityAgrees
    Solve −3<2x+1≤7-3 < 2x + 1 \le 7.
    Independent answer
    −4<2x≤6-4 < 2x \le 6, so −2<x≤3-2 < x \le 3.
    RatMath code
    symbolic.solveInequality("-3 < 2x + 1 <= 7", "x")
    Output
    (-2, 3]
    A chained inequality is read as the intersection of its two halves (RealSet now has intersect, union and complement).
    Fix: ratmath/symbolic#9, completeSquare, compose, sinusoid, inverse trig values, within, RealSet operations and chained inequalities, implicitDiff, leibniz, constant factors in sum
  4. 4.Absolute value equationAgrees
    Solve ∣2x−5∣=9|2x - 5| = 9.
    Independent answer
    2x−5=±92x - 5 = \pm 9: x=7x = 7 or x=−2x = -2.
    RatMath code
    symbolic.solve("abs(2x - 5) = 9", "x")
    Output
    x = -2,  7
  5. 5.Slope and interceptAgrees
    Write 3x−4y=123x - 4y = 12 in slope–intercept form. What are the slope and the yy-intercept?
    Independent answer
    y=34x−3y = \tfrac34 x - 3: slope 34\tfrac34, intercept −3-3.
    RatMath code
    symbolic.solve("3x - 4y = 12", "y")
    Output
    y = 3*x/4 - 3
  6. 6.Parallel linesAgrees
    Find the line through (2,−1)(2, -1) parallel to y=3x+5y = 3x + 5.
    Independent answer
    y+1=3(x−2)y + 1 = 3(x - 2), so y=3x−7y = 3x - 7.
    RatMath code
    geo.parallelThrough(geo.line([0, 5], [1, 8]), [2, -1])
    Output
    3·x - y - 7 = 0
    geo writes lines as ax+by+c=0ax + by + c = 0: 3x−y−7=03x - y - 7 = 0 is y=3x−7y = 3x - 7.
  7. 7.System word problemAgrees
    A theatre sold 120 tickets for \$780. Adult tickets cost \$8 and child tickets \$5. How many of each were sold?
    Independent answer
    a+c=120a + c = 120, 8a+5c=7808a + 5c = 780: 3a=1803a = 180, so 60 adult and 60 child tickets.
    RatMath code
    symbolic.solveSystem(["a + c = 120", "8a + 5c = 780"], ["a", "c"])
    Output
    a = 60,  c = 60
  8. 8.Laws of exponentsAgrees
    Simplify (3x2y3)2⋅2xy−4(3x^2y^3)^2 \cdot 2xy^{-4}.
    Independent answer
    9x4y6⋅2xy−4=18x5y29x^4y^6 \cdot 2xy^{-4} = 18x^5y^2.
    RatMath code
    symbolic.simplify("(3x^2*y^3)^2 * 2x*y^(-4)")
    Output
    18*x^5*y^2
  9. 9.Multiplying polynomialsAgrees
    Expand (2x−3)(x2+4x−1)(2x - 3)(x^2 + 4x - 1).
    Independent answer
    2x3+8x2−2x−3x2−12x+3=2x3+5x2−14x+32x^3 + 8x^2 - 2x - 3x^2 - 12x + 3 = 2x^3 + 5x^2 - 14x + 3.
    RatMath code
    symbolic.expand("(2x - 3)(x^2 + 4x - 1)")
    Output
    2*x^3 + 5*x^2 - 14*x + 3
  10. 10.Factoring a trinomialAgrees
    Factor x2−5x−24x^2 - 5x - 24.
    Independent answer
    (x−8)(x+3)(x - 8)(x + 3).
    RatMath code
    symbolic.factor("x^2 - 5x - 24")
    Output
    (x + 3)*(x - 8)
  11. 11.Factoring with a leading coefficientAgrees
    Factor 6x2+7x−36x^2 + 7x - 3.
    Independent answer
    (3x−1)(2x+3)(3x - 1)(2x + 3): 6x2+9x−2x−36x^2 + 9x - 2x - 3.
    RatMath code
    symbolic.factor("6x^2 + 7x - 3")
    Output
    (2*x + 3)*(3*x - 1)
  12. 12.Difference of squaresAgrees
    Factor 16x2−4916x^2 - 49.
    Independent answer
    (4x−7)(4x+7)(4x - 7)(4x + 7).
    RatMath code
    symbolic.factor("16x^2 - 49")
    Output
    (4*x + 7)*(4*x - 7)
  13. 13.Solving by factoringAgrees
    Solve x2−6x+5=0x^2 - 6x + 5 = 0.
    Independent answer
    (x−1)(x−5)=0(x - 1)(x - 5) = 0: x=1x = 1 or x=5x = 5.
    RatMath code
    symbolic.solve("x^2 - 6x + 5 = 0", "x")
    Output
    x = 1,  5
  14. 14.Quadratic formulaAgrees
    Solve 2x2+3x−4=02x^2 + 3x - 4 = 0. Give exact answers.
    Independent answer
    x=−3±9+324=−3±414x = \dfrac{-3 \pm \sqrt{9 + 32}}{4} = \dfrac{-3 \pm \sqrt{41}}{4}.
    RatMath code
    symbolic.solve("2x^2 + 3x - 4 = 0", "x")
    Output
    x = -sqrt(41)/4 - 3/4,  sqrt(41)/4 - 3/4
  15. 15.Completing the squareAgrees
    Write y=x2−8x+11y = x^2 - 8x + 11 in vertex form and give the vertex.
    Independent answer
    y=(x−4)2−5y = (x - 4)^2 - 5; vertex (4,−5)(4, -5).
    RatMath code
    const c = symbolic.completeSquare("x^2 - 8x + 11");
    [String(c.form), c.vertex.map(String)]
    Output
    ["(x - 4)^2 - 5", ["4", "-5"]]
    completeSquare writes the vertex form and proves it by expanding back.
    Fix: ratmath/symbolic#9, completeSquare, compose, sinusoid, inverse trig values, within, RealSet operations and chained inequalities, implicitDiff, leibniz, constant factors in sum
  16. 16.Function notationAgrees
    If f(x)=2x2−3x+1f(x) = 2x^2 - 3x + 1, find f(−2)f(-2).
    Independent answer
    8+6+1=158 + 6 + 1 = 15.
    RatMath code
    symbolic.sym("2x^2 - 3x + 1").subs({ x: -2 }).simplify()
    Output
    15
  17. 17.Arithmetic sequenceAgrees
    Find the 50th term of 7,11,15,…7, 11, 15, \ldots
    Independent answer
    7+49⋅4=2037 + 49 \cdot 4 = 203.
    RatMath code
    R`7 + (50 - 1)*4`
    Output
    203
  18. 18.Exponential growthAgrees
    A population of 500 doubles every 3 years. How large is it after 12 years?
    Independent answer
    Four doublings: 500⋅24=8000500 \cdot 2^4 = 8000.
    RatMath code
    R`500 * 2^(12/3)`
    Output
    8000
  19. 19.Adding radicalsAgrees
    Simplify 12+27\sqrt{12} + \sqrt{27}.
    Independent answer
    23+33=532\sqrt3 + 3\sqrt3 = 5\sqrt3.
    RatMath code
    symbolic.simplify("sqrt(12) + sqrt(27)")
    Output
    5*sqrt(3)
  20. 20.Linear–quadratic systemAgrees
    Where do y=x2y = x^2 and y=x+2y = x + 2 meet?
    Independent answer
    x2−x−2=0x^2 - x - 2 = 0, x=2x = 2 or −1-1: the points (2,4)(2, 4) and (−1,1)(-1, 1).
    RatMath code
    symbolic.solveSystem(["y = x^2", "y = x + 2"], ["x", "y"])
    Output
    x = -1,  y = 1
    x = 2,  y = 4