Docsity

Homework Problem for Numerical Methods | CS 3414, Assignments of Computer Science

Toggle sidebar
bg1
CS3414. Homework problem set II. Due in a week, in class.
C&K = Cheney and Kincaid textbook. You can write your codes in C or C++.
1. C&K 26, page 33.
2. C&K 52, page 35.
3. Use Taylor series to show that the truncation error involved in calculating of
the derivative
 
is of order

,i.e. (truncation)
 !#"$&%('*)
.
4. C&K 1, page 82
5. Write an efficient code that computes
+,-.
for any
/021 1 0
to
within 3 decimal points. Provide printouts for
%436587:9
;
39
/
3
. Clearly indicate
what algorithms are used for different values of x.
6. Write a code that produces accurate (within machine precision) values of

% <>= ?A@BDC!<E=GFHF
=GI
for
3
1JK1
7
. Print out results for
%4365
0
9L7 3
?NMO
.
7. Use Series command in Mathematica to find first 6 terms in the Taylor
series expansion of
P
"Q
-.
. Given that, how would you compute
P
"Q
7 35R3
? (10
rad).
8. You have successfully passed CS3414, graduated, and landed a well-paid
job with a financial consulting company in Boston. Your first client is a young
businessman interested in exploring different investment portfolios. These differ
by two parameters: average expected annual return (annual interest rate, %)
S
and
duration of investment
T
. Assume for simplicity that the client invests $100,000
and makes no further investments/withdrawals over the entire duration of the in-
vestment. Assume R can range from 4 % (low-risk, low-yield savings account) up
to 25 % (investments into Russian oil industry) and
3
1
T
1
7 3
. Use 2D plotting
capabilities of Mathematica to make a nice presentation for your client, showing
his options in terms of final net gain as a function of (R, T). Which combination(s)
of R,T can yield $150,000? Is it at all possible to make $1,000,000 under above
constraints on R and T?
1

Partial preview of the text

Download Homework Problem for Numerical Methods | CS 3414 and more Assignments Computer Science in PDF only on Docsity!

CS3414. Homework problem set II. Due in a week, in class.

C&K = Cheney and Kincaid textbook. You can write your codes in C or C++.

  1. C&K 26, page 33.
  2. C&K 52, page 35.
  3. Use Taylor series to show that the truncation error involved in calculating of

the derivative

is of order

, i.e. (truncation)  !#"$&%('*)   .

  1. C&K 1, page 82
  2. Write an efficient code that computes

for any

to

within 3 decimal points. Provide printouts for

436587:9 ;^3 9 /^3

. Clearly indicate

what algorithms are used for different values of x.

  1. Write a code that produces accurate (within machine precision) values of  (^) % <>= ?A@BDC!<E=GFHF =GI for

JK1 7

. Print out results for

4365 0 9 L7 3 ?NMO

.

  1. Use Series command in Mathematica to find first 6 terms in the Taylor

series expansion of P

Q -.^

. Given that, how would you compute P

Q  7 3 5R3 

? (

rad).

  1. You have successfully passed CS3414, graduated, and landed a well-paid

job with a financial consulting company in Boston. Your first client is a young

businessman interested in exploring different investment portfolios. These differ

by two parameters: average expected annual return (annual interest rate, %) S and

duration of investment T. Assume for simplicity that the client invests $100,

and makes no further investments/withdrawals over the entire duration of the in-

vestment. Assume R can range from 4 % (low-risk, low-yield savings account) up

to 25 % (investments into Russian oil industry) and

T

. Use 2D plotting

capabilities of Mathematica to make a nice presentation for your client, showing

his options in terms of final net gain as a function of (R, T). Which combination(s)

of R,T can yield $150,000? Is it at all possible to make $1,000,000 under above

constraints on R and T?

1