Question

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

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

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

clear, clc
y1=[];
y2=[];
y3=[];
y4=[];
y5=[];
x=-1:0.1:1;
y1=x;
y2=y1-x.^3/factorial(3);
y3=y2+x.^5/factorial(5);
y4=y3-x.^7/factorial(7);
y5=sin(x);
subplot(2,2,1);
plot(x,y1,x,y2,x,y3,x,y4,x,y5);
legend('First term','Second term','Third term','Fourth term','Exact functtion');
title('Plot of sin(x)');
y1=[];
y2=[];
y3=[];
y4=[];
y5=[];
x=-1:0.1:1;
y1=1;
y2=y1+x/factorial(1);
y3=y2+x.^2/factorial(2);
y4=y3+x.^3/factorial(3);
y5=exp(x);
subplot(2,2,2);
plot(x,y1,x,y2,x,y3,x,y4,x,y5);
legend('First term','Second term','Third term','Fourth term','Exact functtion');
title('Plot of e^x');
y1=[];
y2=[];
y3=[];
y4=[];
y5=[];
x=-0.9:0.1:1;
y1=x;
y2=y1-x.^2/(2);
y3=y2+x.^3/(3);
y4=y3-x.^4/(4);
y5=log(1+x);
subplot(2,2,3);
plot(x,y1,x,y2,x,y3,x,y4,x,y5);
legend('First term','Second term','Third term','Fourth term','Exact functtion');
title('Plot of ln(1+x)');
y1=[];
y2=[];
y3=[];
y4=[];
y5=[];
x=-1:0.1:1;
y1=x;
y2=y1-x.^3/(3);
y3=y2+x.^5/(5);
y4=y3-x.^7/(7);
y5=atan(x);
subplot(2,2,4);
plot(x,y1,x,y2,x,y3,x,y4,x,y5);
legend('First term','Second term','Third term','Fourth term','Exact functtion');
title('Plot of tan^-1(x)');

Figure 1 File Edit View Insert Iools Desktop Window Help EB Plot of e Plot of sin(x) First term First term 2,5 Second term Se

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Problem 1 MATLAB A Taylor series is a series expansion of a function f()about a given point a. For one-dimensional real...
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
  • 1. Find the Taylor series for the function f (x) = xe centered at the point...

    1. Find the Taylor series for the function f (x) = xe centered at the point x = 1. 2. Find the first five terms in the Maclaurin series for f (x) = (1 – x)-3.

  • (3) Computing Taylor Series quickly from Other Power Series: Use your result for the Taylor serie...

    Differential Equations (3) Computing Taylor Series quickly from Other Power Series: Use your result for the Taylor series for f(x) = V r to find the first 3 (non-zero) terms of the Taylor-Maclaurin series of f(r) = v1-r2, by replacing with 1-2 in your series and expanding and combining the coefficients of powers of x. (The Taylor-Maclaurin series is the Taylor series centered around o 0. Note that when a is near 0, 1-2 is near 1.) (3) Computing Taylor...

  • Matlab Matlab Matlab Matlab, Please solve this problem Problem 4 : Runge's phenomenon For this proble,...

    Matlab Matlab Matlab Matlab, Please solve this problem Problem 4 : Runge's phenomenon For this proble, you wil interpolate the function h(x) = tanh(10x) in I [a, b, through n datapoints (xi, hx with equidistant nodes for several values of n, and observe the behavior of the interpolating polynomial as n increases. You should use the pair of functions polyfit and polyval In your prob40: (a) Interpolate the function tanh(10x) in [-1,1] using a uniform grid of n nodes, where...

  • Problem (8) MATLAB Problem) Write a Matlab Function that plots the of the following signal in...

    Problem (8) MATLAB Problem) Write a Matlab Function that plots the of the following signal in the discrete time domain for any value of the shift k and for any range of it: nak *(1 – k) = fccm (c(n - keink 0. n<R Problem (9) MATLAB Problem) Subplot the following signals in the same figure choose an appropriate range for : x(n) = b cos (0.1bana ym) = 2"sin (0.1b mn + ) וחו

  • Problem 13. (1 point) Consider a function f(x) that has a Taylor Series centred at x...

    Problem 13. (1 point) Consider a function f(x) that has a Taylor Series centred at x = -1 given by 00 3 4. (x + 1)" HO If the radius of convergence for this Taylor series is R = 2, then what can we say about the radius of convergence of the Power Series Σ ax (x + 1)"? ns 2 IOARE B. R = 10 C. R=4 D. R=1 E. R= 2 F. It is impossible to know what...

  •    MATLAB SCRIPT PLEASE Matlab MATH 210 in 2020 Homework Assignment 8- Due 3/25, 11:59PM Each...

       MATLAB SCRIPT PLEASE Matlab MATH 210 in 2020 Homework Assignment 8- Due 3/25, 11:59PM Each plot should have its own figure associated with it. In all questions, give the figure a title, and label the acis. Save your matlab script as drill 10.m Do not use the fplot command. 1. Plot the function f(x) = (x + 5)2 for -5 <<<10. Include a plot title, and label both aris. 2. Use the subplot command to make two plots of...

  • (1 point) Use a Maclaurin series derived in the text to derive the Maclaurin series for...

    (1 point) Use a Maclaurin series derived in the text to derive the Maclaurin series for the function f(x) = 0. Find the first 4 nonzero terms in the series, that is write down the Taylor polynomial with 4 nonzero terms. 1+x/18+X^2/600+x^3/35280

  • point) Consider a function f(x) that has a Taylor Series centred at x = 5 given...

    point) Consider a function f(x) that has a Taylor Series centred at x = 5 given by ſan(x – 5)" n=0 he radius of convergence for this Taylor series is R= 4, then what can we say about the radius of convergence of the Power Series an ( 5)"? nons A. R= 20 B.R= 8 C. R=4 D. R= E. R= 2 F. It is impossible to know what R is given this information. point) Consider the function f(x) =...

  • (1 point) Consider a function f(x) that has a Taylor Series centred at x = 1...

    (1 point) Consider a function f(x) that has a Taylor Series centred at x = 1 given by Žar(2 – 1)" n0 If the radius of convergence for this Taylor series is R=2, then what can we say about the radius of convergence of the Power Series an (2 – 1)"? hins A. R= 2 5 OB. R=4 OC. R=2 OD. R=1 O ER= 10 OF. It is impossible to know what R is given this information.

  • (1 point) Consider a function f(x) that has a Taylor Series centred at x = 1...

    (1 point) Consider a function f(x) that has a Taylor Series centred at x = 1 given by Žar(2 – 1)" n0 If the radius of convergence for this Taylor series is R=2, then what can we say about the radius of convergence of the Power Series an (2 – 1)"? hins A. R= 2 5 OB. R=4 OC. R=2 OD. R=1 O ER= 10 OF. It is impossible to know what R is given this information.

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