Question: BME 2740 Modeling and Simulation Assignment 1 1. Consider the arrays c - [3 5 071 0] and d 13 5 42 7 3] Using
BME 2740 Modeling and Simulation Assignment 1 1. Consider the arrays c - [3 5 071 0] and d 13 5 42 7 3] Using a for loop in MATLAB create a new array, b, that contains the sum of the element-wise products of c and d, that is, b a. b. Verify your answer from part a using the MATLAB a combination of the sum and. commands. 2. The Taylor Series requires computing multiple derivatives of the target function about some point a, f(n) (a). This value is then plugged in to the series equation f(x) Zoe an-a)" to find the a. Without MATLAB, compute the first 5 derivative terms (n 0,1,2,3,4) off (a) for the b. The general equation for derivatives for 2e-2x for a O is f(a)(-2)+1. Compute the m)(a) full approximation. function f (x) = 2e-2x for a 0. absolute series approximation error at x-1 and x 0 for a 3 term and 5 term approximation of 2e2x for a 0. Hint: you may edit the following code fragment to complete this part if you so choose (note that ??? is not proper MATLAB code): n=0 : ? ??; error = abs (2-exp (-2.1x) disp (error) -sum ( ??? ./factorial (n) *x."n )); 3. Consider the function f(x) 3x3 + x. a. Without MATLAB, compute the first 5 derivative terms (n 0,1,2,3,4) of fn (a) for the function about a- 2 How many terms in the Taylor Series would you need for a good approximation of this target function? Briefly justify your answer. b. (-3)x44 4. The Taylor Series expansion ofCx) for a o is f)ple MATLAB code, Tsexample to plot a 6-term expansion from x =-1 to x-1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
