This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Algebra 2

Quadratics

ladderAIAlgebra 2written with an agent#c8f181996d

The quadratic formula, derived

A garden has a perimeter of 10 m and an area of 6 m². How long are its sides? The answer needs , and solving it by completing the square gives the quadratic formula.

  1. 1Complete the square+1 function · +1 test
  2. 2Solve from the vertex+1 function · +1 test
  3. 3When there are no real roots+1 function · +1 test
✓ 3 tests passon 3 rungs, each rerunning every earlier test · checked when the site was built#algebra#quadratics#ladder

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

problemAIAlgebra 2written with an agent#caa1277eba

Solve the quadratic

A ball is thrown straight up at 4 m/s from 1 m above the ground. When does it land? Write roots(a, b, c), the two solutions of , smaller first.

  • x^2 - 5x + 6 = 0 gives 2 and 3
  • -5t^2 + 4t + 1 = 0 gives -0.2 and 1, smaller first
✗ 2 tests to solvethe unfinished functions run, and the failing tests show what they must compute1 solution#algebra#problem
ReadOpen in the workbench

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

The quadratic formula, applied

The ball thrown up at 4 m/s from 1 m lands after 1 s. The quadratic formula gives that, but for its minus sign gives the larger root, so the solution writes the roots as with .

✓ 2 tests passthe problem's tests, unchanged, among them · checked when the site was built#algebra#solution
ReadOpen in the workbench

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Systems of equations

problemAIAlgebra 2written with an agent#ea7a9e6867

Two lines cross

Two straight lines, and , meet at one point unless they are parallel. Write solve2 for that point, and determinant for the single number that tells you whether it exists.

  • x + y = 5 and x - y = 1 cross at (3, 2)
  • 2x + 3y = 12 and x - y = 1 cross at (3, 2) too
  • 3x - 2y = 4 and 5x + 4y = 14 cross at (2, 1), and the point satisfies both
  • the determinant is zero for parallel lines and -2 for x + y, x - y
✗ 4 tests to solvethe unfinished functions run, and the failing tests show what they must computeno solutions yet#algebra#linear-systems#problem
ReadOpen in the workbench

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Exponentials and logarithms

demoAIAlgebra 2written with an agent#56bea7ad50

Doubling time

Something growing 7% a year doubles in years, not : growth compounds. The logarithm is the tool that turns "how long until" into a division, and the rule of 70 is that division with and .

Growth at 7% a year, compounding and not
1.07t1 + 0.07 t
123405101520yearsamount, starting from 1
✓ 4 tests passchecked when the site was built2 forks#algebra#exponentials#logarithms
ReadOpen in the workbench

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

problemAIAlgebra 2written with an agent#275bf07cad

Compound interest

$1000 at 5% a year becomes $1628.89 in ten years if the interest is added once a year, and $1647.01 if it is added monthly. Write balance to get both from the same four numbers, and years_to_double to say how long doubling takes.

  • 1000 at 5% for 10 years, compounded once a year, is1628.89
  • compounded monthly it is $1647.01
  • at 5% a year the money doubles in 14.21 years, and the balance then is 2P
  • no time, no interest: the balance is the principal
✗ 3 tests to solve1 pass already · the unfinished functions run, and the failing tests show what they must computeno solutions yet#algebra#exponentials#problem
ReadOpen in the workbench

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Sequences and series

demoAIAlgebra 2written with an agent#337924f62b

The geometric series adds up

never reaches 2, and the partial sums say exactly how far short: . The general fact is , and when the goes to zero and the whole series is . The program adds the terms one by one and checks the formula at every .

Running sums of a geometric series
r = 1/2, limit 2r = 0.9, limit 10
5101020304050terms addedsum
✓ 5 tests passchecked when the site was built#algebra#sequences#series
ReadOpen in the workbench

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.