Beruflich Dokumente
Kultur Dokumente
Problem 1: The motion of a damped spring-mass system shown in the following figure is
described by the following ordinary differential equation:
d 2x dx
m 2 c kx k x 3 0
dt dt
where x = displacement from equilibrium position (m), t = time (s), m = 10 kg mass, and
c = the damping coefficient (N.s/m). The spring constant k and the damping coefficient c are
10 N/m and 5 N.s/m, respectively. The initial velocity is zero, and the initial displacement is
x = 0.8 m.
Heun’s method with iterations for the corrector equation, b) forth-order RK method and c)
MATLAB “ode45” function. In all cases use step sizes of h=0.01 and h=0.2, and simulate
the system response over the time period 0 ≤ t ≤ 5 s. Consider a proper percent relative error
s for solving part (a).
Plot the displacement and velocity versus time for all cases and compare your results
obtained from various methods. Also, plot the true percent relative error versus time for all
cases (a), (b) and (c) on the same curve and for two step sizes of h=0.01 and h=0.2.
1
Shiraz University School of Mechanical Engineering
Numerical Analysis Project Deadline Date: 4th Bahman
Problem 2: Suppose that the position x of a falling object is governed by the following
differential equation with boundary conditions
x m x x g 0
c 3
x 0 5 and dx
x 1 1 35
dt