Final answer:
The initial energy stored in the spring is calculated using the formula for spring potential energy, U = 1/2 k x², using the known spring constant and the displacement from equilibrium.
Step-by-step explanation:
The amount of energy initially stored in a spring can be calculated using the formula for spring potential energy, which is U = 1/2 k x², where U is the potential energy, k is the spring constant, and x is the displacement of the spring from its equilibrium position.
For example, using the given details in Example 20 cm, for a spring with a displacement of 6 cm and a spring constant of 4 N/cm, the potential energy is calculated as U = 1/2 × 4 N/cm × (6 cm)² = 0.72 J. This formula is applied in various examples provided, where spring constant and compression or displacement are known.