$\frac{d^2y}{dt^2} = -g$
Suppose an object is thrown into the air at t=0 s with an unknown vertical speed v0 and after 3s
the ball hits the ground.
[5] a) Solve analytically the ODE given above and find a function for the vertical position of the
ball y(t) and calculate the initial velocity of the ball at t = 0.
[15] b) Discretize the ODE by hand using the finite difference method and end up with a linear
system Ay = b where A is of size 5x5. (This means you should have 5 equations and 5 unknown y-
positions of the ball.--> Position for the time levels [0.5, 1.0, 1.5, 2.0, 2.5])
y(t = 0.5) => y1
y(t = 1.0) => y2
y(t = 1.5) => y3
y(t = 2.0) => y4
y(t = 2.5) => y5
Finite Difference Equation
$\frac{d^2y}{(dt)^2}|_{t=t_i} \approx \frac{-2y_i + y_{i-1} + y_{i+1}}{\left(\Delta t\right)^2}$
[10] c) Row reduce the augmented matrix [A|b] in b) and convert it into Echolon form (upper-
triangular form in this case too.) and solve using Backward substitution
[20] d) Write a Matlab script that can generate the A matrix and the b vector and solves for the
position of the ball at the time intervals [0.25, 0.50, 0.75, 1.00, ......, 2.75] and plot t vs y.