function dy=sensitivity_fun(t,y)

dy1=y(2);
dy2=-sin(y(1))-y(2);
dy3=y(4);
dy4=-y(3)*cos(y(1))-y(4)-y(2);
dy5=y(6);
dy6=-y(5)*cos(y(1))-y(6)-y(2)*cos(y(1));
dy7=y(8);
dy8=-y(7)*cos(y(1))-y(8)-sin(y(1));

dy=[dy1; dy2; dy3; dy4; dy5; dy6; dy7; dy8];