Question: I need it in MatLab Code. Show all work. Will thumbs up . [ 2 5 p ] The first derivative d f ( x

I need it in MatLab Code. Show all work. Will thumbs up.
[25p]
The first derivative df(x)dx of a function f(x) at a point x=x0 can be approximated with the two-point central difference formula:
df(x)dx=f(x0+h)-f(x0-h)2h
where h is a small number relative to x0. Write a user-defined function function (see Section 7.9) that calculates the derivative of a math function f(x) by using the two-point central difference formula. For the user-defined function name, use dfdx=Funder(Fun,x0), where Fun is a name for the function that is passed into Funder, and x0 is the point where the derivative is calculated. Use h=x0100 in the two-point central difference formula. Use the user-defined function Funder to calculate the following:
(a) The derivative of f(x)=x3e2x at x0=0.6
(b) The derivative of f(x)=3xx2 at x0=2.5
In both cases compare the answer obtained from Funder with the analytical solution (use format long).
I need it in MatLab Code. Show all work. Will

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!