% UDMP % L.Linares 2008 % For a second order differential equation with % complex conjugate eigenvalues with real part % "sigma" and imaginary part "omega", and knowing % the initial conditions: % yo = initial value of the function of time f(0). % yo'= initial value of the derivative of f'(0). % yf = final value of the function of time f(infin). % s = "sigma" % w = "omega" % NOTE: In the code, * means multiply. % It produces k1 and k2 so: % y(t) = k1.exp(s.t).sin(w.t+k2)+yf << "yo Dyo yf sigma omega" PROMPT -> yo dyo yf s w << yo yf - DUP s * dyo SWAP - w / -> a b << a b / ATAN DUP SIN INV a * SWAP "k2=" ->STR SWAP + SWAP "k1=" SWAP + SWAP >> >> >>