Examples

Copy-paste examples to get started quickly. Each shows Quarto source and rendered output.

Kinematics

Free Fall Velocity
Module 1 velocity-time

Calculate the velocity of an object dropped from rest after 3 seconds.

Quarto Source

::: {.calc-request}
request_id: "freefall-01"
formula_id: "formula:velocity-time"
solve_for: "v"
inputs:
  u: { value: 0, unit: "m/s" }
  a: { value: 9.8, unit: "m/s^2" }
  t: { value: 3, unit: "s" }
options:
  sigfigs: 2
  show_steps: true
:::

The final velocity is
{{< calc request="freefall-01" >}}.

Output

The final velocity is \(29 \text{ m/s}\).
Working:
\(v = u + at\)
\(v = 0 + (9.8)(3)\)
\(v = 29.4\)
\(v = 29 \text{ m/s}\) (2 s.f.)
Displacement from Rest
Module 1 displacement-time

Find how far a car travels accelerating from rest at 2.5 m/s² for 8 seconds.

Quarto Source

::: {.calc-request}
request_id: "car-accel-01"
formula_id: "formula:displacement-time"
solve_for: "s"
inputs:
  u: { value: 0, unit: "m/s" }
  a: { value: 2.5, unit: "m/s^2" }
  t: { value: 8, unit: "s" }
options:
  sigfigs: 3
:::

**Displacement:** {{< calc request="car-accel-01" >}}

Output

Displacement: \(80.0 \text{ m}\)

Dynamics

Force Calculation
Module 2 newtons-second-law

Calculate the net force on a 1200 kg car accelerating at 3.2 m/s².

Quarto Source

Using Newton's second law:

{{< eq id="formula:newtons-second-law" >}}

::: {.calc-request}
request_id: "force-01"
formula_id: "formula:newtons-second-law"
solve_for: "F"
inputs:
  m: { value: 1200, unit: "kg" }
  a: { value: 3.2, unit: "m/s^2" }
options:
  sigfigs: 3
  show_steps: true
:::

**Working:**
{{< calc request="force-01" field="steps" >}}

**Answer:** {{< calc request="force-01" >}}

Output

Using Newton's second law: \(F = ma\)
Working:
\(F = ma\)
\(F = (1200)(3.2)\)
\(F = 3840\)
\(F = 3.84 \times 10^3 \text{ N}\)
Answer: \(3.84 \times 10^3 \text{ N}\)
Momentum
Module 2 momentum

Calculate the momentum of a 0.145 kg baseball travelling at 40 m/s.

Quarto Source

::: {.calc-request}
request_id: "baseball-momentum"
formula_id: "formula:momentum"
solve_for: "p"
inputs:
  m: { value: 0.145, unit: "kg" }
  v: { value: 40, unit: "m/s" }
options:
  sigfigs: 3
:::

The baseball's momentum is
{{< calc request="baseball-momentum" >}}.

Output

The baseball's momentum is \(5.80 \text{ kg m/s}\).

Energy

Kinetic Energy
Module 2 kinetic-energy

Find the kinetic energy of a 75 kg runner moving at 8 m/s.

Quarto Source

::: {.calc-request}
request_id: "runner-ke"
formula_id: "formula:kinetic-energy"
solve_for: "KE"
inputs:
  m: { value: 75, unit: "kg" }
  v: { value: 8, unit: "m/s" }
options:
  sigfigs: 3
  show_steps: true
:::

{{< calc request="runner-ke" field="steps" >}}

Output

\(KE = \frac{1}{2}mv^2\)
\(KE = \frac{1}{2}(75)(8)^2\)
\(KE = \frac{1}{2}(75)(64)\)
\(KE = 2400\)
\(KE = 2.40 \times 10^3 \text{ J}\)

Electromagnetism

Ohm's Law
Module 4 ohms-law

Calculate the current through a 470 Ω resistor with 12 V across it.

Quarto Source

::: {.calc-request}
request_id: "resistor-current"
formula_id: "formula:ohms-law"
solve_for: "I"
inputs:
  V: { value: 12, unit: "V" }
  R: { value: 470, unit: "Ω" }
options:
  sigfigs: 3
:::

Current: {{< calc request="resistor-current" >}}

Output

Current: \(2.55 \times 10^{-2} \text{ A}\) (25.5 mA)

Gravitational Fields

Orbital Velocity
Module 5 orbital-velocity

Calculate the orbital velocity of a satellite 400 km above Earth's surface.

Quarto Source

::: {.calc-request}
request_id: "iss-velocity"
formula_id: "formula:orbital-velocity"
solve_for: "v"
inputs:
  G: { value: 6.674e-11, unit: "N m^2/kg^2" }
  M: { value: 5.972e24, unit: "kg" }
  r: { value: 6.771e6, unit: "m" }
options:
  sigfigs: 3
  show_steps: true
:::

The ISS orbits at approximately
{{< calc request="iss-velocity" >}}.

Output

The ISS orbits at approximately \(7.67 \times 10^3 \text{ m/s}\).
Working:
\(v = \sqrt{\frac{GM}{r}}\)
\(v = \sqrt{\frac{(6.674 \times 10^{-11})(5.972 \times 10^{24})}{6.771 \times 10^6}}\)
\(v = 7.67 \times 10^3 \text{ m/s}\)

Special Relativity

Lorentz Factor
Module 7 lorentz-factor

Calculate the Lorentz factor for an object travelling at 0.8c.

Quarto Source

::: {.calc-request}
request_id: "gamma-08c"
formula_id: "formula:lorentz-factor"
solve_for: "gamma"
inputs:
  v: { value: 0.8, unit: "c" }
  c: { value: 1, unit: "c" }
options:
  sigfigs: 3
:::

At 0.8c, the Lorentz factor is
\(\gamma = \) {{< calc request="gamma-08c" field="result.value" >}}.

Output

At 0.8c, the Lorentz factor is \(\gamma = 1.67\).

Interactive Playground

Want to try calculations interactively? Add this shortcode to your Quarto document:

{{< calc-playground >}}

This renders a form where readers can select formulas, enter inputs, and see results in real-time.

Tips for Writing Examples