HW#1
Note:
i)
ii)
iii)
iv)
v)
EGM6341
Spring 2014
This set of HW comes from diverse aspects in calculus and math analyses.
It is intended to serve as a review and to bring you up to speed in
mathematical analysis. Series expansion in various forms and acc
Solution to
HW#7
EGM6341 Spring 2009
pp. 323329 #1 Write a program to evaluate I =
b a
f ( x )dx using the trapezoidal rule with n
subdivisions, calling the result In. Use the program to calculate the following integrals with n=2,4,8,16,.,512 1
HW#2
EGM6341
Spring 2014
From the textbook by Atkinson: pp.4350:
21.
For the following numbers xA and xT, how many significant digits are there in xA
with respect to xT?
a)
xA = 451.023,
xT = 451.01
b)
xA = 0.045113,
xT = 0.04518
c)
xA = 23.4213,
xT =
HW#6 Due: 3/17/09
EGM6341
Spring 2009
From textbook by Atkinson pp185194 1. 2. 3. #28a, #35 (read p. 171 of the textbook, as well as notes, for "notaknot" condition;) (Least square fit) In many applications, one wishes to correlate a dependent
Solution to
HW#10
EGM6341
pp. 323329
Problem #1. Write a program to evaluate I
b
a
f ( x )dx using the trapezoidal rule
with n subdivisions, calling the result In. Use the program to calculate the following
integrals with n=2,4,8,16,512
1
a)
I exp( x 2
Solution to Homework #1 EGM6341
1. (a) Assume (x) is continuous on a x b, and consider the average 1 n S = f (x j ) n j =1 with all points xj in the interval [a, b]. Show that S = f ( ) for some in [a, b]. Soln: Because (x) is continuous in the
Solution to Homework #2 21.
EGM6341
For the following numbers xA and xT, how many significant digits are there in xA with respect to xT? a) xA = 451.023, xT = 451.01 b) xA =0.045113, xT = 0.04518 c) xA = 23.4213, xT = 23.4604 Soln. a)  xA  xT
HW#1 Note: i) ii) iii)
EGM6341
Spring 2009
iv)
This set of HW comes from diverse aspects in calculus and math analyses. It is intended to serve as a review and to bring you up to speed in mathematical analysis. Series expansion in various forms a
Solution to HW#6 EGM6341 Spring 2009 1. #28a. Find a polynomial p(x) of degree 2 that satisfies p(x0)= y0, p (x0)=y 0, p (x1)=y1 Given a formula in the form of p(x) = y0l0(x) + y0 l1(x) + y1 l2(x). Solution: For the suggested p(x), it is seen that p
HW#2 EGM6341 Spring 2009 Due 1/27/09 From the textbook by Atkinson: pp.4350 : 21. For the following numbers xA and xT, how many significant digits are there in xA with respect to xT? a) xA = 451.023, xT = 451.01 b) xA = 0.045113, xT = 0.04518 c) x
Solution to HW#11
Problem #6
Write a computer program to solve y= f(x,y), y(x0)=y0, using Eulers method. Write it to be
used with an arbitrary f, stepsize h, and interval [x0,b]. Using the program, solve y=x2 y,
y(0) = 1, for 0x4, with stepsizes of h = 0.
HW#12
EGM6341 Numerical Method
1. Solve the following BVP using finite difference method
y"  (1 x/4) y = x
y(0) = 1, y(2) = 5.
i) Set up the matrix for yi using x=0.5.
ii) Solve yi for i=2 to 4.
Solution:
bi = 0,
ci = (1 xi /4), di = xi
Choose h=0.5 (w
Solution to HW#9
EGM6341
Find linear and quadratic leastsquares approximations to f ( x) e x on [1,1]
using monomial basis, i.e., 1, x, x2 ,., xn . Find the error (relative to the exact
function value) of these two approximations for x=0.5.
Solution:
1.
CHAPTER VIII ODE'SBOUNDARY VALUE PROBLEMS
Objectives: develop methods for solving general 2nd order ODE's:
y"+ f(x, y, y') = 0, axb
c0y + k0 y' = q0 at x = a
c1y + k1 y' = q1 at x = b
BVP
y
y(a)
y(x)
y(b)
b x
a
8.1 Shooting Method:
A linear ODE example
Homework 3
Hao Peng 59321290
Problem 4
See Matlab Code, section 1.
Problem 21
Solution:
Write the iteration as "#$ = " + " , subtract each side with
"#$ = " + " "#$ = " + "
The Taylor Expansion of () is:
= + " 3 +
Ignore items with order higher than
HW#3
EGM6341
Spring 2014
The following problems are from the Text book.
pp.117127:
#2
a)
b)
c)
d)
Write a program implementing the algorithm Bisect given in Section 2.1. Use the
program to calculate the real roots of the following equations. Use an error
EGM6341 Homework 6
Hao Peng, 59321290
Solution:
We know g ( x ) =2 x 2 +2 y 2 and u ( x , y )=x 2 y2
(a) For a 5x5 grid, given:
g ( x , y )=2 x 2+2 y 2
u ( x , y )=x 2 y2 for ( x , y ) onthe boundary .

u1,1
u2,1
u= u3,1
u4,1
u5,1
u1,2
u2,2
u3,2
u 4,2
u5
I.
Introduction
1.1 Why Numerical Methods?
Example 1.
Steady state heat conduction
y
T/y=0 (insulated)
D
C
Governing equation:
2
Heat flow
T=T 1
T= 0
T/x
=0
How do we determine the heat flow
from wall AB to wall AD?
A
Possible solutions:
B x
1. Experimen
CHAPTER VII ODE'SINITIAL VALUE PROBLEMS
Objectives: Develop various accurate & efficient methods for solving
ODEs such as
y' = f(x, y)
7.1
(1)
Taylor series expansion for ODE
Example:
Consider the first order ODE:
y' = 2x  y
(= f(x, y) )
with y(0) = 
EGM 6341
Review Questions/Topics for the MidTerm Exam
CHAPTER 1
How do you determine the number of significant digits in an approximated (rounded or
chopped) value of a variable compared to its exact value?
What is Taylor series expansion in 1D and 2D?
ChapterIX FiniteDifferenceMethodsforPDEs
9.1 EffectsofConvection,DiffusionandDispersiononTransport
LinearKDVBurgersEquation
ModelEqn.fortransport(ofwave,mass,momentum,energy,)
u
u
2u
3u
+ c = 2 + D 3
t
x
x
x
(1)
c=convection(oradvection)speed
=diffu