Use Matlab (or any other programming language/environment — NO Excel) to implement:

1) Use Matlab (or any other programming language/environment — NO Excel) to implement your version of the Basic Euler, the Runge-Kutta 4*” order (RK4) and Adams-Bashforth 4″ order methods.
2) Use your implemented routines to approximate the states x,(t), x,(t) and x,(t) in the interval 0 <= t <= 500, with initial conditions:
x,(0)=-7m, x,(0)=7m, x,(0)=-3m, dx,/dt(0) = -3 m/s, dx,/dt(0)=-2 m/s, dx;/dt(0)= -1 m/s

when
– the masses are: m, = (the last digit of your registration number divided by 3) + 1 [kg];
– m, = the last digit of your registration number* [kg];
– m3 = (the last digit of your registration number divided by 2) + 2 [kg];
– the external force F(t) is given by the function my Force: F=myForce(t);

3) Solve/integrate by using the Basic Euler, the RK4, and the Adams-Bashforth 4″ order (initialised via RK4) methods with At=1, and
– plot Figure 1a: x,(t) obtained by RK4; plot Figure 1b: x,(t) obtained by AB4; plot Figure 1c: x,(t) obtained by BE;
– plot Figure 2a: x,(t) obtained by RK4; plot Figure 2b: x,(t) obtained by AB4; plot Figure 2c: x,(t) obtained by BE;
– plot Figure 3a: x,(t) obtained by RK4; plot Figure 3b: x,(t) obtained by AB4; plot Figure 3c: x,(t) obtained by BE

4) Solve/integrate by using the Basic Euler, the RK4, and the Adams-Bashforth 4th order (initialised via RK4) methods with At=0.5, and
– plot Figure 4a: x,(t) obtained by RK4; plot Figure 4b: x,(t) obtained by AB4; plot Figure 4c: x,(t) obtained by BE;
– plot Figure 5a: x,(t) obtained by RK4; plot Figure 5b: x,(t) obtained by AB4; plot Figure 5c: x,(t) obtained by BE;
– plot Figure 6a: x,(t) obtained by RK4; plot Figure 6b: x,(t) obtained by AB4; plot Figure 6c: x,(t) obtained by BE;

5) Solve/integrate by using the Basic Euler, the RK4, and the Adams-Bashforth 4th order (initialised via RK4) methods with At=0.1, and
– plot Figure 7a: x,(t) obtained by RK4; plot Figure 7b: x,(t) obtained by AB4; plot Figure 7c: x,(t) obtained by BE;
– plot Figure 8a: x,(t) obtained by RK4; plot Figure 8b: x,(t) obtained by AB4; plot Figure 8c: x,(t) obtained by BE;
– plot Figure 9a: x,(t) obtained by RK4; plot Figure 9b: x,(t) obtained by AB4; plot Figure 9c: x,(t) obtained by BE

6) Derive the static equations of the system and use both a direct and an iterative numerical method among those that we have studied in this module to find the position of the masses when F=myforce(500), and compare the results with what obtained at the points 3), 4) and 5).

WhatsApp icon