Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use python coding and run it In the freefall example we used smaller time steps to decrease the truncation error in our Euler approximation.

Please use python coding and run it

In the freefall example we used smaller time steps to decrease the truncation error in our Euler approximation. Another way to decrease approximation error is to continue expanding the Taylor series. Consider the function f(x)

()==1++22!+33!+44!+...f(x)=ex=1+x+x22!+x33!+x44!+...

We can approximate ex as 1+1+x (first order), 1++2/21+x+x2/2 (second order), and so on each higher order results in smaller error.

a. Use the given exptaylor function to approximate the value of exp(1) with a second-order Taylor series expansion. What is the relative error compared to np.exp(1)?

b. Time the solution for a second-order Taylor series and a tenth-order Taylor series. How long would a 100,000-order series take (approximate this, you don't have to run it)

c. Plot the relative error as a function of the Taylor series expansion order from first order upwards. (Hint: use method (4) in the comparison methods from the "Truncation and roundoff error accumulation in log-log plot" figure)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database And Expert Systems Applications 15th International Conference Dexa 2004 Zaragoza Spain August 30 September 3 2004 Proceedings Lncs 3180

Authors: Fernando Galindo ,Makoto Takizawa ,Roland Traunmuller

2004th Edition

3540229361, 978-3540229360

More Books

Students also viewed these Databases questions

Question

Is SHRD compatible with individual career aspirations

Answered: 1 week ago