Course Test · School: elementary and middle

Grade 8: linear equations, functions and the Pythagorean theorem: 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, algebraic, symbolic, stats, 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.Scientific notationAgrees
    (3.2×105)(4×10−2)(3.2 \times 10^5)(4 \times 10^{-2}). Write the answer in scientific notation.
    Independent answer
    12.8×103=1.28×10412.8 \times 10^3 = 1.28 \times 10^4.
    RatMath code
    R`3.2 * 10^5 * 4 * 10^(-2)`.toRational().toScientificNotation()
    Output
    1.28E4
    Only Rational has toScientificNotation; the product is an Integer, so it is turned into a Rational first. RatMath writes 1.28×1041.28 \times 10^4 as 1.28E4.
  2. 2.Laws of exponentsAgrees
    Simplify 2−3⋅2524\dfrac{2^{-3} \cdot 2^5}{2^4}.
    Independent answer
    2−3+5−4=2−2=142^{-3+5-4} = 2^{-2} = \tfrac14.
    RatMath code
    R`2^(-3) * 2^5 / 2^4`
    Output
    1/4
  3. 3.Simplifying square rootsAgrees
    Simplify 50\sqrt{50}.
    Independent answer
    25⋅2=52\sqrt{25 \cdot 2} = 5\sqrt2.
    RatMath code
    symbolic.simplify("sqrt(50)")
    Output
    5*sqrt(2)
  4. 4.Estimating irrational numbersAgrees
    Between which two whole numbers does 48\sqrt{48} lie? Give it to the nearest tenth.
    Independent answer
    62=36<48<49=726^2 = 36 < 48 < 49 = 7^2, so between 6 and 7; 6.92=47.616.9^2 = 47.61, 6.952=48.36.95^2 = 48.3, so 48≈6.9\sqrt{48} \approx 6.9.
    RatMath code
    const r = algebraic.sqrt(48);
    [r.toFixed(0, "floor"), r.toFixed(1)]
    Output
    ["6", "6.9"]
    toFixed rounds a certified value, refining until the rounding is decided: 48=6.928…\sqrt{48} = 6.928\ldots.
    Fix: ratmath/algebraic#9, the arithmetic reads plain numbers, so sqrt(48) works
    Fix: ratmath/algebraic#10, toFixed(k, mode) on algebraic numbers
  5. 5.Repeating decimal to fractionAgrees
    Write 0.36‾0.\overline{36} as a fraction in lowest terms.
    Independent answer
    x=0.36‾x = 0.\overline{36}, 100x−x=36100x - x = 36, x=3699=411x = \tfrac{36}{99} = \tfrac{4}{11}.
    RatMath code
    R`0.#36`
    Output
    4/11
  6. 6.Variables on both sidesAgrees
    Solve 5(x−2)=3x+65(x - 2) = 3x + 6.
    Independent answer
    5x−10=3x+65x - 10 = 3x + 6, 2x=162x = 16, x=8x = 8.
    RatMath code
    symbolic.solve("5(x - 2) = 3x + 6", "x")
    Output
    x = 8
  7. 7.Number of solutionsAgrees
    How many solutions does 2(x+3)=2x+52(x + 3) = 2x + 5 have? And 2(x+3)=2x+62(x + 3) = 2x + 6?
    Independent answer
    None (6=56 = 5 is false); infinitely many (every xx).
    RatMath code
    [symbolic.solve("2(x + 3) = 2x + 5", "x"), symbolic.solve("2(x + 3) = 2x + 6", "x")]
    Output
    [no real solution, every x where the equation is defined]
  8. 8.SlopeAgrees
    Find the slope of the line through (−2,5)(-2, 5) and (4,−7)(4, -7).
    Independent answer
    −7−54−(−2)=−126=−2\dfrac{-7 - 5}{4 - (-2)} = \dfrac{-12}{6} = -2.
    RatMath code
    R`(-7 - 5)/(4 - (-2))`
    Output
    -2
  9. 9.Equation of a lineAgrees
    Write the equation of the line through (−2,5)(-2, 5) and (4,−7)(4, -7) in slope–intercept form.
    Independent answer
    y−5=−2(x+2)y - 5 = -2(x + 2), so y=−2x+1y = -2x + 1.
    RatMath code
    const l = geo.line([-2, 5], [4, -7]);
    [l.toSlopeIntercept(), l.toPointSlope([-2, 5])]
    Output
    ["y = -2x + 1", "y - 5 = -2(x + 2)"]
    Lines print in slope–intercept and point–slope form.
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces
  10. 10.System by substitutionAgrees
    Solve the system y=2x−3y = 2x - 3, x+y=9x + y = 9.
    Independent answer
    x+2x−3=9x + 2x - 3 = 9, x=4x = 4, y=5y = 5.
    RatMath code
    symbolic.solveSystem(["y = 2x - 3", "x + y = 9"], ["x", "y"])
    Output
    x = 4,  y = 5
  11. 11.System by eliminationAgrees
    Solve 3x+2y=163x + 2y = 16, 5x−2y=05x - 2y = 0.
    Independent answer
    Adding: 8x=168x = 16, x=2x = 2, y=5y = 5.
    RatMath code
    symbolic.solveSystem(["3x + 2y = 16", "5x - 2y = 0"], ["x", "y"])
    Output
    x = 2,  y = 5
  12. 12.Linear functionsAgrees
    A linear function has f(0)=4f(0) = 4 and f(3)=13f(3) = 13. Find f(10)f(10).
    Independent answer
    Rate of change 9/3=39/3 = 3, so f(x)=3x+4f(x) = 3x + 4 and f(10)=34f(10) = 34.
    RatMath code
    const f = algebraic.interpolate([[0, 4], [3, 13]]);   // coefficients, constant first
    PRINT(f);
    R`${f[0]} + ${f[1]}*10`
    Output
    34
  13. 13.Pythagorean theoremAgrees
    A right triangle has legs 9 and 12. How long is the hypotenuse?
    Independent answer
    81+144=225=15\sqrt{81 + 144} = \sqrt{225} = 15.
    RatMath code
    geo.distance([0, 0], [9, 12])
    Output
    15
  14. 14.Distance between pointsAgrees
    Find the distance between (1,−2)(1, -2) and (7,6)(7, 6).
    Independent answer
    62+82=10\sqrt{6^2 + 8^2} = 10.
    RatMath code
    geo.distance([1, -2], [7, 6])
    Output
    10
  15. 15.Missing legAgrees
    A 13-foot ladder leans against a wall with its foot 5 feet from the wall. How high up the wall does it reach?
    Independent answer
    169−25=12\sqrt{169 - 25} = 12 feet.
    RatMath code
    algebraic.sqrt(R`13^2 - 5^2`)
    Output
    12
    Fix: ratmath/algebraic#9, the arithmetic reads plain numbers, so sqrt(48) works
  16. 16.Volume of a cylinderAgrees
    Find the volume of a cylinder with radius 3 and height 10, in terms of π\pi.
    Independent answer
    πr2h=90π\pi r^2 h = 90\pi.
    RatMath code
    symbolic.simplify("pi*3^2*10")
    Output
    90*pi
  17. 17.Cones and spheresAgrees
    Find the volume of a cone with radius 6 and height 4, and of a sphere with radius 3, in terms of π\pi.
    Independent answer
    Cone 13π⋅36⋅4=48π\tfrac13 \pi \cdot 36 \cdot 4 = 48\pi; sphere 43π⋅27=36π\tfrac43 \pi \cdot 27 = 36\pi.
    RatMath code
    [symbolic.simplify("1/3*pi*6^2*4"), symbolic.simplify("4/3*pi*3^3")]
    Output
    [48*pi, 36*pi]
  18. 18.TransformationsAgrees
    Reflect the point (3,−5)(3, -5) in the yy-axis, then translate it 2 right and 4 up. Where does it land?
    Independent answer
    (−3,−5)(-3, -5), then (−1,−1)(-1, -1).
    RatMath code
    const yAxis = geo.line([0, 0], [0, 1]);
    geo.translation([2, 4]).compose(geo.reflection(yAxis)).apply([3, -5])
    Output
    (-1, -1)
  19. 19.Angles of a triangleAgrees
    The angles of a triangle are xx, 2x2x and 3x3x. Find them.
    Independent answer
    6x=1806x = 180, x=30x = 30: 30∘,60∘,90∘30^\circ, 60^\circ, 90^\circ.
    RatMath code
    symbolic.solve("x + 2x + 3x = 180", "x")
    Output
    x = 30
  20. 20.Line of best fitAgrees
    Find the least-squares line for the points (1,2),(2,4),(3,5),(4,4),(5,6)(1, 2), (2, 4), (3, 5), (4, 4), (5, 6).
    Independent answer
    xˉ=3\bar x = 3, yˉ=4.2\bar y = 4.2, Sxy=8S_{xy} = 8, Sxx=10S_{xx} = 10: slope 0.80.8, intercept 4.2−2.4=1.84.2 - 2.4 = 1.8. y=0.8x+1.8y = 0.8x + 1.8.
    RatMath code
    const fit = stats.leastSquares([1, 2, 3, 4, 5], [2, 4, 5, 4, 6]);
    [fit.slope, fit.intercept]
    Output
    [4/5, 9/5]