Course Test · School: high school

Precalculus and trigonometry: 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, linalg, graphics, symbolic, complex, 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.Exact valuesAgrees
    Find sin⁡5π6\sin\tfrac{5\pi}{6}, cos⁡7π4\cos\tfrac{7\pi}{4} and tan⁡2π3\tan\tfrac{2\pi}{3}.
    Independent answer
    12\tfrac12, 22\tfrac{\sqrt2}{2}, −3-\sqrt3.
    RatMath code
    ["sin(5pi/6)", "cos(7pi/4)", "tan(2pi/3)"].map((e) => symbolic.simplify(e))
    Output
    [1/2, sqrt(2)/2, -sqrt(3)]
  2. 2.RadiansAgrees
    Convert 225∘225^\circ to radians.
    Independent answer
    225⋅π180=5π4225 \cdot \tfrac{\pi}{180} = \tfrac{5\pi}{4}.
    RatMath code
    symbolic.simplify("225*pi/180")
    Output
    5*pi/4
  3. 3.Trigonometric equationAgrees
    Solve 2cos⁡2x−cos⁡x−1=02\cos^2 x - \cos x - 1 = 0 for 0≤x<2π0 \le x < 2\pi.
    Independent answer
    (2cos⁡x+1)(cos⁡x−1)=0(2\cos x + 1)(\cos x - 1) = 0: x=0,2π3,4π3x = 0, \tfrac{2\pi}{3}, \tfrac{4\pi}{3}.
    RatMath code
    symbolic.solve("2cos(x)^2 - cos(x) - 1 = 0", "x").within("[0, 2*pi)").map(String)
    Output
    ["0", "2*pi/3", "4*pi/3"]
    symbolic merges the three families into one, x=2nπ3x = \tfrac{2n\pi}{3}; within lists its members in [0,2π)[0, 2\pi), each placed by an exact comparison.
    Fix: ratmath/symbolic#9, completeSquare, compose, sinusoid, inverse trig values, within, RealSet operations and chained inequalities, implicitDiff, leibniz, constant factors in sum
  4. 4.Verifying an identityAgrees
    Verify 1−cos⁡2xsin⁡2x=tan⁡x\dfrac{1 - \cos 2x}{\sin 2x} = \tan x.
    Independent answer
    2sin⁡2x2sin⁡xcos⁡x=sin⁡xcos⁡x\dfrac{2\sin^2 x}{2\sin x\cos x} = \dfrac{\sin x}{\cos x} (where sin⁡2x≠0\sin 2x \ne 0).
    RatMath code
    symbolic.equal("(1 - cos(2x))/sin(2x)", "tan(x)")
    Output
    equal (normal form, after the rules the assumptions allow)
  5. 5.Sum formulaAgrees
    Find the exact value of sin⁡75∘\sin 75^\circ.
    Independent answer
    sin⁡(45∘+30∘)=22⋅32+22⋅12=6+24\sin(45^\circ + 30^\circ) = \tfrac{\sqrt2}{2}\cdot\tfrac{\sqrt3}{2} + \tfrac{\sqrt2}{2}\cdot\tfrac12 = \tfrac{\sqrt6 + \sqrt2}{4}.
    RatMath code
    symbolic.simplify("sin(5pi/12)")
    Output
    sqrt(6)/4 + sqrt(2)/4
  6. 6.SinusoidsAgrees
    Give the amplitude, period, phase shift and midline of y=3sin⁡(2x−π2)+1y = 3\sin(2x - \tfrac{\pi}{2}) + 1.
    Independent answer
    Amplitude 3, period π\pi, phase shift π4\tfrac{\pi}{4} to the right, midline y=1y = 1.
    RatMath code
    const s = symbolic.sinusoid("3sin(2x - pi/2) + 1");
    [s.amplitude, s.period, s.phaseShift, s.midline].map(String)
    Output
    ["3", "pi", "pi/4", "1"]
    sinusoid reads Asin⁡(Bx+C)+DA\sin(Bx + C) + D; the phase shift −C/B=π/4-C/B = \pi/4 is to the right.
    Fix: ratmath/symbolic#9, completeSquare, compose, sinusoid, inverse trig values, within, RealSet operations and chained inequalities, implicitDiff, leibniz, constant factors in sum
  7. 7.Inverse trigonometryAgrees
    Find arcsin⁡(−32)\arcsin\left(-\tfrac{\sqrt3}{2}\right) and cos⁡(arctan⁡34)\cos\left(\arctan\tfrac34\right).
    Independent answer
    −π3-\tfrac{\pi}{3}; a 3–4–5 triangle gives 45\tfrac45.
    RatMath code
    [symbolic.simplify("asin(-sqrt(3)/2)"), symbolic.simplify("cos(atan(3/4))")]
    Output
    [-pi/3, 4/5]
    Inverse trigonometric functions at the standard exact values simplify to multiples of π\pi; cos⁡(arctan⁡34)=45\cos(\arctan\tfrac34) = \tfrac45 comes from cos⁡(arctan⁡w)=1/1+w2\cos(\arctan w) = 1/\sqrt{1 + w^2}.
    Fix: ratmath/symbolic#9, completeSquare, compose, sinusoid, inverse trig values, within, RealSet operations and chained inequalities, implicitDiff, leibniz, constant factors in sum
  8. 8.Polar to rectangularAgrees
    Convert the polar point (4,5π6)\left(4, \tfrac{5\pi}{6}\right) to rectangular coordinates.
    Independent answer
    (4cos⁡5π6,4sin⁡5π6)=(−23,2)(4\cos\tfrac{5\pi}6, 4\sin\tfrac{5\pi}6) = (-2\sqrt3, 2).
    RatMath code
    [symbolic.simplify("4cos(5pi/6)"), symbolic.simplify("4sin(5pi/6)")]
    Output
    [-2*sqrt(3), 2]
  9. 9.De Moivre's theoremAgrees
    Compute (1+i)8(1 + i)^8.
    Independent answer
    (2 eiπ/4)8=16e2πi=16\left(\sqrt2\, e^{i\pi/4}\right)^8 = 16 e^{2\pi i} = 16.
    RatMath code
    complex.complex(1, 1).pow(8)
    Output
    16
  10. 10.VectorsAgrees
    For u=⟨3,−4⟩\mathbf u = \langle 3, -4\rangle and v=⟨2,1⟩\mathbf v = \langle 2, 1\rangle, find ∣u∣|\mathbf u|, u⋅v\mathbf u\cdot\mathbf v and the angle between them to 0.01°.
    Independent answer
    ∣u∣=5|\mathbf u| = 5, u⋅v=2\mathbf u\cdot\mathbf v = 2, cos⁡θ=255\cos\theta = \tfrac{2}{5\sqrt5}, θ≈79.70∘\theta \approx 79.70^\circ.
    RatMath code
    const u = [3, -4], v = [2, 1];
    [geo.distance([0, 0], u), geo.dot(geo.point(...u), geo.point(...v)), symbolic.evaluate(symbolic.parse("acos(2/(5*sqrt(5)))*180/pi"))]
    Output
    [5, 2, 79.6951535312339680[4793:5835]]
    Fix: ratmath/geo#10, dot and cross exported
  11. 11.AsymptotesAgrees
    Find the vertical and horizontal asymptotes of f(x)=2x2−3x2−4f(x) = \dfrac{2x^2 - 3}{x^2 - 4}.
    Independent answer
    Vertical x=±2x = \pm 2; horizontal y=2y = 2.
    RatMath code
    [graphics.findPoles("(2x^2 - 3)/(x^2 - 4)", {}, [-10, 10]).map((p) => p.at), symbolic.limit("(2x^2 - 3)/(x^2 - 4)", "x", "inf").value]
    Output
    [[-2, 2], 2]
  12. 12.Zeros of a polynomialAgrees
    Find all zeros of x4−5x2+4x^4 - 5x^2 + 4.
    Independent answer
    (x2−1)(x2−4)(x^2 - 1)(x^2 - 4): ±1,±2\pm 1, \pm 2.
    RatMath code
    symbolic.solve("x^4 - 5x^2 + 4 = 0", "x")
    Output
    x = -2,  -1,  1,  2
  13. 13.Logarithmic equationAgrees
    Solve log⁡10x+log⁡10(x−3)=1\log_{10} x + \log_{10}(x - 3) = 1.
    Independent answer
    x2−3x−10=0x^2 - 3x - 10 = 0, x=5x = 5 (x=−2x = -2 rejected).
    RatMath code
    symbolic.solve("log(x)/log(10) + log(x - 3)/log(10) = 1", "x")
    Output
    x = 5
      rejected x = -2: a side of the equation is undefined there
  14. 14.Exponential decayAgrees
    Carbon-14 has a half-life of 5730 years. How old is a sample with 30% of its carbon-14 left, to the nearest year?
    Independent answer
    t=5730 ln⁡0.3ln⁡0.5≈9953t = 5730\,\dfrac{\ln 0.3}{\ln 0.5} \approx 9953 years.
    RatMath code
    const s = symbolic.solve("(1/2)^(t/5730) = 3/10", "t");
    PRINT(s);
    s.solutions[0].approx()
    Output
    9952.812854572361
  15. 15.EllipseAgrees
    For x225+y29=1\dfrac{x^2}{25} + \dfrac{y^2}{9} = 1, give the vertices and foci.
    Independent answer
    Vertices (±5,0)(\pm 5, 0); c2=25−9=16c^2 = 25 - 9 = 16, foci (±4,0)(\pm 4, 0).
    RatMath code
    const p = geo.conicProperties("x^2/25 + y^2/9 = 1");
    [p.vertices.map(String), p.foci.map(String)]
    Output
    [["(5, 0)", "(-5, 0)"], ["(4, 0)", "(-4, 0)"]]
    conicProperties gives vertices, foci, axes and eccentricity.
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces
  16. 16.HyperbolaAgrees
    For 9x2−16y2=1449x^2 - 16y^2 = 144, give the foci and the asymptotes.
    Independent answer
    x216−y29=1\dfrac{x^2}{16} - \dfrac{y^2}{9} = 1; c=5c = 5, foci (±5,0)(\pm 5, 0); asymptotes y=±34xy = \pm\tfrac34 x.
    RatMath code
    const p = geo.conicProperties("9x^2 - 16y^2 = 144");
    [p.foci.map(String), p.asymptotes.map(String)]
    Output
    [["(5, 0)", "(-5, 0)"], ["3·x - 4·y = 0", "3·x + 4·y = 0"]]
    Foci and asymptotes (3x∓4y=03x \mp 4y = 0, that is y=±34xy = \pm\tfrac34x).
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces
  17. 17.Parametric curvesAgrees
    Eliminate the parameter: x=2cos⁡tx = 2\cos t, y=3sin⁡ty = 3\sin t.
    Independent answer
    x24+y29=1\dfrac{x^2}{4} + \dfrac{y^2}{9} = 1.
    RatMath code
    const e = symbolic.eliminate({ x: "2*cos(t)", y: "3*sin(t)" }, "t");
    [e.standard, e.equation, e.verified]
    Output
    ["x^2/4 + y^2/9 = 1", "9*x^2 + 4*y^2 = 36", "proven"]
    eliminate treats sin⁡t\sin t and cos⁡t\cos t as unknowns tied by s2+c2=1s^2 + c^2 = 1, removes them with resultants, and proves the result by substituting the parametrisation back.
    Fix: ratmath/symbolic#10, eliminate (resultants over sin and cos) and reverseOrder
  18. 18.Matrix inverseAgrees
    Find the inverse of (2153)\begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix}.
    Independent answer
    Determinant 1: (3−1−52)\begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix}.
    RatMath code
    linalg.inverse([[2, 1], [5, 3]]).exact()
    Output
    [3, -1]
    [-5, 2]
  19. 19.Sigma notationAgrees
    ∑k=110(2k−1)\displaystyle\sum_{k=1}^{10} (2k - 1)
    Independent answer
    The first ten odd numbers: 102=10010^2 = 100.
    RatMath code
    sum(1, 10, (k) => R`2*${k} - 1`)
    Output
    100
  20. 20.A first limitAgrees
    lim⁡x→3x2−9x−3\displaystyle\lim_{x\to3} \frac{x^2 - 9}{x - 3}
    Independent answer
    lim⁡(x+3)=6\lim (x + 3) = 6.
    RatMath code
    symbolic.limit("(x^2 - 9)/(x - 3)", "x", 3).value
    Output
    6