For this assignment you are to write a MATLAB script to find the Taylor Series expansion...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
For this assignment you are to write a MATLAB script to find the Taylor Series expansion of e*. Taylor Series are infinite sums that converge to a particular value. In this problem you will use: e=1+x+2+ Where the terms in the denominators (i.e., 2!) are factorials and are found as follows: for example Modify the provided MATLAB template as follows: + + x! = x*(x-1)*(x-2)....(1) 3! = 3*2*1 A. Add a function to the script called "TaylorSeriesElement" This function should receive the value of x and its power and return a component of the Taylor series such as x^2/2!. To find the factorial use the MATLAB function - factorial(i). This returns the factorial of the value i. In this case it will be the power sent to the function. B. Add a for-loop that repeats a set number of times and calls the function "TaylorSeriesElement" on each iteration. That result is stored in an array. Call that array "taylorSeries." C. Add a second function called "SumSeries. That function should return the sum of the Taylor Series. Note that the array will actually start at they second term in the series, so don't forget to initialize the sum to 1. D. Set x = 2 and use this script to find the amount of terms required to get within 4 decimal points of the MATLAB function for the exponential. In this case it is exp(x). The table below shows the first few summations and can be used to validate your script. Terms 1+2 Result 3 22 5 1+2+ 21 23 23 1+2+ +=+ 6.3333..... 21 3! Table 1 Examples - For this assignment you are to write a MATLAB script to find the Taylor Series expansion of e*. Taylor Series are infinite sums that converge to a particular value. In this problem you will use: e=1+x+2+ Where the terms in the denominators (i.e., 2!) are factorials and are found as follows: for example Modify the provided MATLAB template as follows: + + x! = x*(x-1)*(x-2)....(1) 3! = 3*2*1 A. Add a function to the script called "TaylorSeriesElement" This function should receive the value of x and its power and return a component of the Taylor series such as x^2/2!. To find the factorial use the MATLAB function - factorial(i). This returns the factorial of the value i. In this case it will be the power sent to the function. B. Add a for-loop that repeats a set number of times and calls the function "TaylorSeriesElement" on each iteration. That result is stored in an array. Call that array "taylorSeries." C. Add a second function called "SumSeries. That function should return the sum of the Taylor Series. Note that the array will actually start at they second term in the series, so don't forget to initialize the sum to 1. D. Set x = 2 and use this script to find the amount of terms required to get within 4 decimal points of the MATLAB function for the exponential. In this case it is exp(x). The table below shows the first few summations and can be used to validate your script. Terms 1+2 Result 3 22 5 1+2+ 21 23 23 1+2+ +=+ 6.3333..... 21 3! Table 1 Examples -
Expert Answer:
Related Book For
Posted Date:
Students also viewed these mechanical engineering questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
Consider a situation with two firms that have marginal abatement cost functions The marginal damage function is again equal to D'(E)=d.E. Assume the regulator applies Monteros mechanism. Determine...
-
Give a definition and an example for each class of organic compounds. (a) Alkane (b) Alkene (c) Alkyne (d) Alcohol (e) Ether (f) Ketone (g) Aldehyde (h) Aromatic hydrocarbon (i) Carboxylic acid (j)...
-
1. What are the 12 verbs and expressions you shouldnt use with nonhuman animals and nonverbal human beings? 2. Give an example of how each can be misused. 3. Give an example of how to say the same...
-
You are the financial controller of Garla Ltd, an Australian company listed on the ASX that sells premium Australian wines into overseas markets. Garlas sales of inventories in foreign currency...
-
Company T had outstanding 25,000 shares of common stock, par value $10 per share. On January 1, 2011, Company P purchased some of these shares as a long-term investment at $25 per share. At the end...
-
after determing a reported vulnerability was a credible claim the product security incident response team worked with develpment teams to create and test a patch. the patch is schedule t obe released...
-
What is the longest word you can build in a game of Scrabble one letter at a time? That is, starting with a valid two-letter word, how long a word can you build by playing one letter at a time on...
-
Study the numbered sentences in the following poorly written e-mail message. In teams or in a class discussion, identify specific sentence faults. To: Sierra.Maldonado@gmail.com From:...
-
What is the difference between a scratch list and an outline?
-
Health concerns are not the only problem, soft-drink makers are also facing a boom in alternative beverages. Your Task. Identify the sentence fault (fragment, run-on sentence, comma splice). Then...
-
While interviewing applicants, questions are often asked by recruiters about qualifications. Your Task. Revise the above sentence to avoid dangling and misplaced modifiers.
-
How long should paragraphs be?
-
Write a report on marketing research. And explain what is meant by marketing research.
-
Fred Farmer needs to prepare a balance sheet for his bank. He spent the day getting the following information. Fred needs your help to build a balance sheet and evaluate it. The information was...
-
The plaintiff [Christine Parent] leased an automobile from Amity Autoworld, Ltd. (hereafter Amity) [in Amityville, New York] in January 2002. Amity sold all its Toyota automobile franchise assets * *...
-
Iberia Surgical [LLC] was formed, in August 1998, by a group of physicians practicing in Iberia Parish [Louisiana] for the purpose of establishing an ambulatory, outpatient surgery center. * * * Dr....
-
The Communications Act of 1934 established a system of limited-term broadcast licenses subject to various conditions * * * . * * * [These conditions include] the indecency banthe statutory...
Study smarter with the SolutionInn App