Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need this question answered in Matlab. Please show your code, that is the only way this question can be answered correctly. The second photo

I need this question answered in Matlab. Please show your code, that is the only way this question can be answered correctly. The second photo is a pseudo code that shoiuld be followed thanks. Also follow directions closely. Thanks

image text in transcribedimage text in transcribed

QUESTION 1: (Problem 19.5) The function f(x) = e-x can be used to generate the following table of unequally spaced data: x 0 0.1 0.3 0.5 0.7 0.95 1.2 f(x) 0.9048 0.7408 0.6065 0.4966 0.3867 0.3012 Evaluate the integral from a = 0 to b= 0.6 using (a) thc trapezoidal rule, compute the true percent relative error Integral using built-in function: built in function syms x Itrue-int (exp(-),a,b)i % built in function % func- @ (x) exp (-?); OR Itrue integral (func, a, b) Trapczoidal rule (cqually spaced segments): where h-(b-a)n; n numher of segments Trapczoidal rule (unequally spaced segments) f(x)+f(x2) f(xn-l) + f(%) Simpson's 13d rule: f(to) + 4f(xl)+f(x2) -[f(xo) + 4f(xi ) + f(x2)] 1(b-a) OR Where -(b-an; a x0, b-x2, and x1- the point midway betwcen a and b, which is given by (a t b)2: number of segments. Simpson's 3/8th rule: OR 3h where h= (b-a)/3

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

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

Discuss the states of accounting

Answered: 1 week ago

Question

Knowledge of project management (PMI) teachings

Answered: 1 week ago