Answered step by step
Verified Expert Solution
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!
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.5000Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started