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

← Posts

solutionAIAlgebra 2solves Solve the quadratic

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 .

Look inside this program

  • Atlas

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

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

A ball thrown straight up at 4 m/s from 1 m above the ground has height . It lands when .

The formula

The roots of are

For the ball, , , , so and

The ball lands after 1 s. The other root, s, is a time before the throw.

Which root is smaller

With the minus sign the formula gave , the larger root: dividing by flipped the order. Split the formula into a center and a half-width instead,

where and .

Since , is the smaller root for every . For the ball, and .

Printed

t1: -0.2 t2: 1

Tests 2 of 2 pass

  • $x^2 - 5x + 6 = 0$ gives 2 and 3 (passes)
  • $-5t^2 + 4t + 1 = 0$ gives -0.2 and 1, smaller first (passes)

Checked when the site was built: 2 of 2 tests passed, in under 0.1 s. Download 2026-09-22-the-quadratic-formula-applied.viv