Sunteți pe pagina 1din 13

ENGR 351 Numerical Methods

College of Engineering
Southern Illinois University Carbondale

Exams
Fall 2007
Instructor: Professor L.R. Chevalier




EXAM 1
Problem 1: Basic matrix operation

| |
(
(
(



=
1 1 5
8 3 2
3 7 1
A { }

=
7
3
8
c | |
(
(
(

045 . 0 139 . 0 053 . 0


008 . 0 066 . 0 172 . 0
193 . 0 041 . 0 045 . 0
1
A | |
(
(
(


=
7 0 0
3 4 0
3 1 2
B

a) Given [A]{x}={c}, solve for x
3
using Cramers Rule.



b) Given [B]{x} = {c}, solve for {x}

Problem 2: Basic matrix operation

| |
(
(
(



=
1 1 5
8 3 2
3 7 1
A { }

=
7
3
8
c | |
(
(
(

045 . 0 139 . 0 053 . 0


008 . 0 066 . 0 172 . 0
193 . 0 041 . 0 045 . 0
1
A | |
(
(
(


=
7 0 0
3 4 0
3 1 2
B

a) Given [A}{x}={c}, use [A]
-1
to solve for x
2




b) Solve [A][A]
-1


Problem 3: Error

The table below is a solution for the following equation using the bisection method. Determine c
a

and c
t
at i=3 given f(0.055) = 0.0





i x
l
x
u
f(x
l
) f(x
u
) x
r
f(x
r
) f(x
l
)f(x
r
)
0 0.010 0.100 -549.033 592.148 0.055 3.579 -1964.962
1 0.010 0.055 -549.033 3.579 0.033 -277.401 152301.999
2 0.033 0.055 -277.401 3.579 0.044 -138.057 38297.151
3 0.044 0.055 -138.057 3.579 0.049 -67.523 9322.025
4 0.049 0.055 -67.523 3.579 0.052 -32.043 2163.609
5 0.052 0.055 -32.043 3.579 0.054 -14.249 456.588
6 0.054 0.055 -14.249 3.579 0.054 -5.340 76.087


( )
( )
( )
4000
1 1
1 2000
6
6

+
+
=
i
i i
i f
Problem 4: Newton Raphson

Using the Newton Raphson method, perform the computations needed to complete the table
below for f(x) = 0.1e
2x
-7.



( )
( )
i
i
i i
x f
x f
x x
'
1
=
+


i x
i
f(x
i
) f(x
i
)
0 1.8
1
2 n/a

-20
0
20
40
60
80
100
120
0 0.5 1 1.5 2 2.5 3 3.5 4
x
f
(
x
)
Problem 5: Secant Method

Using the secant method, perform the computations needed to complete the table below for f(x) =
0.1e
2x
-7.





i x
i
f(x
i
)
0 1.5
1 1.7
2
3


-20
0
20
40
60
80
100
120
0 0.5 1 1.5 2 2.5 3 3.5 4
x
f
(
x
)
( )( )
( ) ( )
i i
i i i
i i
x f x f
x x x f
x x

+
1
1
1
EXAM 2
Problem 1: Curve Fitting
Graphically show the difference between linear interpolation and linear regression using the data
plotted below.

Linear Interpolation

Linear Regression

0
0.1
0.2
0.3
0.4
0 0.2 0.4 0.6 0.8
x
f
(
x
)
0
0.1
0.2
0.3
0.4
0 0.2 0.4 0.6 0.8
x
f
(
x
)
Problem 2: Statistical Analysis of Error
Determine R
2
for the following data given y
model
= 2.02x+3.62
For complete credit, show your work.

x y

0 3.1
1 6.2
2 8.1
3 9.2

Problem 3: Nonlinear Regression
a. Determine how you would linearize data for the following nonlinear equation:
3
3
S K
S
v
o
+
=




b. If linear regression was performed on the transformed data, what would the values of and K
be given y = 3.2 + 7.2x

Problem 4: Interpolation
Given the following data for air at 1 atm, determine the density of air in a stack emission at 175C
using a 2nd order Lagrange interpolating polynomial.

T, C , kg/m
3

-40 1.52
0 1.29
50 1.09
100 0.946
150 0.835
200 0.746



0
10
20
30
40
50
60
0 10 20 30 40
t(min)
c
(
m
g
/
m
3
)
Problem 5: Integration
The outflow chemical concentration from a
reactor is reported in the table below.
For an outflow of Q=10 m
3
/min, use a
numerical method presented in class to
estimate the mass of chemical removed
from the reactor after 30 minutes.
For a constant flow (Q), the total mass, M
can be calculated from:
M Q cdt
t
t
=
}
1
2















EXAM 3
Problem 1: ODE

Using the 3
rd
order RK method given in Figure 1.1, determine
y(0.5) and y(1.0) given y(0)=12 For complete credit you must
show your work.
2
yt
dt
dy
=



t (min) c (mg/m
3
)
0 5
5 22
10 35
15 46
20 53
25 57
30 51
( )
( )
( )
2 1 3
1 2
1
3 2 1 1
2 ,
2
1
,
2
1
,
4
6
1
hk hk y h x f k
h k y h x f k
y x f k
where
h k k k y y
i i
i i
i i
i i
+ + =
|
.
|

\
|
+ + =
=
(

+ + + =
+
Figure 1.1: Common 3rd order
RK Method
Problem 2: Finite Difference Equations

In addition to velocity and acceleration, engineers consider the third derivative of displacement, or
jerk, when designing roller coasters. Jerk is also important to consider in manufacturing
processes where rapid changes in acceleration of a cutting tool can lead to premature tool wear
and result in uneven lines of a cut. The fourth derivative of displacement, or jounce, was
considered in the development of the Hubble Space Telescope's pointing control system.

For the data below, use centered finite divided difference to estimate the velocity, acceleration,
jerk and jounce at t(8)

Table 2.1: Data

Time (s) 0 2 4 6 8 10 12 14 16
Position (m) 0 0.7 1.8 3.4 5.1 6.3 7.3 8.0 8.4

Table 2.2: Useful formulas for centered divided difference









Problem 3: Boundary Value Problems

Develop the matrix needed to solve the following problem using finite difference given Ax = 1, L =
5, y(0)=0 and y(5)=10.

y
dx
y d
2
2
2
=

( )
( ) ( )
( )
( ) ( ) ( )
( )
( ) ( ) ( ) ( )
( )
( ) ( ) ( ) ( ) ( )
4
2 1 1 2
3
2 1 1 2
2
1 1
1 1
4 6 4
' ' ' '
2
2 2
' ' '
2
' '
2
'
h
x f x f x f x f x f
x f
h
x f x f x f x f
x f
h
x f x f x f
x f
h
x f x f
x f
i i i i i
i
i i i i
i
i i i
i
i i
i
+ +
+ +
+
+
+ +
=
+
=
+
=

=
Problem 4: Integration of equations

Evaluate the following integral using 3-point Gauss-Legendre. For complete credit, you must
show your work.

}
+
1
0
1
1
du
u


Table 4.1: Weighting factors c and function argument x used for Gauss-Legendre

Points Weighting Factors Function Arguments
2 c
0
=1
c
1
=1
x
0
=-0.577
x
1
= 0.577
3 c
0
=0.556
c
1
=0.889
c
2
=0.556
x
0
=-0.775
x
1
= 0.0
x
2
= 0.775
4 c
0
=0.349
c
1
=0.652
c
2
=0.652
c
3
=0.349
x
0
=-0.861
x
1
=-0.340
x
2
= 0.340
x
3
= 0.861
Problem 5: Boundary Value Problems

The radial heat transfer in a thick hollow cylinder is given by:

0
1
2
2
= +
dr
dT
r dr
T d


Develop a finite difference model that estimates the temperature
in the rod for 5 r 10 for an infinitely long hollow cylinder whose
inner surface (r=5) is maintained at 200F, while the outer
surface (r = 10) is maintained at 65 F.

For complete credit, reduce the equation to the form:

AT
i-1
+ BT
i
+ CT
i+1
= D



5
1
0

200F
65F
5
1
0

200F
65F
Figure 5.1: Schematic for
boundary value problem
EXAM 4

Problem 1: No Flow Boundary


Problem 2: Non-symmetric grid


Problem 3: Matrix solution for PDE


Problem 4: Boundaries with flow


Problem 5: Secondary variables

S-ar putea să vă placă și