function y_out =odes(x,y_in)
% This function produces the respective values of the following first-order
% system that was originally a second-order system.
% y(1) = c'' = u' = -pi^2*x^2*c - pi*s/sqrt(c^2+s^2)
% y(2) = s'' = v' = -pi^2*x^2*s + pi*c/sqrt(c^2+s^2)
% y(3) = c' = u
% y(4) = s' = v
% y(5) = c  
% y(6) = s
% IV_vec is a vector of values that correstpond to c'',s'',c',s',c,s. 
dcdx = y_in(1); dsdx = y_in(2);
c = y_in(3); s = y_in(4);

y_out(1) = -pi^2*x^2*c-pi*s/sqrt(c^2+s^2);
y_out(2) = -pi^2*x^2*s+pi*c/sqrt(c^2+s^2);
y_out(3) = dcdx;
y_out(4) = dsdx;
y_out = y_out';