Homework 2 Solution

$35.00 $29.05

You'll get a: . zip file solution, download link after Payment


  1. For each of the ve important series mentioned in the slides of section 1.2, write down the detailed derivation of its formula and the interval of convergence.


  1. Compute by hand


  • T5(x) for f(x) = 3 tan x, at point c =  =4.


  • T2(x) for f(x) = ecosx, at point c = 0.


  1. For f(x) = excos x at c = 0


  • Find T2(x) by hand.


(b) Use Taylor’s theorem to give an estimate of error jf(0:5) T2(0:5)j. Compare it with the true

error jf(0:5) T2 (0:5)j    
(c) Approximate Z0 1 f(x) dx by Z0 1 T2(x) dx. Find the true error.

(d) Find the Taylor series for f(x) = x2 1 at c = 1 and c = 2. Compare your result with the original function. Can you conclude what will the Taylor series of a general polynomial look like?



  1. Find the Taylor series of x at c = 1. Determine the interval of convergence (be careful with the ending points.).



  1. Use the result you nd in question 2 to evaluate 2. Round your answer to 4 decimals.


  1. Convert (100010010111011)2, (10:11)2to decimal (base 10).


  1. Convert 37, 0:43, 10:11 to binary representation.


  1. Convert (1234)5to decimal, then base 8 representation.


  1. Write down the IEEE format of the following numbers


  • 75


  • 5, using rounding up, rounding down and rounding to the nearest


  • 1, using rounding up, rounding down and rounding to the nearest


  1. What is the gap between 2 and the next larger Single-precision number?


  1. What is the gap between 201 and the next larger double-precision number?


  1. How many di erent normalized double-precision numbers are there?


  1. Consider a very limited system in which numbers are only of the form  1:b1b2b32E and the only

exponents are E = 1; 0; 1.


  • What is the machine precision ” for this system?


  • What are the smallest and largest representable positive number in this system?


  • Consider the sequence mentioned in the last page of slides 2.1, starting with 1=3.


  1. Explain why the computed value eventually become 1.





  1. Determine (by hand computing) how many iterations is needed for the sequence to reach 1 for the rst time.


  1. In the 7th season episode Treehouse of Horrors VI of The Simpsons, Homer has a nightmare in which the following equation ies past him:


178212 + 184112 = 192212


If this equation were true, this would contradict Fermat’s last theorem which states for n 3, there do not exist any natural numbers x; y and z such that xn + yn = zn. Did Homer dream up a

counterexample to Fermat’s last theorem?



  • Compute 12178212 + 184112 in Matlab. What does Matlab report?


  • Try again by typing ’format long’ before your code in (1). What does Matlab report?


  • Prove that the equation cannot hold. Such an example is called a Fermat near miss. (Hint: think about even and odd number on both sides.)


  • In a later episode The Wizard of Evergreen Terrace, Homer writes the equation


398712 + 436512 = 447212:


Can you debunk this equation?


  1. (Challenge) Consider the following polynomial


p(x) = (x 1)7


(a) In Matlab, do the following and attach your graph.


x = 0.988:0.0001:1;


y = (x-1).^7;




This will plot the graph of p(x) on the interval [0:988; 1] using points with 0.0001 between each. (b) Notice

(x 1)7 = x7 7x6 + 21x5 35x4 + 35x3 21x2 + 7x 1 This time do the following and attach your graph.


x = 0.988:0.0001:1;


y = x.^7-7*x.^6+21*x.^5-35*x.^4+35*x.^3-21*x.^2+7*x-1; plot(x,y);


Mathematically this should produce the same result as in (1).


(c) Explain why Matlab has no issue with (1) but large error is seen in (2).