CSCI 4650 Numerical Analysis Assignment

Assignment Help Programming Languages
Reference no: EM133168946

CSCI 4650 Numerical Analysis - University of Colorado

Assignment 1:

Question 1. What is the smallest number of multiplications and additions needed to evaluate P (x) = 4x6 + 2x2 + 2x + 6 at x = 1/3.

Question 2. What are the most number of multiplications and additions needed to evaluate a degree n polynomial, a0 + a1x + a2x2 + .... + + anxn using nested multiplication.

Question 3. Convert 110 .110 from binary to decimal.

Question 4. Covert 7 .2 from decimal to binary.

Question 5. Create a function in Python which takes a positive integer as an input and outputs its binary repre- sentation.

Question 6. A long double floating point number has 1 bit for a sign, 15 bits for an exponent, and 64 bits for the mantissa. What is ∈mach? Explain your reasoning.

Question 7. Consider the function

f (x) = 1 - (1 - x)3/x

(a) Give an alternate form of f (x) which avoids the issue of subtraction by nearly equal numbers when x is close to 0.

(b) Create a table of the values that Python outputs for f (x) and your alternate form from (a) for x = 10-k for k = 0, 1, 2, . . . , 10.

Question 8. Consider the function

f (x) = ln(x)

(a) Find the Taylor polynomial of degree 4 around the point x = 1.

(b) Use your answer from (a) to estimate ln(1.01) and use the remainder theorem to say how large your error could be between the estimate and true value. Finally use Python to calculate the error.

Extra Credit: Create a function in Python which takes two numbers, the numerator and denominator of a fraction, as input and outputs the exact binary representation of the number. Determine some readable way for dealing with repeating values.

Assignment 2:

Question 1. Solve the equations x5 - x - 1 = 0 and ln(x) = sin(x) using (a) the bisection method (b) the fixed point method (c) Newton's method (both roots have multiplicity 1) (d) the Secant Method and (e) the built in function fsolve in scipy.optimize. Note that the last part will require a bit of independent Googling as it is something that we didn't cover in class. I think this is GREAT practice for the real world. If you do need help on this however please come to office hours of send me an email! For each function include a table listing your iterations and the approximation of the root, except for (e). Also include a very brief comparison of the methods for these problems.

Fun math fact (unrelated to the work you need to do)! One can show, using a field of math called abstract algebra, that although there are equations to find the roots of polynomials of degrees 2, 3, and 4, there can't be one for 5. This is known as the Abel-Ruffini theorem. Practically, this means that the root you find of x5 x 1 can't actually be written down exactly using "common" operations (think roots, addition, division, etc.). Since this is already the case for polynomials, hopefully this gives you a good idea that in general finding roots not computationally can be very hard or even outright impossible.

Question 2. How many iterations are required of the bisection method, starting with an interval of [ a, b] to approximate a root with accuracy at least 10-6?

Question 3. Consider√f (x) = x/2 + 1/x, g(x) = (2x)/3 + 2/(3x), h(x) = (3x)/4 + 1/(2x). Each of these has a fixed point of √2. Which will converge the fastest using the fixed point method?

Question 4. Find the fixed point iteration produced by Newton's Method on f (x) = x3 - A, where A is an an arbitrary number (a parameter). That is, find a general formula for calculating 3√A.

Question 5. What is the multiplicity of the root at 0 of f (x) = x2 sin(x2)? Write down the fixed point iteration produced by modified Newton's method for this problem.

Question 6. A fisher wants to set the net at a water depth where the temperate is 10C. By dropping a line with a thermometer attached, they find that the temperature is 8 degrees at a depth of 9 meters, and 15 degrees at a depth of 5 meters. Use the Secant Method to determine a best estimate for the depth at which the temperature is 10.

Extra Credit: The Mandelbrot set is one of the most interesting and beautiful objects in mathematics. Do a bit of research into this set and discuss how it is generated and what topic it relates to from this chapter.

Assignment 3:

Question 1. In this problem we will create code to solve a matrix using Gaussian elimination without partial pivoting.

(a) Create a function that takes a matrix A, number c and two integers i and j as inputs, and outputs a matrix where row j is replaced with row i times c subtracted from row j.

(b) Using part (a) create a function which takes as input a matrix A and an integer i and eliminates column i. That is, it outputs a matrix using part (a) multiple times where every entry below Ai,i, the diagonal element, are 0.

(c) Create a function with an input of a matrix A that applies (b) multiple times so that the resulting matrix is upper triangular. Note that we are doing Gaussian elimination, so our input is really an augmented matrix, meaning that we have one more column than rows.

(d) Create a function that takes as input a matrix A in upper triangular form and backsolves for your solution. Again, A is not square as we are dealing with an augmented matrix. Hint: Work this out on paper first. You should be able to write down an explicit formula for what your solution should be.

Question 2. What is the condition number of

13_matrix.jpg

You may use Python to calculate the inverse of the matrix, but if you do so, include your code. Practically, what does this mean when solving the system of equations Ax = b?

Question 3. For each of the matrices, give its PA = LU factorization.

1417_matrix1.jpg

Question 4. Using your answer from (3b) solve the system of linear equations

x + y = 3
2x + y - z = 1
-x + y + z = 3.

Question 5. Apply two steps of Newton's method to approximate the system of non-linear equations:
x2 + 4y2 = 4,
4x2 + y2 = 4.
You may use Python to solve any systems of linear equations you need, but if you do please include your code. Start at x0 = (1,1).

Question 6. (Coding) Create a function which runs Newton's method for k steps on the previous system of equations. Include a table of the approximate solutions.

Extra Credit (Coding): Convert your algorithm from (1) to output the PA = LU factorization of a matrix A. Note that here we are no longer dealing with augments matrices, but instead square matrices. Then, using this algorithm create a function which takes a matrix A and tor b as an input, outputs a solution to Ax = b.

Reference no: EM133168946

Questions Cloud

Compute the total unreleased appropriations : As of December 31, 2021, total disbursements for Personnel Services, Maintenance and Other Operating Expenses, Compute the total unreleased appropriations
Find the taylor polynomial of degree : Create a function in Python which takes a positive integer as an input and outputs its binary repre- sentation
Compute the dollar markup per unit on variable cost : Rios Company makes drones and uses the variable cost method in setting product price. Compute the dollar markup per unit on variable cost
Prepare a differential analysis dated july : Prepare a differential analysis dated July 31 to determine whether the company should make (Alternative 1) or buy (Alternative 2) the bottles
CSCI 4650 Numerical Analysis Assignment : CSCI 4650 Numerical Analysis Assignment Help and Solution, University of Colorado - Assessment Writing Service
Journalize the bond issuance : On the first day of the fiscal year, a company issues a $4,000,000, 8%, 10-year bond that pays semi-annual interest of $160,000. Journalize the bond issuance
What amount should be recognized as loss on finance lease : The entity recorded the right of use asset at P4,800,000 which included a purchase option of P100,000. What amount should be recognized as loss on finance lease
Prepare a statement of cash flows using direct method : Prepare a statement of cash flows using direct method for Caltrick Ltd for the year ended 30 June 2016. Comparatives are not required
Prepare journal entries to record the transactions : On January 1, 2022, Dymaxium Inc. a Canadian company, sold Alberta beef to a foreign company for FC$200,000, Prepare journal entries to record the transactions

Reviews

Write a Review

Programming Languages Questions & Answers

  Create a class called pizzaorder

Create a class called PizzaOrder that has the following members: toppingsOffered[] - a constant array of Strings representing the choice of low-price toppings, e.g., { "onions", "bell peppers", "olives", "pepperoni"... }. This member is public and..

  Create a script in knoppix 4.02

I want the Linux to find the user specified name or Esther asking is this your name or another.

  Write program using to take input two integers by while loop

Write a program which uses while loops to perform following steps: Prompts user to input two integers: firstNum and secondNum. (firstNum must be less than secondNum).

  Create constructor by allotting value to gpa attribute

We have provided the super call, which does some of the work of constructor. Your code must complete constructor by allotting value of g to gpa attribute.

  Program to return the array index having largest savings

Write down function also called from main module - this function will find out and return array index containing the largest savings.

  Create class to include fields for length-width in inches

Create a class name Tape that includes fields for length and width in inches and properties for each field. Also include a ToString () method that returns a string constructed from the return value

  Create a class that simulates an alarm clock

Store time in hours, minutes, and seconds. Note if time is AM or PM. (Hint: You should have separate private members for the alarm and the clock. Do not forget to have a character variable representing AM or PM.)

  Write the pseudo code using a loop function

Write the pseudo code using a loop function to fulfill the requirements. If you use outside resources you must cite your work in IEEE format.

  Write program to prints question do you want to continue

Write a program which prints question"do you want to continue?"and reads user input. if user input is"y", "yes", "ok", "sure", or "why not?" , print out "ok".

  Correspondence between a grammar and a type

Identity the correspondence between a grammar and a type and identify the correspondence between a grammar and a recursive-descent parser.

  Create a project in visual c++ add numberlist.h

Create a project in Visual C++, Add NumberList.h and NumberList.cpp files to your project. These are included in the zip file with this document. The files are code fr..

  Import the data in excel to the table in access.

There are 6 tables in Access (Contacts, Customer, Orders, Products, SalesRep and Territories) and I also created 6 sheets in Excel for the data for table

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd