All photos are one question.
The question should be solved using Matlab.
Please send a photo of your code on Matlab. Thank you.
In this Case Study we build upon the example given i .1 in the textbook. The author called this the "Bungee Jumper proble. There, it was shown that the equation to describe the velocity of the free falling bungee jumper is given by du = g-Sp (v(0) =0.0 tj) t dt The definition of the variable names are given in the text book. In addition, the analytical solution of the problem is given in the text book as gm The learning objectives of this case study are three fold 1. to understand the theory of how to construct a numerical solution of Equation 1 using a Taylor series 2. to understand how to program this in MATLAB 3. to understand how truncation and step size affect the error of the numerical solution Constructing a Numerical Solution In this subsection, we will present a methodology to approximate the solution of equations of the form y' = f(t, y(t)) (y(a) = , a t b) This equation is similar in form to the equation generated by the "Bungee Jumper proble" At the end of this note we will solve the Equation using the techniques presented. With numerical approaches the solution y(t) is estimated at discrete instances in time, called mesh points in the interval t E [, ). If we stipulate that N mesh points are equally distributed in the interval [a, , then t = + (i-Jh (i=1.2.3. . . . ,N) The key to constructing the numerical solution is applying a Taylor series each grid point. Two examples will be given below. We begin by defining a second order Taylor series approximation of a polynomial, e. at For clarity in the subsequent presentation we define the first term on the righthand side of Equation 6 as the zeroth order approximation, the second term as the first order approximation. and the third term as the second order approximation. The difficulty in constructing the numerical scheme is estimating the derivatives contained in the first and second order terms. so, we use Equation 1 where we see that dy df With this, the approximate formula for each grid point is given by The pseudocode below indicates one possible approach to solve the problem Problem: Approximate the solution of the problem f(t,y) a, aSt b at N equally spaced numbers (grid points) in the interval a, b) Input: endpoints a,b; integer N; nitial condition a Output: y at N values of t Step 1: -Set h = (b-a)/(N-1), - Construct mesh using Initialize solution y(ti)a Step 2: For i = 1.2.3 N-1, calculate y(4.1) using Equation 9 Step 3: Output (t. y) This can be translated into the following MATLAB code as 3 of 4 function t,y - CaseStudy2(a,b,N,alpha,g,m,Cd) %CaseStudy2 Approximates the solution of an equation of the form y f(t,y(t)) (y(a)-alpha, a