0% found this document useful (0 votes)
46 views5 pages

Homework 3

The document describes 4 homework problems related to numerical methods. Problem 1 involves using Neville's algorithm to solve an interpolation problem and reporting the relative error. Problem 2 involves parametric interpolation of points along a curved path to produce a letter, and requires plotting the results. Problem 3 repeats Problem 2 using natural cubic splines instead of linear interpolation. Problem 4 involves using a least squares approach to fit an exponential curve to vibration amplitude data and determine damping factors.

Uploaded by

Prakhar Agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views5 pages

Homework 3

The document describes 4 homework problems related to numerical methods. Problem 1 involves using Neville's algorithm to solve an interpolation problem and reporting the relative error. Problem 2 involves parametric interpolation of points along a curved path to produce a letter, and requires plotting the results. Problem 3 repeats Problem 2 using natural cubic splines instead of linear interpolation. Problem 4 involves using a least squares approach to fit an exponential curve to vibration amplitude data and determine damping factors.

Uploaded by

Prakhar Agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

DS 288 (AUG) 3:0 Numerical Methods Homework–3

DS 288 (AUG) 3:0 Numerical Methods


Homework–3 1
Due date: September 30, 2021 (Thursday); 7:00 A.M.
1. Exercise Set 3.2, Problem#12 in Text (Page-124). Be sure to read the note about inverse
interpolation directly above the problem. Solve this problem using an iterated interpo-
lation approach (i.e., Neville’s algorithm). Report the relative error of your result and
what value you used for the exact solution. [1.5 points]

2. In some applications one is faced with the problem of interpolating points which lie on
a curved path in the plane, for example in computer printing of enlarged letters. Often
the complex shapes (i.e., alphabet characters) cannot be represented as a function of x
because they are not single-valued. One approach is to use Parametric Interpolation.
Assume that the points along a curve are numbered P1 , P2 , ..., Pn as the curved path
is traversed and let di be the (straight-line) distance between Pi and Pi+1 . Then define
ti = ⌃i=1§
j=1 dj , for for i =1, 2, ..., n (i.e., t1 = 0, t2 = d1 , t3 = d1 +d2 , etc). If Pi = (xi , yi ), one
9.

can consider two sets of data (ti , xi ) and (ti , yi ) for i = 1, 2, ...n which can be interpolated
independently to generate \the functions f (t) and g(t), respectively. Then P (f (t), g(t))
for 0  t  tn is a point in the plane and as t is increased from 0 to tn , P (t) interpolates
the desired shaped (hopefully!). Interpolation of the data given below via this method
should produce a certain letter. Adapt your algorithm from problem (1) to perform the
interpolations on f (t) and g(t) where t is increased from 0.0 to 12.0 in steps of dt (see
data below). Report the value of dt you use to achieve ‘reasonable’ results. Turn in a
plot of your interpolated shape (not the numeric values of P (t)) as well as plots of f (t)
and g(t) individually. [3 points]

ti xi yi
0.0 0.70 2.25
1.0 1.22 1.77
2.0 2.11 1.61
3.0 3.07 1.75
4.0 3.25 2.30
5.0 2.80 2.76
6.0 2.11 2.91
7.0 1.30 2.76
8.0 0.70 2.25
9.0 0.45 1.37
10.0 0.88 0.56
11.0 2.00 0.08
12.0 3.25 0.25

3. Repeat problem (2) with a natural cubic spline. Also report all four coefficients for each
of the cubics which comprise the interpolants for both f (t) and g(t). How does your letter
compare with that produced in problem (2)? Explain any di↵erences. [3.5 points]

4. Consider the oscillograph record of the free-damped vibrations of a structure. From


vibration theory, it is known that for viscous damping (damping proportional to velocity),
1
Posted on: September 2, 2021.

1
DS 288 (AUG) 3:0 Numerical Methods Homework–3
the envelop of such a vibration (i.e., the curve through the peaks of the oscillations) is an
exponential function of the form

2⇡ax
y = be

where x is the cycle number, y is the corresponding amplitude and a is a damping factor.
Using the three data points shown in the figure, determine a and b that result from a best
fit based on the least-squares criterion. Use a linear least squares approach by suitable
change of variable. You may solve this problem “by hand” if you wish.

An alternate approach to this problem would be to construct a nonlinear least-squares


fit using the data directly as given. Would this approach lead to exactly the same a and
b values you determine above (assuming perfect math, i.e., no rounding errors in either
case)?. [2 points]
Hint: see if you can relate the errors at the ith data point between the two fits.

viscous damping

2
Least
Ans -147
change of
: with variables :
square
-
-

-2ha se
be
Y=
lnb-2-aa.se
lny
=

y
'
= b' + a' a
{ !÷?!aa
b' = tub

NOW ,

Errol E = EM [
'
( b' + a'se ) ]2
yi
-

,
i
izl

For minimum error ,

IIb ,
= 0 2
Em Kyi .
-
Cbi a' RID
-
c- 17=0

i-4
-

m
JE
and
{ Yi Cb taxi )
]
'
C-
0 => 2 [ Ri )=o
-

ga .

E- I -

From ① & ②

ZKFEY ;
'
b = -

2- seiyi Eni

MERY -

Exit
' MERIT ; -

EXiEYi
a =

MERY -

fait
en
given question .

| / gz.|gg#zg.,s-sgz/ |
Xi Yi Yi '=lnyi Xiii xi2

° " " "" ° °

,, ago

32 5 1.60944 51.50208 1024

I 48 31 6.63986 86.6576 1280

b' = 1280×6.63986-86.6576×48
3×1280 -
4832

lnb = 2.825167

b= 16.8638

NOW ,

3×86.6576 48×6-63986
a'
-

2
3×1280 -
µ 8)

Laa = -
O -

0382425

A = 6.0865×10-3
(0-0382425) se
16.8638 e-
Y=
→ Non tinea Least Square : -
-

Errol Z( yi
Maki
)2
-

.
E= -
be
Iet

28 =° Em (
Yi
-

bé2aaki)é2aaxi = ☐

☒ i. i -

}±a=o Em (Yi -
be
-2mi
)(xié2aani)=o
i- I
-

egn ① &
@ cannot be solved for
' '

and
'

b' if exactly
this
nonlinear
a we use
,

least method
square .

You might also like