Reference no: EM13168343
writing a matlab script to approximate exp(x) at exp(.05) using ""Taylor series"" ""and"" a ""while loop"".
a=.05 is very close to a convenient x value. The allowable error (error = |guess-true|) is to be less than or equal to 10^-9.
I also need to figure out how many terms in the Taylor series were required to achieve convergence. Plot the n=1, n=2, n=3 approximations to e^x for x=0:0.05:1, and plot the built-in exp(x) function on this same interval. Ensure that each line has a unique LineSpec format (ie- line style, tickmark, color), and provide a legend identifying your four curves. Label x and y axes as "Domain" and "Range".
This is what I have so far. How do I add the 3 n values. I JUST NEED TO ADD THE N-1, N-2, N-3 But I don't know how.
clear, clc
err = 1;
order = 1;
while err > 0.000000001
syms x;
approx = taylor(exp(x),x,'Order',order);
x = 0.05;
approx = eval(approx);
err = abs(exp(0.05) - approx);
order = order + 1
end
Show work on the mineral greenockite is yellow sulfide
: show work on the mineral greenockite is yellow sulfide of cadmium that is 78.0% cadmium and 22.0% sulfur. determine the empirical formula of greenockite.
|
Problems of an aging society
: Discuss the impact of the problems of an aging society on our country.
|
What is this freezing point on the kelvin scale
: A thermometer indicates that water freezes at 0.5 degrees Celsius and boils at 100.2 degrees Celsius at a barometric pressure of 760 torr. The observed freezing point of an unknown liquid is -1.3 degrees Celsius.
|
Swot analysis results of the new ict service
: Compare the SWOT Analysis results of the current ICT service with the SWOT Analysis results of the new ICT service.
|
Writing a matlab script to approximate exp(x)
: writing a matlab script to approximate exp(x) at exp(.05) using ""Taylor series"" ""and"" a ""while loop"".
|
Person lives in urban poverty
: If a person lives in urban poverty, how can s/he find a job when there are few jobs available in the inner cities, little transportation to the suburbs, and when they have no skills because of poorly funded public schools?
|
What is the molecular formula of the compound
: a certain anesthetic contains 64.9 percent C, 13.5 percent H, and 21.6 percent O by mass. at 120 grades celcius and 750 mmHg, 1.00 L of the gaseous compound weighs 2.30g. What is the molecular formula of the compound?
|
Write a program that will read in 2 test score.
: Write a program that will read in 2 test score. The instructor has decided to give each student 10 bonus point on each test. Print out each test score and the total after the bonus, the print the total number of points earned on the tests.
|
Deliver the speech with confidence
: Ensure that the language is used correctly. Speaker credibility influences how listeners feel about the speaker. Character is the quality of being honest, trustworthy, and showing goodwill. Deliver the speech with confidence.
|