Question: difficulties with plot. Ode system linear. Coupled oscillators with damping.

Hi, i wouls lij=ke to see the consequences of damping on coupled oscillators.

I encounter no problem with

restart; m := 1; k1 := 1; k2 := 1; lambda := 0;

eq1 := m*diff(x1(t), `$`(t, 2)) = -k1*x1(t)+k2*(x2(t)-x1(t))-lambda*diff(x1(t), t);

eq2 := m*diff(x2(t), `$`(t, 2)) = -k2*(x2(t)-x1(t)); ICS := x1(0) = 1, x2(0) = 0, (D(x1))(0) = 0, (D(x2))(0) = 0; sol2 := dsolve({ICS, eq1, eq2}, {x1(t), x2(t)});

plot(eval(x2(t), sol2), t = 0 .. 20);

 

BUT problem with

restart; m := 1; k1 := 1; k2 := 1; lambda := 1;

eq1 := m*diff(x1(t), `$`(t, 2)) = -k1*x1(t)+k2*(x2(t)-x1(t))-lambda*diff(x1(t), t);

eq2 := m*diff(x2(t), `$`(t, 2)) = -k2*(x2(t)-x1(t)); ICS := x1(0) = 1, x2(0) = 0, (D(x1))(0) = 0, (D(x2))(0) = 0; sol2 := dsolve({ICS, eq1, eq2}, {x1(t), x2(t)});

plot(eval(x2(t), sol2), t = 0 .. 20);

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct.

solution is

I've tried with numeric.

Have u got an idea

Please Wait...