play phryzby with physics

Two Charges Apart

solved PotentialEnergyOfCharges

Q. Two charges of 7 μCqf=7μC and -2 μCqs=-2μC are placed at (–9 cm, 0, 0) and (9 cm, 0, 0)rfs=18cm respectively. What is the electrostatic potential energy of the system, in joules?

+−first 7×10⁻⁶ Csecond -2×10⁻⁶ Cr = 0.18 mU = ?
Inputs
qf
7 μC
qs
-2 μC
Outputs
energyUfs?

How it's solved

Solved with PotentialEnergyOfCharges

Given

  • qf=7μC
  • qs=-2μC
  • rfs=18cm from “(–9 cm, 0, 0) and (9 cm, 0, 0)”

Find Ufs.

Working
  1. qf=7μC=7×10−6C
  2. qs=-2μC=−2×10−6C
  3. rfs=18cm=0.18m
  4. energy of a pair of charges(first, second)Ufs=k⋅qf⋅qsrfs
  5. Ufs=8.98755179×109⋅7×10−6⋅(−2×10−6)0.18
  6. Ufs=−0.699J
  7. Ufs≈−0.70Jto 2 significant figures
Conclusion

Opposite charges attract, so the pair has less energy together than apart: the energy is negative, and that much work separates them.

The web of concepts

given read from the words equation asked

The Ruby that solves it

The question and its solution are small Ruby files. The engine runs them.

question.rb
1require_relative "../physics"23question :two_charges_apart do4  kind :numerical5  describes "Two charges of %{first} and %{second} are placed at (–9 cm, 0, 0) and (9 cm, 0, 0) respectively. " \6            "%{energy}, in joules?"7  given first: "7 μC"8  given second: "-2 μC"9  asks energy: "What is the electrostatic potential energy of the system"10end
solution.rb
1require_relative "../questions/two_charges_apart"2require_relative "../science/electrostatic_potential_and_capacitance/potential_energy_of_charges"34solve :two_charges_apart, using: PotentialEnergyOfCharges do5  objects :first, :second67  take first: first.charge8  take second: second.charge910  deduce_from "(–9 cm, 0, 0) and (9 cm, 0, 0)", first.distance(from: second) => "18 cm"1112  energy = first.potential_energy(by: second)13  answer energy:, in: "J", figures: 21415  conclusion "Opposite charges attract, so the pair has less energy together than apart: the energy is " \16             "negative, and that much work separates them."17end
playground.rb
1require_relative "../solutions/two_charges_apart"23play_with :two_charges_apart do4  title "Two Charges Apart"5end
The laws it drew on
quantitywrittenunitswithinfrom
coulomb constantkN m² C⁻²—PotentialEnergyOfCharges
chargeqC—PotentialEnergyOfCharges
distancerm—PotentialEnergyOfCharges
potential energyUJ—PotentialEnergyOfCharges
potential energy of ground by firstUgfJ—
charge of groundqgC—
charge of firstqfC—
distance of ground from firstrgfm—
potential energy of ground by secondUgsJ—
charge of secondqsC—
distance of ground from secondrgsm—
potential energy of first by groundUfgJ—
distance of first from groundrfm—
potential energy of first by secondUfsJ—
distance of first from secondrfsm—
potential energy of second by groundUsgJ—
distance of second from groundrsm—
potential energy of second by firstUsfJ—
distance of second from firstrsfm—
Uoo=k⋅qo⋅qoroo
energy of a pair of charges
Ugf=k⋅qg⋅qfrgf
energy of a pair of charges(ground, first)
Ugs=k⋅qg⋅qsrgs
energy of a pair of charges(ground, second)
Ufg=k⋅qf⋅qgrf
energy of a pair of charges(first, ground)
Ufs=k⋅qf⋅qsrfs
energy of a pair of charges(first, second)
Usg=k⋅qs⋅qgrs
energy of a pair of charges(second, ground)
Usf=k⋅qs⋅qfrsf
energy of a pair of charges(second, first)