I have a dynamic model which undergoes two distinct stages. The system starts out with certain initial conditions and once a specific point is reached in stage 1, these ending conditions are used as the initial conditions for stage 2, and the remainder of the solution is calculated. I am attempting to solve for the steady-state equilibrium point by taking the derivative of the potential energy with respect to each generalized coordinate, setting equal to zero, and solving. For stage 1:
$$ V_{im} = \frac{1}{2}k_1y_1^2 + \frac{1}{2}k_2(y_2-y_1)^2 + k_r \theta_o^2+m_1gy_1 \\ +m_2g(y_1+y_2)+2m_3g(y_1-l \sin{\theta_o}) +\frac{1}{4}k_{1n}y_1^4+\frac{1}{4}k_{2n}(y_2-y_1)^4 $$ and for stage 2:
$$ V_{de} = \frac{1}{2}k_1y_1^2+\frac{1}{2}k_2(y_2-y_1)^2+k_r\theta^2 + m_1gy_1 \nonumber\\ + m_2g(y_1+y_2) + 2m_3g(y_1-l\sin{\theta}) + \frac{1}{4}k_{1n}y_1^4 + \frac{1}{4}k_{2n}(y_2-y_1)^4 $$ where $ \theta_o$ was a constant while $ \theta$ is variable. Still, these reveal the same two derivatives:
$$ \frac{\partial V}{\partial y_1} = k_1y_1+k_2(y_1-y_2)+g(m_1+m_2+2m_3) +k_{1n}y_1^3-k_{2n}(y_2-y_1)^3=0 $$ and
$$ \frac{\partial V}{\partial y_2} = k_2(y_2-y_1)+m_2g +k_{2n}(y_2-y_1)^3= 0 $$
Therefore, I would assume that both stages would have the same steady-state position, but this is not always the case once I run the entire simulation numerically in MATLAB (details not shown). Sometimes the steady-state of stage 1 matches the calculated value and not stage 2, and sometimes it is the opposite way around. What could be causing this discrepancy?
For comparison, stage 1 and stage 2 position graphs as described are below:
The values of the constants are the same throughout the simulations.