Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Matlab script to obtain the first derivative estimates of the following unequally spaced data: x 1 f(x) 0.6767 1.5 0.3734 1.6 0.3261

 

Write a Matlab script to obtain the first derivative estimates of the following unequally spaced data: x 1 f(x) 0.6767 1.5 0.3734 1.6 0.3261 2.5 3.5 0.08422 0.01596 In fact, the data belongs to f(x)=5xe2x. Compare numerical and analytical derivatives by plotting them on the same graph. Algorithm: Step 1: Enter data points Step 2: Calculate derivative for each point using 2nd order Lagrange polynomial (see the formula below). Step 3: Calculate the analytical derivatives for each point. Step 4: Compare the results by plot the numerical and analytical derivatives on the same graph (do not forget to include labels and the legend) 2x-x-1-X1+1 + f(x)- (x-x-1)(xX1+1) Formula for 2nd order Lagrange polynomial: f(x) = f(x-1) 2x-xj-Xj+1 (x-1-x)(x-1-X1+1) + f(x1+1)- 2x-x-1-x (X+1-X-1)(x+1-x)

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

Electric Machinery

Authors: Charles Kingsley, Jr, Stephen D. Umans

6th Edition

71230106, 9780073660097, 73660094, 978-0071230100

More Books

Students also viewed these Programming questions

Question

The following array represents a heap False

Answered: 1 week ago