DSolve error, Equation or list of equations expected

233 Views Asked by At

pend1[t_] := m x1''[t] + 2 k x1 [t] - k x2[t] == 0;

pend2[t_] := m x2''[t] + 2 k x2[t] - k x1[t] == 0;

iclist = {x1'[0] == 0, x1[0] == 0, x2'[0] == 0, x2[0] == L};

pendlist[t_] = {pend1[t], pend2[t]};

eqnlist[t_] = Append[iclist, pendlist[t]];

soln = DSolve[eqnlist, x2[t], t]

Forewarning: I'm pretty new to mathematica and coding in general, and for this problem my professor gave us 2 ODE's and wants us to solve them simultaneously but doing so in a way that utilizes lists. When I try to execute the DSolve command I get "DSolve:Equation or list of equations expected instead of eqnlist in the first argument eqnlist." and I'm not really sure what this means or how to go about troubleshooting this. Any help/guidance would be much appreciated, thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

Try

DSolve[{m x1''[t] + 2 k x1[t] - k x2[t] == 0, m x2''[t] + 2 k x2[t] - k x1[t] == 0, x1'[0] == 0, x1[0] == 0, x2'[0] == 0, x2[0] == L}, {x1, x2}, t]