Docsity

MATH 417: Numerical Analysis Homework Assignment 10, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
MATH 417: Numerical Analysis
Instructor: Prof. Wolfgang Bangerth
Teaching Assistants: Dukjin Nam
Homework assignment 10 – due 4/26/2007
Problem 1 (Numerical integration.) Consider the problem of finding the
numerical value of the integral
Z1
0
arctan x dx.
The exact value of this expression is π
4−ln 2
2= 0.43882 . . ..
Evaluate above integral by writing programs that use
(a) the trapezoidal rule,
(b) the Simpson rule.
Split up the integration interval [0,1] into successively smaller sub-intervals of
length h= 1,1
2,1
4, . . . , 1
128 and apply the two quadrature rules above to each
subinterval. Compute the approximated value of the integral and the error.
Determine the convergence order from this data. (4 points)
Problem 2 (Integration of an implicit function). Let f(x) be defined as
in last week’s homework, i.e. f(x) is that value yfor which yey=x. Compute
Z10
0
f(x)dx
using the trapezoidal rule for step sizes h= 1,1
2,1
4,1
8, . . . , 1
32 . Determine the
order of convergence. (4 points)
Problem 3 (Numerical solution of a ODE). Consider the following scalar
ordinary differential equation (ODE):
x0(t) = 1
2x(t), x(0) = 1.
The solution of this equation is x(t) = e1
2t. Compute approximations to x(4)
using the
•first order Taylor expansion method,
•second order Taylor expansion method,
1
pf2

Partial preview of the text

Download MATH 417: Numerical Analysis Homework Assignment 10 and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

MATH 417: Numerical Analysis

Instructor: Prof. Wolfgang Bangerth [email protected] Teaching Assistants: Dukjin Nam [email protected]

Homework assignment 10 – due 4/26/

Problem 1 (Numerical integration.) Consider the problem of finding the numerical value of the integral

∫ (^1)

0

arctan x dx.

The exact value of this expression is π 4 − ln 2 2 = 0. 43882.. .. Evaluate above integral by writing programs that use

(a) the trapezoidal rule,

(b) the Simpson rule.

Split up the integration interval [0, 1] into successively smaller sub-intervals of length h = 1, 12 , 14 ,... , 1281 and apply the two quadrature rules above to each subinterval. Compute the approximated value of the integral and the error. Determine the convergence order from this data. (4 points)

Problem 2 (Integration of an implicit function). Let f (x) be defined as in last week’s homework, i.e. f (x) is that value y for which yey^ = x. Compute

∫ (^10)

0

f (x) dx

using the trapezoidal rule for step sizes h = 1, 12 , 14 , 18 ,... , 321. Determine the order of convergence. (4 points)

Problem 3 (Numerical solution of a ODE). Consider the following scalar ordinary differential equation (ODE):

x′(t) =

x(t), x(0) = 1.

The solution of this equation is x(t) = e (^12) t

. Compute approximations to x(4) using the

  • first order Taylor expansion method,
  • second order Taylor expansion method,
  • implicit Euler method,

each with step sizes h = 2, 1 , 12 , 14 ,... , 321. Compute their respective errors e = |xN − x(4)| where xN is the approximation to x(4) at the end of the last time step, and compute the convergence rates. Compare the accuracy of all these methods for the same step size h. (7 points)