I am trying to solve the following system of differential equations:
eqn1 = m1 x1''[t] + k1 (x1[t] - x2[t]) + c1 (x1'[t] - x2'[t]) == 0;
eqn2 = m2 x2''[t] + k1 (x2[t] - x1[t]) + c1 (x2'[t] - x1'[t]) + k2 (x2[t]) + c2 (x2'[t])
==c2*(1.09013 Cos[Pi*13.88*t]) + k2*(0.025 Sin[Pi*13.88*t]);
To solve them I am using the following code for NDSolve
:
ivals = {x1[0] == 0, x1'[0] == 0, x2[0] == 0, x2'[0] == 0};
soln = NDSolve[{{eqn1, eqn2}, ivals}, {x1[t], x2[t]}, {t, 0, 10}];
When I try to solve this I get the following error message:
NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0
And I don't understand why.
I would very much appreciate some help.