0% found this document useful (0 votes)
7 views7 pages

Abhishek Mid Practice

Assignment 4 focuses on curve fitting and numerical optimization, with practice questions due on February 18th. Students are required to solve 10 problems, of which only two will be graded, and the solutions must be submitted in a single file on BrightSpace. The problems cover various topics including linear functions, parachutist descent modeling, least squares line, polynomial fitting, and optimization methods.

Uploaded by

akolakot
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)
7 views7 pages

Abhishek Mid Practice

Assignment 4 focuses on curve fitting and numerical optimization, with practice questions due on February 18th. Students are required to solve 10 problems, of which only two will be graded, and the solutions must be submitted in a single file on BrightSpace. The problems cover various topics including linear functions, parachutist descent modeling, least squares line, polynomial fitting, and optimization methods.

Uploaded by

akolakot
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/ 7

Assignment 4: Curve Fitting and Numerical Optimization

Practice Questions for Exam I. Due: Tuesday, February 18th , 3:30 pm.
No late submissions will be accepted!

Only two out of the following 10 problems will be graded at instructor’s


choice. Please write your solutions for each problem in the allocated
space and upload your submission (single file!) into BrightSpace. The
theoretical (i.e., non-MATLAB) questions are also practice exercises for
the first exam (scheduled on Thursday, February 20th ).

1. A small company has been in business for 3 years and has recorded annual profits
(in thousands of dollars) as follows: 4 in the first year, 2 in the second year, and 3 in
the third year. Find a linear function that approximates the profits as a function of
years, in the least-squares sense. What is the (predicted) profit in the fourth year?

123 an + b 3
y
m
=
+
x = ,

-1000 2000
y 3000
Exi = 6

Eyi 9000

all a
=

Eniyi = 1700s

J Exit = 14 .

o
= y =
- 500n + 4000

a =
-

500
Answer:

b ::
-
=

- ,
the predicted profit is
y :
-

500(y) + 1000

2 #$2000
2. A parachutist jumps from a plane and the distance of his drop is measured.
Suppose that the distance of descent d as a function of time t can be modeled by
d = ωt + εt2 e→0.1t . Find the values of ω and ε that best fit the data in the table
below:
t (in seconds) 5 10 15 20 25 30 35
d (in meters) 30 80 120 150 170 180 185

=
B .

An
-
-

I
30
15 1632
-

8
:

s
10

15
36

50
.

-
1879

2042
[5) =

150

20 54 :
1341 110
25 3031 18 0
51 .

3044 .
8083 185

3536-9917
solved
The system
can be
by
AAx = AB
solve
using
Matlab to
get

Answer: ω = 41674 ε= 1 0755


.

0-1t
x 4 17 but + 1 1755 t2
-

= . .
3

x1 + x2 + · · · + xn y1 + y2 + · · · + yn
3. Let x = and y = . Show that the least-
n n
squares line for the data (x1 , y1 ), (x2 , y2 ), ..., (xn , yn ) must pass through (x, y).

The least squares line has the


formy-ant,

evaluated orig) j =
an + h

=
Zi i
n

Engine
finifie (Enzyi nEriey _
+
;
-Ex Yikni
n(neui-Ceni))

leat aata
4. (MATLAB) Find the polynomial of degree 4 that fits thepasses
through (j)
function f (x) = sin(ϑx)
at the points x1 = →2, x2 = →1.5, x3 = →1, x4 = →0.5, x6 = 0, x7 = 0.5, x8 = 1,
x9 = 1.5, x10 = 2 in the least-squares sense.

Answer: f(x) = -0 .
026936d3 -0 .
05 3812n

5. (MATLAB) Problem 3, pages 548-549.

Answer: (a) f(u) =


0 .
974026m = 31 .

6629092 +

(b) 000000
1687 .

51636 + 1687
914026(1600) 1266 .
-

= 0 .

1687
1266 51636
+
21558 4416
-
-

.
= 2123 .

89

6. Problem 2, Section 8.2 (page 226).


N 3 Y
of F(a) For
2. 2

Graphs
n
.
= -
=

- n = 3

n
-
=
Y

A
0
.
-

0 .
%0-

O +5 -

0
-
10-

0
.

05 -

0 .
00 -

· """"To
From the graph & f(x) =

nee
- for n = 213 ,

->
Each
function exhibits one relative
maximum-

to the
>
- The location of the maximum
shifts
increases
right
as
a
increase
values decrease slightly asn

>
-
the peak
differentiate fla)
and solve for f(x) =0
. The

maxima occur at : n = n

Thus ,
for :

.
2
max
at u=
n= 2 ,
+
.
3
maxator
=

+ n = 3 ,
Y max at a = y
>
- n = ,

general pattern where


the function
suggests
a
This
relative max at ven .
attains its 5

7. (a) (MATLAB) Problem 1, Section 8.2 (page 227).

Answer: min a f(u) = 5 n = 1

(b) (MATLAB) Problem 2, Section 8.2 (page 227).


927
Answer: mine
flul = -1 .

114 a = 3 .

(c) (MATLAB) Problem 4, Section 8.2 (page 227).


-0 368a 0 .
368 .
& f(m)
-
=
Answer: min =

8. (MATLAB) Problem 6, Applied Problems for Chapter 8 (page 232). Find the
function to be minimized (show your work below). Then, use Newton’s method to
find the length of the shortest straight beam.
to be minimised is
given by
The
function :

+N

=0 o
i
30

ooo
n = => a
-
LSD
Sino

=
sinocoso (0coro10tio) -
(osino + 10cs0) (coso-si

Sink a cost O

& zosiro-locoooh"-gorincso
Newton's
+ 30.
sind
Using . method

no
is guessed to be
14

Answer:
=
No = 05

606 My = 0
,
606
609 a = 0,
= 0, 3
az

The minimum
is a Grad
h)ft 0 ,
6

9. (a) Find the exact point in the first quadrant (x, y ↑ 0) on the curve
x2
+ y2 = 1
4
that is closest to the point (1, 0), and prove that it is indeed the closest point.
Using pythogras d D
=+&

3
=
y = 0
Y -Y
-
=

u)
1-2)
2

D Cl
22 + (1
=
-
=
1 -

1 - x =
)
-

=
2-2a +
D' 2+
1 minimum
the

I
-

= Y

found at
a T
=
4/3
D = 0 = - 2
+ 4 =
4 y = 0 .
747 ·

This is true since D"70


(b) Use the golden search method (just one iteration) to find the point in part (a)
by starting with the interval [0, 2].
v =
30 382 D(u) = 2 22 m [ab] 50 2)
-

+
.

= .

v(b a) v(z) 764 D(x ) = 0-910


a, +
-

a + -
= 0 = 0 ,
=

a + (1 u)(b =

2) = 0 + (1 - )(z) = 1 .
233
D(x2) = 0
.

677
a
-

=
2

D(v ) ,
- (12) : ·
After situation the minimum of D is

yart 213
+

04 = .

(c) If you use the golden section method on the interval [0, 2], find the number of
=
0

iterations needed to locate the x value of the minimum from part (a) to within a
0.001 range. "

To 27 (1-2) 0 61803x2
for [a b) = .
=
=
,
,

such that
mis chosen
: The number
iterations
(2-0) (l-rsE of
needed to locate n

& 10 .

61203322000 is n
216 .

100
~
n1158
7

10. (a) A cylindrical tank without a top is to hold 1, 000ϑ m3 of water. Find
the exact radius of the cylinder that minimize the amount of material needed to
manufacture the tank. Justify your finding.
v = r 1 = 1000 d =

o
Ar + 2Ar1 .

-
A =

A =

2nv-Dn
Newton's Method
Using
A
Unt

-
=

Fo = 5

06 0
Fu 10 ·

T = 7 .
=

11000
9 . 01 10 - 0
=
re T
=

: .
9 90 Twin-10m
Vz
.

Answer: radius= 10m


-

(b) If you use the Fibonacci search method on the interval [8, 11], find the number
of iterations needed to locate the radius value of the minimum from part (a) to
within a 0.1 range.

-
En >

b
n = 8

logeors nlog (5)

Answer:
go o a

number iterations nes


of -

You might also like