Question

Please use matlab to solve the question.1. The following infinite series can be used to approximate e*: 2 3! n! Prove that this Maclaurin series expansion is a special case of the Taylor series (Eq. 4.13) with Xi = 0 and h a) x. b) Use the Taylor series to estimate f(x) e* at xH1 1 for x-0.25. Employ the zero-, first-, second- and third-order versions and compute the letlfor each case. Take the true value of e10.367879 for computing E

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hi,

The answer to your question is

a)

clc%clears the console
clear all%clears the history
close all%closes all opened files
syms f(x) sum(x) F(x)
f(x)=exp(x);
F=f;
xi=0;
sum(x)=0;
for i=0:10
sum=sum+F(xi)*((x-xi)^i)/factorial(i);
F=diff(f);
end
sum​

This file can be published to a formatted document. For more information, see the publishing video or help. clc%clears the console clear all%clears the history close all%closes all opened files syms f(x) sum (x) f (x) -exp (x); 3- F (x) 6- F=f. 7- xi=0; 8sum (x)-0 9_ 무 for i=0:10 0-1 sum=sum+F(xi) ( (x-xi) ^ì) /factorial (i) ; F-diff (f) 2 -end ommand Window New to MATLAB? Watch this Video, see Examples or read Getting Started sum (x) x^10/3628800 + x^9/362 880 + x^ 8/40320 + x^7/5040 + x^ 6/720 + x^ 5/120 + x^4/24 + x^3/6 + x^2/2 + x + ї

b)

clc%clears the console
clear all%clears the history
close all%closes all opened files
syms f(x) sum(x) F(x)
f(x)=exp(-x);
F=f;
xi=0.25;
sum(x)=0;
for i=0:3
sum=sum+F(xi)*((x-xi)^i)/factorial(i);
F=diff(F);
fprintf('Value of %d order version of exp(-%f) is %.20f and true relative error corresponding to it is %.20f\n',i,1,eval(sum(1)),abs(0.367879-eval(sum(1)))/0.367879);
end

Revert in case of any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Please use matlab to solve the question. 1. The following infinite series can be used to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 4.1 The following infinite series can be used to approximate e: 2 +3 + 2 e...

    4.1 The following infinite series can be used to approximate e: 2 +3 + 2 e = 1 x + 3! n! (a) Prove that this Maclaurin series expansion is a special case of the Taylor series expansion [(Eq. (4.7)] with x (b) Use the Taylor series to estimate f(x) 0 and h x. e at x+1 1 for 0.2. Employ the zero-, first-, second-, and third-order versions and compute the e, for each case. 4.1 The following infinite series...

  • Saved Required information The following infinite series can be used to approximate e =1+ z+ Use...

    Saved Required information The following infinite series can be used to approximate e =1+ z+ Use the Taylor series to estimate ) eat xi+11 for x- 0.25. Employ the zero-order, first-order, second-order, and third-order versions and compute the Et for each case. (Round the estimated values to five decimal places and the error values to one decimal place.) The calculated values are as follows: Value Order Error % Zero First Second Third Saved Required information The following infinite series can...

  • Aer wi rié error and percent relative error. Add terms until the absolute value of the...

    Aer wi rié error and percent relative error. Add terms until the absolute value of the error estimate falls below an error criterion conforming to two significant figures. 3. The following infinite series can be used to approximate ex: e =1+x+ (1.3) 2 3! n! (a) Show that this Maclaurin series expansion is a special case of Taylor expansion with x 0 and h=x (b) Use Taylor series to estimate f(x)=e* at x,=1 for x = 0.20. Employ zero-, first-,...

  • 1 . Use a first through third order Taylor series expansion with starting point, Xi = 0 and h = 1...

    can someone help me answer a and b 1 . Use a first through third order Taylor series expansion with starting point, Xi = 0 and h = 1 to estimate the each of the following functions at xi1. Evaluate the error between the true value and the approximate at Xi+-1 for cach expansion. (a) 3x3 +2x2 +x (b) 5x5 + 3x3 + 2x2 + x 1 . Use a first through third order Taylor series expansion with starting point,...

  • 8. The Maclaurin series (a special case of the Taylor series that is discussed later in...

    8. The Maclaurin series (a special case of the Taylor series that is discussed later in this class) allows us to express a differentiable, analytic function as an infinite degree polynomial. Here is the degree seven polynomial approximation of the sine: x3 x5 x? 3! 5! 7! + Use Matlab to generate a plot of sin(x) (solid blue line) and its polynomial approximation (dashed red line) for x = 0 to 31/2 and y from -1.5 to 2. Use the...

  • Question 4: Talyor. Maclaurin and Power Series For parts a, b, c and d, use the...

    Question 4: Talyor. Maclaurin and Power Series For parts a, b, c and d, use the following function: f(x) = (-3x a) (3 points) Write the Taylor polynomial of degree four for f(x) centered at 0. b) (2 points) Use the Taylor polynomial from part a to estimate the value of e-0.3. (Hint: let find x). c) (3 points) Write the series generated by f(x) at zero in sigma notation. d) (3 points) Find the radius of convergence and state...

  • Solve the following problem in MATLAB. Use format compact for all work to suppress extra lines....

    Solve the following problem in MATLAB. Use format compact for all work to suppress extra lines. Show all work and add comments as needed to explain your logic/steps. 1. The function f(x) = e* can be approximated by the following Taylor series: n=0 The first few terms of the Taylor series are: e 1 + x + + + + ...... 2! 3! 4! Keep in mind that the "!" symbol denotes factorial. For example, the factorial of 4 =...

  • Problem 1 MATLAB A Taylor series is a series expansion of a function f()about a given point a. For one-dimensional real...

    Problem 1 MATLAB A Taylor series is a series expansion of a function f()about a given point a. For one-dimensional real-valued functions, the general formula for a Taylor series is given as ia) (a) (z- a) (z- a)2 + £(a (r- a) + + -a + f(x)(a) (1) A special case of the Taylor series (known as the Maclaurin series) exists when a- 0. The Maclaurin series expansions for four commonly used functions in science and engineering are: sin(x) (-1)"...

  • 1. (A) Use the Taylor series expansion for the sin x to estimate sin(t/4) for the...

    1. (A) Use the Taylor series expansion for the sin x to estimate sin(t/4) for the acceptable relative errors of 0.25 and 0.0025 .5 3 9 х* sin x x 3! х> 5! 7! 9! Please use the table formatting u to solve the problem

  • Using MATLAB Solve 2x5 5х, x(0)0, a(0) 0.4, on the interval [-2,0] Use Taylor series method...

    Using MATLAB Solve 2x5 5х, x(0)0, a(0) 0.4, on the interval [-2,0] Use Taylor series method or Runge-Kutta method Using MATLAB Solve 2x5 5х, x(0)0, a(0) 0.4, on the interval [-2,0] Use Taylor series method or Runge-Kutta method

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT