Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The code is almost completed, there is just missing information. Explanations of variables/statements missing are appreciated. Function nudi 2x #tilin e 1,10) 2 p ac

The code is almost completed, there is just missing information. Explanations of variables/statements missing are appreciated.image text in transcribed

Function nudi 2x #tilin e 1,10) 2 p ac (7.5, 0.5) figure 1) plot it, it ' , 'Liewidth', 1.5); held on plot (x, x), kol plot xh, Exeh, 'b'); plot Is , Ex-hl, bo') 79 0.16 0.1] titlePress Space Bar to Com xlabel('x'); label' x)) xlabel("h), ylabel(true relative error()) legend("Forward', 'backward', 'centered, location', 'beat. ) fprintf(" df/dx at B: 17.3 (exact) n'exact) EprintEthit forwardit backward ww w a bit ca cin'); fprintf('17.3ft 7.3 .3 17.3 17. SEE 7.5 17.5 In'... (dx;dt tid bid a fea_bea_el: end subfunctions can be added to a function file only wubunction Eos E (x) wubunction Eor di/dx Eunction - dE k for $1.10 Ex - ...); backward point Ex -t... forward point DE E . .../h forward Finite di appre af b() ( l/h; backward finita di approx DE (1) .../12h) centered Einite diff approx dalah ore inteli 1. Differentiate the following function: f(x) = - 2x + 1 and solve its first derivative atr8 2. Numerically evaluate the approximatex first derivative from the above function at I= 8 and h= 0.15 by the following: pl. [df ) ) Ervard alope p2 - Id 21 backward slope p3 - de er al center alope (exista dalate al end g-plot (t2.polyval (pl. 2), t2.polyval (p2, 2), 'b'.t2.. polyvalp,2).'g'l 1- legend sens. Bx 131, 13x +18'1,5x1-181,.. Evds. intr31.w intatil Setr i n ) 31. location',' '); 1. Interpreter latex'; (a) Forward finite difference method (b) Backward finite difference method (c) Centered finite difference method 3. Calculate the error of each method by comparing the numerical derivative with the result from problem 1. S eat-aba exact df /exact) 100 percent true rel err forward Ob sb (exact-a /exact) 100 percent true mel err-backward ao-aba (exact-df_ /exsct) 100 percent true rel err-centered elose all: 12) loglog ldx.ca . ..de 'be s , '--'); itle('inite Difference E . Interval Size t Function nudi 2x #tilin e 1,10) 2 p ac (7.5, 0.5) figure 1) plot it, it ' , 'Liewidth', 1.5); held on plot (x, x), kol plot xh, Exeh, 'b'); plot Is , Ex-hl, bo') 79 0.16 0.1] titlePress Space Bar to Com xlabel('x'); label' x)) xlabel("h), ylabel(true relative error()) legend("Forward', 'backward', 'centered, location', 'beat. ) fprintf(" df/dx at B: 17.3 (exact) n'exact) EprintEthit forwardit backward ww w a bit ca cin'); fprintf('17.3ft 7.3 .3 17.3 17. SEE 7.5 17.5 In'... (dx;dt tid bid a fea_bea_el: end subfunctions can be added to a function file only wubunction Eos E (x) wubunction Eor di/dx Eunction - dE k for $1.10 Ex - ...); backward point Ex -t... forward point DE E . .../h forward Finite di appre af b() ( l/h; backward finita di approx DE (1) .../12h) centered Einite diff approx dalah ore inteli 1. Differentiate the following function: f(x) = - 2x + 1 and solve its first derivative atr8 2. Numerically evaluate the approximatex first derivative from the above function at I= 8 and h= 0.15 by the following: pl. [df ) ) Ervard alope p2 - Id 21 backward slope p3 - de er al center alope (exista dalate al end g-plot (t2.polyval (pl. 2), t2.polyval (p2, 2), 'b'.t2.. polyvalp,2).'g'l 1- legend sens. Bx 131, 13x +18'1,5x1-181,.. Evds. intr31.w intatil Setr i n ) 31. location',' '); 1. Interpreter latex'; (a) Forward finite difference method (b) Backward finite difference method (c) Centered finite difference method 3. Calculate the error of each method by comparing the numerical derivative with the result from problem 1. S eat-aba exact df /exact) 100 percent true rel err forward Ob sb (exact-a /exact) 100 percent true mel err-backward ao-aba (exact-df_ /exsct) 100 percent true rel err-centered elose all: 12) loglog ldx.ca . ..de 'be s , '--'); itle('inite Difference E . Interval Size t

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

=+Where does the focus of labor relations lie? Is it collective

Answered: 1 week ago

Question

=+With whom does the firm have to negotiate?

Answered: 1 week ago