University of Florida/Egm6341/s10.team3.aks/HW3

From testwiki
Revision as of 05:51, 12 February 2016 by imported>MaintenanceBot (Replacing Level 1 heading with big text.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Big3

Problem Statement

Use Error estimate for Taylor series, composite trapezoidal and composite Simpson's rule to find n such that

  En=IIn=O(106)

and compare to numerical results.

Solution

I=01ex1xdx

Taylor Series

ex=j=0xjj!ex1x=j=1xj1j!
In=01fn(x)dx=01j=1xj1j!dx=j=1nxjj!j|01=j=1n1j!j
f(x)fn(x)=Rn(x)=(xx0)n(n+1)!f(n+1)(ξ) with ξ[0,x] and x0=0
f(x)fn(x)=xn(n+1)!f(n+1)(ξ)
En=IIn=01[f(x)fn(x)]dx=01xn(n+1)!w(x)f(n+1)(ξ(x))g(x)dx
g(α)01w(x)dx for α[0,1]
En=
max=g(α)(n+1)!(n+1), α=e(n+1)!(n+1)
min=g(α)(n+1)!(n+1), α=1(n+1)!(n+1)
n=2,E2.151016
n=4,E5.00453
n=6,E66.2792X104
n=8,E88.42X106

Below are the values from Numerical Analysis of Taylor series from HW_1

n=2,E2.151016
n=4,E5.00453
n=6,E66.2792X104
n=8,E88.42X106

We are getting same values from both analysis for Taylor series

Trapazoidal Rule

Error for Composite Trapazoidal rule is given by

|En1|(ba)312n2M2


where M2=max|f(2)(ζ)| for ζε[a,b]

For the given function f(x)=ex1x, we have


f(2)(x)=ex[x22x+2]2x3


For the given interval [0,1] the maximum value of function f(2)(x) is achieved at x=1


M2=f(2)(x=1)=e[1+22]21=0.71828182


En1(10)312n2X0.71828182

E21.014964204

E413.74105X103

E611.662689X103

E819.3526278X104

E1612.3381569X104

E3215.845392X105

E6411.4613481X105

E12813.65337026X106

E25619.1334256X107

Below are the results from Numerical analysis from HW 1

E210.010389576

E410.002602468

E810.650935X103

E161162753X104

E3214.06892X105

E6411.0172X105

E12812.54263X106

E25616.3528X107


We can see that we are getting order 106 at n=128 from both the analysis.

Composite Simpsons Rule

The error estimate of the Composite Simpson's rule is given as

En2(ba)52880n4M4

where  M4=max|f(4)(ζ)| for ζε[a,b]

For the given function f(x)=ex1x, we have


f(4)(x)=ex[x44x3+12x224x]24x5

The function f4(x) has maximum value at x=1

M4=e[14+1224+24]241=0.46453645


En1(10)52880n4X0.46453645

E221.00810X105

E426.300678X107

Below are the results from Numerical analysis from HW 1

E221.06514X104

E426.76473X106

We can see that we are getting order 106 at n=4 from both the analysis.