# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

2 Pages

### hw1_solutions

Course: CS 257, Fall 2006
School: UIllinois
Rating:

Word Count: 339

#### Document Preview

257 Numerical CS Methods - Homework 1 August 31, 2006 1. [1pt] Count the number of operations involved in evaluating a polynomial using nested multiplication. Solution: From the pseudocode on page 8, it is clear that there are n multiplications and n additions for a polynomial of degree n. 2. [1pt] Why does the function f (x) = |x| not posses a Taylor series at x = 0? Solution: The function does not have a...

Register Now

#### Unformatted Document Excerpt

Coursehero >> Illinois >> UIllinois >> CS 257

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
257 Numerical CS Methods - Homework 1 August 31, 2006 1. [1pt] Count the number of operations involved in evaluating a polynomial using nested multiplication. Solution: From the pseudocode on page 8, it is clear that there are n multiplications and n additions for a polynomial of degree n. 2. [1pt] Why does the function f (x) = |x| not posses a Taylor series at x = 0? Solution: The function does not have a continuous first derivative at 0. 3. [1pt] In the Taylor series for the function 3x2 - 7 + cos x (expanded about x = 0) what is the coefficient of x2 . Solution: Recall the first few terms of the Taylor series f (x) = f (0) + f (0)x + f (0)x2 + ... 2 and in this case f (0) = 0 - 7 + 1 = -6 f (0) = 0 - 0 + 0 = 0 f (0) = 6 - 0 - 1 = 5 so the coefficient of x2 is f (0)/2! = 5/2. 4. [1pt] Using the Alternating Series Theorem, what is the least number of terms required to compute as 3.14 (rounded) using the series =4- 4 4 4 + - + ... 3 5 7 Solution: The nth term of the alternating series is 4 2n+1 . Therefore we must find the smallest integer n such that 4 5 2n + 1 1000 399.5 n Therefore 400 terms are needed. 5. [1pt] Do you expect your computer to calculate 3 Neither Solution: 1 1 nor 10 can be represented (exactly) as floating point numbers, so the result will not be exact. 3 1 However 2 can be represented exactly and the product will be calculated as with infinite precision. 1 3 with infinite precision? What about 2 1 2 or 10 1 10 ? 1 6. [2pt] Write a MATLAB function float2bin that takes as input a floating point number x (from the range 0.0 x < 1.0) and returns the fractional binary representation of that number. Look in Section 2.1 of the book for guidance. You may find the MATLAB functions num2str and floor helpful, as well as the built in documentation regarding strings and the concatenation of strings. The following test cases illustrate the intended behavior of float2bin in a MATLAB session. >> float2bin(0.0) ans = 0. >> float2bin(0.5) ans = 0.1 >> float2bin(0.125) ans = 0.001 >> float2bin(0.1) ans = 0.0001100110011001100110011001100110011001100110011001101 >> float2bin(0.123) ans = 0.0001111101111100111011011001000101101000011100101011 Solution: function binstr=float2bin(x) binstr = '0.'; while x > 0 x = 2*x; binstr = [binstr,num2str(floor(x))]; x = x - floor(x); end 2
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

UIllinois - CS - 257
CS 257/MATH 257Numerical Methods - Homework 3September 21, 20071. [1pt] Section 3.2 #15 Solution: The first iteration of Newton's method is: x1 = x0 - f (x0 ) f (x0 )In this case x0 = 1, f (x0 ) = 1, and f (x0 ) = 3x2 - 1 = 2. Therefore x1 =
UIllinois - CS - 257
CS 257/MATH 257Numerical Methods - Homework 2CS2571. [2pt] Section 1.2 #1 Solution: f (x) = f (0) + xf (0) +n x2 2! f(0) + f (x) = (1 + x) , f (0) = 1 f (x) = n(1 + x)n-1 , f (0) = n f (x) = n(n - 1)(1 + x)n-2 , f (0) = n(n - 1) f (x) =
Maryland - ENEE - 204
Maryland - ENEE - 204
N. Illinois - HIST - 110
Terms Part Two * image(s) available in image database Justinian-emperor of the eastern empire, he is best known for his law code and for overseeing the construction of the Church at Hagia Sophia Corpus Iuris Civilis- (Body of Civil Law) is the modern
N. Illinois - ANTH - 101
Review for Exam 4ANTH 101Fall 2007What were the major centers where plants and animals were first domesticated? Agricultural origins can be traced to the Neolithic Age (around 8,000 B.C.). Plant domestication seems to have occurred independentl
Arkansas - LANDSCAPE - 001
March 13, 2008 Judy Brittenum Second Nature: A Gardeners Education Written by Michael Pollan, Second Nature follows the meditations of a gardeners relationship with the earth and its nature. Pollan communicates his meditations through the learning he
Towson - EDU - 201
Laura Tapiero March 10, 2008 ELED 201.002Mid Term Examination1. The main purpose of Social Efficiency in education is to prepare students for the workforce as mentioned in the notes from Blackboard. Social Efficiency also has the biggest impact in
Arkansas - LANDSCAPE - 001
Jackson Cellers February 12, 2008 Movie Synopsis Design II Cross Creek Martin Ritt produced cross Creek. The movie stars Mary Steenburgen, Rip Torn, Peter Coyote and Dana Hill. The story introduces a frustrated writer who aspires to create the next g
Towson - EDU - 201
Laura Tapiero ELED 201.002 School Observation #1 February 22, 2008On February 20, 2008, I completed my first school observation at Rodgers Forge Elementary School. When I first walked into the school building, I noticed the main office on my right
Arkansas - LANDSCAPE - 001
1Composition II Craig Crowder 05/02/07 F for Fear In the film V for Vendetta, the director, James McTeigue, reveals many parallels between the future England and our present America through the extensive use of fear in politics. The Chancellor, Ada
Towson - BIO - 115
UNIT II: MOLECULAR GENETICSHistory: We've said all along that DNA is the genetic material and that DNA encodes all of the information needed for the organism to function throughout life. This was not always known. For many years, biologists thought
Arkansas - LANDSCAPE - 001
1Composition II Craig Crowder March 12, 2007 Detachment From Human Suffering In the poem &quot;Musee des Beaux Arts,&quot; W. H. Auden introduces the theme of how people feel of others' suffering through the paintings of Pieter Brueghel with the use of image
Towson - BIO - 115
March 25, 2008Evolution Notes (Part I)Truth (Fact): Scientific Theory Just like the &quot;theory&quot; of gravity Support/Predict Evolution &quot;Billy Bob&quot; Theory Doesn't have any informationReligion: Creationism Teach Other &quot;Theories&quot; Let Students Decide Do
Arkansas - LANDSCAPE - 001
1Jackson Cellers 02/14/07 Craig Crowder Composition II Everyday Use of Symbolism Alice Walker uses symbolism in &quot;Everyday Use&quot; to display the daughters conflicting views of heritage and their opposing lifestyles. Mamas two daughters, Maggie and Dee
Towson - BIO - 115
1Population GeneticsWe have defined evolution as change in a population over time. A more precise definition, that takes into account the genetic basis of the change, is the following: Evolution is the change in allele frequencies and/or genotypic
Cal Poly - PHYS - 121
CHAPTER 1PHYS 121,WEEK 1APRIL 2-6, SPRING 2007MEASUREMENT AND PROBLEM SOLVINGRemind students that their answers to odd-numbered exercises may be slightly different from those given here because of rounding. Refer to Problem-Solving Hint: The
Binghamton - COLI - 110
Natalie Nunez World Literature Matt Englund The Grail ContinuationPerceval continued a solitary life with his uncle, the hermit. He regained his faith along with much knowledge and invaluable wisdom, but Perceval still continued to search for his p
SUNY Albany - AJST - 265
Binghamton - COLI - 110
Natalie Nunez World Literature (COLI 110) Matt EnglundWomen and Sex in the Metamorphoses: A Tragic, Hopeless Love StoryIn Metamorphoses women play have stereotyped roles. They have one of two roles and that is either of a virginal, innocent girl
Cal Poly - PHYS - 121
CHAPTER 5, PHYS 121, WEEK 53. 5. (b).APRIL 30 - MAY 4SPRING 2007WORK AND ENERGY(a) No , the weight is not moving, so there is no displacement and therefore, no work. (b) Yes , positive work is done by the force exerted by the weightlifter. (c
Brown - BIOL - 0500
RNA Editing DNA RNA Protein Uracil, cytosine, thymine = pyrimidine Adenine and guanine - Purines Humans 25,000 genes, 100,000,000,000 neurons, 10^14 synapses Grass 50,00 genes 0 neurons or synapses Fly 15,000 genes, 25000 neurons, 250,000,00
Cal Poly - CHEM - 317
CHEM 3171. Name the following compounds a)OPS 3 Ethers and Epoxidesb)O2. Show how you would prepare each of the following compounds. a)OfromOHOHb)OCH3fromc)OCH3 OHfromOHd)from3. Complete each of the following react
Cal Poly - CHEM - 316
Chem 316Problem Set 6Nomenclature Problem SetNO2 1. a. b. OCH3 I d. e. c. Br F Br f. O O Cl O2. a.b.NO2c.Brd.CH3Oe.f.O2N3. a.b.c.NH2 4. a. b. NHCH3 5. a. OH b. OH HO OH g. O b. c. NO2 O d. N OH e. O h. c. OH OH NH2 O
Cal Poly - CHEM - 317
1. Design an experiment using amine basicity to determine if a substituent Z is electron-donating or electron-withdrawing by induction only or by resonance and induction. Describe what you should observe in your experiment for all possibilities of Z.
Cal Poly - CHEM - 317
Amines1. Design an experiment using amine basicity to determine if a substituent Z is electron-donating or electron-withdrawing by induction only or by resonance and induction. Describe what you should observe in your experiment for all possibilitie
Cal Poly - CHEM - 317
CHEM 317PS 4 Aldehydes and Ketones: Solutions1. Rank the following carbonyl compounds in order of increasing equilibrium constant for hydration. O O Cl O H Cl O H H O H2. Complete the following reactions: O A O A = HO OH , H+B O CB = 1) NH2
Cal Poly - CHEM - 317
PROBLEM SET 2: ALCOHOLSCHEM 3171. Name the following: a)OHb)ClOH2. Predict the more acidic compound for each pair below (explain your choice): HO a) Cl OH b) OH OH3. Complete the following: O 1) CH3MgI 2) H3O+ H2SO4 heat H2 PtC6H12O
Cal Poly - CHEM - 317
CHEM 317PS 3 Ethers and Epoxides-Solutions1. a) ethyl isopropyl ether or 2-ethoxypropane b) sec-butyl t-butyl ether or 2-t-butoxybutaneTsCl py2a)OHOTsO-NaHOHO1) BH3-THF b) 2) H2O2/NaOHOH1) Na 2) CH3IO1) Hg(OAc)2, CH3OH c) 2
Cal Poly - CHEM - 317
Problem Set 1 Chem 317 1. How could you use 1H and/or 13C NMR to distinguish between the following pairs of isomers (use both if possible; if not, explain why not).a. i ii13iiii and ii would be difficult to distinguish in the C NMR-both have 9
Cal Poly - PHYS - 122
Cal Poly - PHYS - 122
Cal Poly - VS - 203
VS 203 Quiz 2 Name_ 1. Describe nervous coccidiosis, where does it occur, what are clinical signs, when does it occur, what is the mortality rate? - Clinical neurological signs (ex: ataxia) - Occurrence: Northwest and Western Canada - Mortality Rate:
Cal Poly - VS - 203
Quiz 1 VS 203Fall 2007Name_1.) What are four groups of Protozoa? - Sporozoa - Flagella - Amoeba - Iliates 2.) What is the etiology of coccidiosis? - Protozoa - Sporozoa - Apicomplexa - Coccidia - Eimeridae - Isospora 3.) What are the three stag
Cal Poly - PHYS - 122
CHAPTER 14PHYS 122WEEK 8NOV 5FALL 2007 SOUND7.They arrive at the same time , because sound is not dispersive, i.e., speed does not depend on frequency. (1.5 10 m/s)(2.0 s) 2312.The sound travels through the distance twice. d =vt 2
Cal Poly - PHYS - 122
Cal Poly - CHEM - 317
Chemistry 317 Problem Set 2. Solutions1. a) (E) 5,6-dimethylhept-4-en-1-ol b) (1S, 4R)-4-chlorocyclohex-2-en-1-olCl OH OH2. a)inductive effectb) solvationOH O3.OHCH3ABHO BrCDEFG4. Complete the following reactions or re
Cal Poly - PHYS - 122
CHAPTER 10PHYS 122 FALL 2007WEEK 2SEPT 24TEMPERATURE AND KINETIC THEORY1. (b).4.Not necessarily . Internal energy does not depend solely on temperature. It also depends on mass.16.TC = 5 (TF - 32) = 5 (98.2 - 32) = 36.78C. 9 9 TF = 9
Cal Poly - PHYS - 122
Phys 122 College physics Midterm 2 Review!II. Thermodynamics C. Laws of Thermodynamics 1. Systems, states, and processes a. System: quantity of matter enclosed by boundaries or surfaces (real or imaginary; described using macroscopic properties (T,
Cal Poly - PHYS - 122
Cal Poly - CHEM - 317
Problem Set 1 Chem 317 1. How could you use 1H and/or 13C NMR to distinguish between the following pairs of isomers (use both if possible; if not, explain why not).a. i ii iiic. i ii iii2. For the compounds below, determine if Ha and Hb are equ
Cal Poly - CHEM - 317
CHEM 317PS 4 Aldehydes and Ketones1. Rank the following carbonyl compounds in order of increasing equilibrium constant for hydration. O Cl Cl O H H O H O O H2. Complete the following reactions: O A OB O CD3.In the reaction of ethyl acetoa
Cal Poly - PHYS - 122
Cal Poly - VS - 203
VS 203 Quiz 3fall 2007name_1. What is the nomenclature of Ascarids? (including horse, pig, raccoon, and dog) - Animal nemathelmiathes, nematode, ascaridae i. Parascaris ii. Ascaris iii. Baylisascaris iv. Toxocara 2. What is an indirect life cyc
University of Texas - CC - 306M
Acouso/audiohearingaero Air or gasAuri/oto earcerumino waxsalpingo Eustachian tube or uterine tubeTympano/myringo eardrum-acusis Hearing conditionpinna Auricle (little ear); projected part of the external earExternal auditory
Cal Poly - PHYS - 122
Phys 122 College Physics II Final Exam22 August 2007 Problems1. A tropical hurricane can be thought of as a gigantic heat engine. The hurricane draws in heat (warm, humid air) from the ocean surface at 28C. The warm air cools as it rises and water
Cal Poly - CHEM - 317
Chem 317 Problem Set 6 Carboxylic Acids and Derivatives1. Show the mechanism for each of the following reactions: a)OH+ + CH3OHO+ H2OO OOH Ob)Cl+OH+ HCl2. Write the products for each of the following. Use mechanisms to explain t
Cal Poly - CHEM - 317
Cal Poly - PHYS - 122
Cal Poly - CHEM - 317
Cal Poly - ASCI - 223
Wool Harvest, Handling, and Evaluation The majority of the sheep raised in the USA produce wool that should be harvested each year. Because of the unique characteristics of this natural fiber, wool has a market value. The value of each fleece will be
Cal Poly - ASCI - 223
MARKING OF LAMBS Marking is a collective term generally used to describe tail docking and castration. On large operations, marking also usually includes the placement of an ownership mark (paint brand or ear mark). Vaccinations of lambs are also quit
Cal Poly - ASCI - 223
FLOCK HEALTHOwners of livestock spend considerable amounts of time and money attempting to maintain the health of their animals. It is important then, to define health. Even though many definitions or interpretations may exist, there are two approac
Cal Poly - ASCI - 223
Grazing Management Grazing is the meeting of animal and plant. Sheep, cattle, and horses graze, but so to do antelope, bison, deer, and other large ungulates, and so to do insects, rodents, and other living organisms. Through grazing, stored nutrient
Cal Poly - ASCI - 223
Sheep Handling Sheep need to be handled for various reasons. These include shearing, tagging, administration of injections, administration of drenches and boluses, trimming feet, pregnancy diagnosis, loading and unloading from vehicles, assistance at
Cal Poly - CHEM - 317
Cal Poly - VS - 229
Quiz 5 Key 1. What muscles are involved in inspiration? Diaphragm and intercostals muscles 2. What is the ratio of time of expiration to inspiration? 2:1 3. What is apnea and dyspnea? Apnea is without breathing Dyspnea is difficult breathing 4. What
Cal Poly - CHEM - 317
Chem 317NMR Practice- solutionsO 1 Cl OHCl 23OH4O 5 HOH 6H2SO4 130 Cnotnorstereochemistry not given, but not necessary for this problem
Cal Poly - ASCI - 223
Electric Fencing Fences can be used to either keep livestock where they should be, or to keep unwanted animals from coming into contact with the livestock. Well designed and operating fencing systems allow for more efficient management of the animals
Cal Poly - CHEM - 317
CHEM 317 Quiz 3Winter 2008 Name:_ KEY _1. Complete each of the following reactions. If no reaction occurs, write `No reaction'.ONaOCH3 a)OCH3OHOHHBr b)O OHBr2. Circle the correct response(s) for each of the following:a) Which of t
Cal Poly - CHEM - 317
CHEM 317 Quiz 4-not gradedWinter 2008 Name:_1. Complete each of the following reactions. If no reaction occurs, write `No reaction'.H+ a)O+ 2 CH3CH2OHb)O1) NH2NH2 2) KOH, heat2. Circle the correct response(s) for each of the following