Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

InClassHandout 08 P1. Derivative of a function f(x) at a particular value of x can be approximately calculated by th-f) where h is the step

image text in transcribed
InClassHandout 08 P1. Derivative of a function f(x) at a particular value of x can be approximately calculated by th-f) where h is the step size. dr (a) Write a MATLAB function defined below that calculates the approximate derivative of f(x)-e.The function definition is given below: function [appDerv, exDerv, etl-myDerv(x,h %Function file: myDerv.m %Purpose : % Calculate approximate derivative using (f(x+h)-f(x))/h, ex % derivative f"(x) and true percentage relative error of a function % f (x)-x" 3 * exp (-21x) %Record of revisions (Date | Programmer , Change): 8 Date Name Original program %inputs : % x- (1x1) value of x where derivative needs to be calculated % h- (1x1) step size used in approximat e derivative formula outputs: appDerv (1x1) approximate derivative calculated as (E (X 03)5/h % exDerv- (1x1) exact derivati -(1x1) true percentag % et er (b) Using the above program, determine the approximate derivate and true percentage relative error at -1 with h0.05 and h-0.1. What is the approximate percentage relative error

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions