VRedlund

5 Reputation

One Badge

0 years, 75 days

MaplePrimes Activity


These are questions asked by VRedlund

My forced spring mass system is 4x"+4x'+3x=sin(wt). I calculated my w=w* value that maximizes the amplitude (0.5) and my initial conditions are x(0)=x'(0)=0. I need to graph x(t) when w= w* and when w=w*/2. How am I supposed to input this information into maple to create a graph? 

I am trying to plot a Runge-Kutta method for 1+ tsin(tx). When ever I try to do the plot data command an empty graph shows up. I noticed that some of my values from the algorithm did not calculate properly. How do I fix this problem? This is what I typed in for the calculations. 

f := (t, x) -> 1 + t*sin(x);
t[0] := 0;x[0] := 0;
h := 0.1;
 

for n to 20 do
    t[n] := n*h;
    m1 := f(t[n - 1], x[n - 1]);
    m2 := f(t[n - 1] + h/2, x[n - 1] + m1*h/2);
    m3 := f(t[n - 1] + h/2, x[n - 1] + m2*h/2);
    m4 := f(t[n - 1] + h, h*m3 + x[n - 1]);
    x[n] := x[n - 1] + h/6*(m1 + 2*m2 + 2*m3 + m4);
end;
 

Page 1 of 1