Question: Consider the general form of Initial Value Problem (IVP) for a coupled system of N first order Differential Equations (DEs), which we will refer to


Consider the general form of Initial Value Problem (IVP) for a coupled system of N first order Differential Equations (DEs), which we will refer to as (First Order IVP): Sy' = F(t, y) y(to) = yo. (First Order IVP) Here y = [y1 y2 . .. yN] is a row vector of unknown components yi = yi(t), and F = [f1 f2 ... fx] is a given row vector-valued function, such that each component fi = fi(t, y) is a function of t and y1, . . ., yn. In (First Order IVP) we are using the prime notation to represent the derivative in t, meaning that y' = [yi y2 ... y'N] = dyl dyz ... dyN dt dt dt For this assignment you will need to build a MATLAB function "rk" which applies a Runge-Kutta method specified by the entries of an input Butcher tableau "B" to numerically solve an input IVP of the form (First Order IVP). As presented in class, this MATLAB function should take as input: a 1 x N vector-valued function "F", an initial value "to", a 1 x N vector-valued initial condition "Yo", the stepsize "h", the number of steps "m" in the t-variable, and an (n + 1) x (n + 1)-matrix "B" which contains the coefficients of a Butcher Tableau. In the questions below we will also refer to the Initial Value Problem (IVP) for a mass attached to a damped spring, given by Jy" = -my' - my, y(0) = yo, y'(0) = vo. (Damped Mass Spring IVP) where y = y(t) = displacement of mass from equilibrium position (m), t = time (s), m = mass (kg), k = stiffness constant (N/m) and c = damping coefficient (N.s/m). The units are not important for this assignment, but we are including them for completeness.Question 1. Under-damped Regime Assume that the mass is m = 1 kg, the stiffness is & = 1.1 N/m, the damping coefficient is = 0.2 N-s/m, the initial displacement is yg = 1 m, and the initial velocity of the mass is vg = 0 m/s. By calling the \"rk\" code you have created multiple times with different inputs, numerically solve (Damped Mass Spring TVP) for the displacement (1) and velocity v(t) = y'(t) of the mass over the time period 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
