Physics 131 Spring Lab

Energy Function

This function gives the energy as a function of position and velocity.

e[y_, v_] := m g y + (1/2)k(((y - yR))^2) + (1/2)m (v^2)

Constants -- put in your values!

k = 3.0;
yR = 0.60;
m = 0.106;
g = 9.8;

The equilibrium height can be deduced:

yeq = yR - m g / k

Now set up the requested initial and final conditions.

vi = 0;
vf = 0.75;
yf = yeq;

Now solve for yi.

Solve[e[yi, vi] == e[yf, vf], yi]