Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE MATLAB! USE MATLAB! QUESTION 2: The quadratic approximation of a function f(x) with its Maclaurin polynomials is given as follow: T(x)= f(0)+ L'Or+fO) 1!

USE MATLAB!

image text in transcribed

USE MATLAB!

QUESTION 2: The quadratic approximation of a function f(x) with its Maclaurin polynomials is given as follow: T(x)= f(0)+ L'Or+f"O) 1! 2! Based on the definition of derivative, the first and second derivative of a function f(x) are defined by (1) and (2) respectively. S'(x)=, lim, f(x+k)-f(x) (1) k f"(x)=, lim f'(x +k)- f'(x) f(x+k)-2f(x)+ f(x-k) lim (2) k k? Write a function diff12 that returns the coefficients of T(x). The function will receive 2 input arguments: the mathematical function (f) and the value k. Start with the function definition shown below. Use function handle to test "diff12. Other built-in functions and loops can be used if necessary. function [ output ] = diff12 (f, k) $ [OUTPUT] = DIFF12 (F,K) returns the coefficients of the Maclaurin % polynomials of f(x) end For example, if we use function handle to call the built-in cos function with k = 0.0001, we will see the following outputs: >> y = diff12 (@cos, 0.0001) Y = 1.0000 -0.0000 -0.5000

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_2

Step: 3

blur-text-image_3

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

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions

Question

=+How might you explain this phenomenon?

Answered: 1 week ago