Create a function which runs newtons method

Assignment Help Programming Languages
Reference no: EM133168953

CSCI 4650 Numerical Analysis - University of Colorado

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: EM133168953

Questions Cloud

Determine the profit margin per sale of dress : LC Waikiki is introducing a new range of Spring/Summer collections. Determine the profit margin per sale of dress
Prepare the journal entries to record the transactions : Prepare the journal entries to record the transactions of Gum Ltd up to and including that which took place on 16 December 2017. (Show all workings.)
How states are using the tanf funds : How states are using the TANF funds and what people are doing to survive when they only have $2 per day of cash
What are georgio separately stated items for the year : Assume the §179 property placed in service limitation does not apply. What are Georgio separately stated items for the year
Create a function which runs newtons method : Create a function which runs Newton's method for k steps on the previous system of equations. Include a table of the approximate solutions
Calculate the depreciation on the building : Calculate the depreciation on the building and building addition for 2018 and 2019 assuming that the addition did not change the life or residual value
Find the fixed point iteration produced : 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
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

Reviews

Write a Review

Programming Languages Questions & Answers

  Discuss the current business scenario of having a budget

Discuss the current business scenario of having a budget of $5000 to target. Can you envision a better strategy if the objective is to maximize the total profit from the campaign? Consider again what additional information you might want that shou..

  Create a math program to practice math skills

Creating a Math Program to practice Math Skills. Ask the user what type of math problem they would like (addition, subtraction, multiplication, division, modulas).

  Design a superclass called shape that contains one function

Area of Shapes: Design a superclass called Shape that contains one function-getArea(). The getArea() function in the Shape class will simply return 0, you will derive from it in your subclasses mentioned below.

  Create program which tests each member of resistor class

Create program which tests each member of Resistor class to ensure that they work properly. Complete the following Tasks: Create main function and instantiate three Resistor Class objects: Resistor1, Resistor2 and Resistor3.

  Find determinant using cramers rule

Write a MPI program where each rank sends a message to its right neighbour - Find Determinant using Cramer's Rule and Find the Deadlock

  Project - converting pounds to kilograms calculator

Create classes and objects that access variables and modifier keywords. Develop methods using parameters and return values

  Your english instructor realizing you are a programmer asks

your english instructor realizing you are a programmer asks you to write a grade book program for his class to help

  Write a program to print the average of the grades

In this example, you use an array called scores, and we pass the array to a function called printScores(). This function loops through the array elements.

  Write a recursive boolean function named ismember

Write a recursive Boolean function named isMember . The function should accept two arguments: an array and a value. The function should return true if the value is found in the array, or false if the value is not found in the array. Demonstrate t..

  Create a database with a table called "tblprofiles"

Use a RegularExpressionValidator control on the start page that displays an error message if the user does not enter a properly formatted social security number.

  Design a schema for the below question

Is it possible to design a scheme that provides confidentiality for sending the message from Alice to Bob? If so, show how with a block diagram for Alice and Bob.

  Why you think additional personnel are generally required

Why you think additional personnel are generally required during the later stages of systems implementation? In addition, how do training activities differ between end users and system operators? Why?

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