Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( Please explain both A and B ) I think A is not coding and B is . Question 1 . Taylor Polynomials Engineers and

(Please explain both A and B) I think A is not coding and B is. Question 1. Taylor Polynomials Engineers and physicists frequently use the approximation sin(x) x for x small, which is a first-order Taylor polynomial approximation for sin(x) centered at x =0. In this exercise we will use Taylors theorem to create a simple MATLAB function capable of telling us what degree of Taylor polynomial approximation is needed to obtain a desired level of accuracy on a specified interval. (a) Let Pn(x) be the degree n Taylor Polynomial for f(x)= sin(x) about x =0. Find n so that Pn(x) is within 104 of sin(x) for all x in [1,1].(b) Create a MATLAB function that takes as input a positive parameter k, an interval radius \delta (call \delta something like delta in MATLAB), and a desired error threshold err, and returns a value n for which you can prove that the n th-order Taylor Polynomial for f(x)= sin(kx) about x =0 is within err of sin(kx) for all x in [\delta ,\delta ]. Call your function with suitable input values to reproduce your answer to question 1(a). HINT: Your code does not need to be complicated! By mimicking your theoretical analysis from 1(a), you should only need MATLAB at the very end of this problem, where you can write some code to find the first n satisfying a certain inequality, rather than looking for it by hand (as we did in class).Question 1. Taylor Polynomials
Engineers and physicists frequently use the approximation sin(x)~~x for x small, which is a first-order Taylor
polynomial approximation for sin(x) centered at x=0. In this exercise we will use Taylor's theorem to create a
simple MATLAB function capable of telling us what degree of Taylor polynomial approximation is needed to obtain
a desired level of accuracy on a specified interval.
(a) Let Pn(x) be the degree n Taylor Polynomial for f(x)=sin(x) about x=0. Find n so that Pn(x) is within
10-4 of sin(x) for all xin[-1,1].
(b) Create a MATLAB function that takes as input a positive parameter k, an interval radius (call something
like delta in MATLAB), and a desired error threshold err, and returns a value n for which you can prove that
the nth-order Taylor Polynomial for f(x)=sin(kx) about x=0 is within err of sin(kx) for all xin[-,]. Call
your function with suitable input values to reproduce your answer to question 1(a).
HINT: Your code does not need to be complicated! By mimicking your theoretical analysis from 1(a), you
should only "need" MATLAB at the very end of this problem, where you can write some code to find the first
n satisfying a certain inequality, rather than looking for it by hand (as we did in class).
((dddddestion 1. Taylor Polynomials Engineers and physicists frequently use the approximation sin(x) x for x small, which is a first-order Taylor polynomial approximation for sin(x) centered at x =0. In this exercise we will use Taylors theorem to create a simple MATLAB function capable of telling us what degree of Taylor polynomial approximation is needed to obtain a desired level of accuracy on a specified interval. (a) Let Pn(x) be the degree n Taylor Polynomial for f(x)= sin(x) about x =0. Find n so that Pn(x) is within 104 of sin(x) for all x in [1,1].(b) Create a MATLAB function that takes as input a positive parameter k, an interval radius \delta (call \delta something like delta in MATLAB), and a desired error threshold err, and returns a value n for which you can prove that the n th-order Taylor Polynomial for f(x)= sin(kx) about x =0 is within err of sin(kx) for all x in [\delta ,\delta ]. Call your function with suitable input values to reproduce your answer to question 1(a). HINT: Your code does not need to be complicated! By mimicking your theoretical analysis from 1(a), you should only need MATLAB at the very end of this problem, where you can write some code to find the first n satisfying a certain inequality, rather than looking for it by hand (as we did in class).Question 1. Taylor Polynomials
Engineers and physicists frequently use the approximation sin(x)~~x for x small, which is a first-order Taylor
polynomial approximation for sin(x) centered at x=0. In this exercise we will use Taylor's theorem to create a
simple MATLAB function capable of telling us what degree of Taylor polynomial approximation is needed to obtain
a desired level of accuracy on a specified interval.
(a) Let Pn(x) be the degree n Taylor Polynomial for f(x)=sin(x) about x=0. Find n so that Pn(x) is within
10-4 of sin(x) for all xin[-1,1].
(b) Create a MATLAB function that takes as input a positive parameter k, an interval radius (call something
like delta in MATLAB), and a desired error threshold err, and returns a value n for which you can prove that
the nth-order Taylor Polynomial for f(x)=sin(kx) about x=0 is within err of sin(kx) for all xin[-,]. Call
your function with suitable input values to reproduce your answer to question 1(a).
HINT: Your code does not need to be complicated! By mimicking your theoretical analysis from 1(a), you
should only "need" MATLAB at the very end of this problem, where you can write some code to find the first
n satisfying a certain inequality, rather than looking for it by hand (as we did in class).
((ddddd
image text in transcribed

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