Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please have advises with it! f'(x ) ~ Dof (2) = f(ath) - f(x - h) 2h which we used to approximate f'(x) at a

please have advises with it!

image text in transcribedimage text in transcribed
f'(x ) ~ Dof (2) = f(ath) - f(x - h) 2h which we used to approximate f'(x) at a specific point a = 0. In this problem we consider the similar problem of needing to approximate f'(x) across a range of x values associated with a spatial domain. 1. Consider the 27-periodic function f(x) = esing. Discretize the interval [0, 47) by In = (X1, X2, . . ., In-1, In} into n equal subintervals of length h = 47, with x1 = 0 and In = 47 - h. Let wi stand for the approximation of f'(x) at x = Ci. Apply the centered difference formula to find wi ~ f'(x;) (hint: since f(x) is periodic, f(xo) = f(*n) and f(In+1) = f(x1)): W1 = 21 (f (2 2 ) - f (In ) ) W2 = - 1 2h (f(23) - f(21 ) ) Wn 2h (f ( x 1 ) - f (In- 1 ) ) 2. Let y = [f(x1), f(x2), . . ., f(In)] and w = [w1, w2, . .., Wn]". Show that the system of equations in part (a) can be written as w = Doy, where the matrix Do is 1 0 0 . . . . . . 0 . . . . 0 O . . . . . 0 Do = . . . 2h 0 1 0 HO ... . . . 0 0 0 0 0 H .. . . . 3. For f(x) = esin, plot the graph of w and the exact derivative f'(x) = cos xesing on the interval x E [0, 47) using n = 10, 20, and 80. Notice that most of the entries in Do are zero; thus, Do is an example of a sparse matrix. Use the Matlab tool diag to construct Do- 4. Repeat part 3 for the following functions on the interval [0, 67). (a) g(x) = sin x + 2 sin 3x cos x (b) h(x) = sin x + sin 10x(C) 9(3) = esinmoosa: 5. The matrix D0 approximates the rst derivative of a function given n values of that function; it seems reasonable to expect that (Dally = DUDgy might approximate the second derivative. Test this idea on the function f(:c) = 83h\". Compare the structure of (.00)2 to Do and comment on the number of nonzero diagonals in (D0)2 compared to D0. 6. Explore the connection between the operation of matrix multiplication and differ- entiation further by considering (D9)\" as a proxy for f("), the nth derivative of a function. Find the rst 4 derivatives of f(z) = sin 37 +0.3 sin 23: 0.4 sin 31:. Write a Matlab program that computes the rst four derivatives\" approximations (Dg)kf(z) for k : 2,3,4 and :17 E [0,61r). Plot the exact derivatives on the same axes with their approximations using 7; : 100 grid points. Discuss the connection between the step size h and the accuracy of the approximation as the order of differentiation increases (note: this will require several values of 7;). Support your discussion with quantitative results (tables, Taylor series analysis, or log-log plots). Project B : Two-point boundary value problems Use the methods discussed in class for the nite dierence scheme and LU solver. Note that your code should not construct the entire matrix; instead, use linear arrays containing the nonzero matrix elements. 1. Consider the 2-point BVP, ey\" + y = 2m +1 on the domain 0 S w 5 1, with boundary conditions y(0) = 0, y(1) = 0 and E = 103. 13: . . . _ a: _ 1 '1 Show that the exact solution ls y(a:) 23+1 (slnh \\/E + 3 slnh E) (smh E) . 1 Plot the exact solution and the numerical solution for h = 32. 2. A wooden beam of square cross section is supported at both ends and is carrying a distributed lateral load of uniform intensity to 2 201b/ ft and axial tension load T = 1001b. The deection, 11(3)), of the beam's satises the equation T w u\" Eu = m$(L x), 71(0) = u(L) = 0, where L = 5 ft is the length, E = 1.3 X 10'3 lb/in2 is the modulus of the elasticity and I = s4 is the moment of inertia of the beam. The side length ofthe square cross section is s = 4 inches. Determine the deection the beam at 1-inch intervals. Also calculate two additional cases: 2inch and 4inch intervals. Plot all three cases on the same axes (use difference symbols to distinguish the cases). Give the maximum beam deection computed in each case

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Probability

Authors: Mark Daniel Ward, Ellen Gundlach

1st edition

716771098, 978-1319060893, 1319060897, 978-0716771098

More Books

Students also viewed these Mathematics questions

Question

\f

Answered: 1 week ago