Find Jobs
Hire Freelancers

solving linear systems

$30-5000 USD

Completed
Posted over 21 years ago

$30-5000 USD

Paid on delivery
The complete details of the program are given below. The bidder must be very positive that he/she will be able to complete the project, with all details asked for in the project working. This simply means, before bidding, please make sure you understand and are able to complete all the details, the program asks for. ## Deliverables You are to solve several systems of linear equations, to calculate the errors in your computed solutions, and to calculate the residuals. Each linear system has n equations in the n unknowns xi, i = 0, 1, ..., n-1, and may be written a00 x0 + a01 x1 + ... + a0,n-1 xn-1 = b0 a10 x0 + a11 x1 + ... + a1,n-1 xn-1 = b1 . . . an-1,0 x0 + an-1,1 x1+ ... + an-1,n-1 xn-1 = bn-1 For each value of i and j, the coefficient aij = 1/(i + j + 3) must be calculated in your program. Each right hand side, bi, must be calculated so that the components of the true solution are x0 = x1 = ... = xn-1 = 1; that is, you must compute the right hand side values as follows: bi = (ai0 + ai1 + ... + ai,n-1) for each value i = 0, 1, ... , n - 1. [You must calculate the coefficients aij and the right hand sides bi in "for loops".] For linear systems of equations of size n = 4, 7, 10, 13 in turn: a) Declare arrays for the coefficients and right hand sides, and calculate the coefficients and right hand sides. b) Solve the linear system using the NAG function f04arc, and print the approximate solution values and the error. (Recall, the error is the difference between the true solution, which you know, and the approximate solution, which you have calculated.) c) Compute the residual for each equation and print it. Note: For each value m = 0, 1, ... , n - 1, the residual for the mth equation is rm = (am0 x0 + am1 x1 + ... + am,n-1 xn-1 ) - bm Hint 1: To put the f04arc example program f04arce.e into your filestore type nagexample f04arc The NAG example program f04arce.e reads the values of the coefficients aij and the right-hand sides bi from a data file. For this assignment, you must modify the example program so as to calculate the values of the coefficients aij and right-hand sides bi inside your program. Then, you must compile, link and execute your program to determine the solution. There is no data file for this assignment. Hint 2: When it is called, NAG the function f04arc overwrites the values in the array arguments containing the coefficients aij and the right hand sides bi. Since you will need the values in these arrays to calculate the residuals, in your program you must declare additional arrays and make copies of the coefficients and the right hand sides in these arrays before you call the function f04arc. Hint 3: We expect that each solution component xi computed by the function f04arc to be close to the true value xi = 1, so you should output the solution components in the C language fixed point format, printing enough digits to represent a double precision number. We expect the errors and the residuals to be small in magnitude relative to one, so you should print them in the C language floating point with exponent format. To complete the assignment, you must submit: 1. A printout of the program that you used to compute the approximate solutions, the errors and the residuals. 2. The output containing the approximate solutions, the errors and the residuals. 3. A brief report outlining the problem and what you did. It should discuss the magnitudes of the errors and the residuals, their behavior as n increases, and the probable cause of their sizes. ## Platform MUST BE DONE ON UNIX. C language floating point with exponent format ## Deadline information please read details of the specifications and make sure you are capable of doing them before bidding.
Project ID: 2873847

About the project

5 proposals
Remote project
Active 22 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$25.50 USD in 14 days
4.6 (66 reviews)
5.1
5.1
5 freelancers are bidding on average $53 USD for this job
User Avatar
See private message.
$127.50 USD in 14 days
5.0 (620 reviews)
7.7
7.7
User Avatar
See private message.
$29.75 USD in 14 days
4.5 (18 reviews)
2.4
2.4
User Avatar
See private message.
$21.25 USD in 14 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$59.50 USD in 14 days
0.0 (1 review)
0.0
0.0

About the client

Flag of UNITED STATES
United States
5.0
11
Member since Apr 20, 2002

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.