The assignment is for Matlab software. I need the codes for bold parts of this assignment but I do not know if you need

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

The assignment is for Matlab software. I need the codes for bold parts of this assignment but I do not know if you need

Post by answerhappygod »

The assignment is for Matlab software. I need the codes for bold
parts of this assignment but I do not know if you need to complete
the previous tasks first before doing the last two tasks. So just
to be safe, I would like codes for all tasks. Thank you.
A New Formula for Approximating Derivatives
The Assignment Is For Matlab Software I Need The Codes For Bold Parts Of This Assignment But I Do Not Know If You Need 1
The Assignment Is For Matlab Software I Need The Codes For Bold Parts Of This Assignment But I Do Not Know If You Need 1 (21.3 KiB) Viewed 59 times
In addition to Forward, Backward, and Central Difference
formulas learned in class, the derivative of a function can
also be approximated by the following formula
.
In the following tasks, you will implement this formula in MATLAB,
analyze its convergence, and determine the order at which the
approximation error decreases as decreases. You will also
compare its performance with those of Forward and Central
Difference formulas.
Task 1 [5 pts]: Create a function file to implement the above
differentiation formula. The function should take as inputs the
function , the point , and stepsize .
edit df_new_formula.m
Investigate the Error Behavior
Simillar to the Forward, Backward and Central Difference formulas,
this formula has an approximation error that is roughly
proportional to for some positive integer . Find by
completing the task below.
Task 2 [10 pts]: Pick a function , a point and a series of
decreasing values. Choose a function that you can calculate
the derivative easily (as we need to compare the approximation with
the exact value). If you really love polynomials, use the ones with
degree and consists of several terms. Write MATLAB code
to
compute the approximations to for each value of (use
the for-loop)
calculate the absolute error for each value of ,
observe how the errors behave with respect to , and determine the
value of .
Write your code below:
Question/observation:
Describe how the error decreases as decreases.
The approximation error that is roughly proportional to for
some positive integer . Find based on your observation.
Type your answers below:
Task 3 [10 pts]: Produce a convergence plot. Make sure to
include the following items:
use loglog scale
include a reference slope showing the convergence rate (the
value)
include appropriate labels and legend
Write your code below:
Compare Performance
Task 4 [15 pts]: Repeat the above steps for
Forward and Central difference formulas. Compare the performance of
this new formula that you derived with those of the Forward and
Central difference formulas. Use the same function , the point
and the values.
Produce ONE convergence plot that includes ALL three methods. Make
sure to include the following items:
use loglog scale
include reference slopes showing different convergence rates
include labels, legend and title
Write your code below:
Task 5 [5 pts] Observations and Comments:
Finally, describe your observations and comment on the performance
of this new formula in comparison to the forward and central
difference formulas.
Write your observations and comments here.
A New Formula for Approximating Derivatives In addition to Forward, Backward, and Central Difference formulas learned in class, the derivative f'(x) of a function can also be approximated by the following formula f'(x) = -25f(x) + 48f(x+ h) – 36f (x + 2h) +16f(x + 3h) – 3f(x + 4h) + (ha). 12h In the following tasks, you will implement this formula in MATLAB, analyze its convergence, and determine the order a at which the approximation error decreases as h decreases. You will also compare its performance with those of Forward and Central Difference formulas.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply