Implement solver for stiff system of differential equations

Assignment Help C/C++ Programming
Reference no: EM13908797

In this problem set, you will implement a solver for the stiff system of differential equations

y' = -Ay,

y(0) = y0,

where A is a symmetric positive definite n x n matrix, y is a function from [0, ∞) to Rn, and y0 is a vector in Rn. You can choose one of the following two algorithms to implement.

Method 1. Solve the differential equation using the backward Euler method. Then, apply one step of Richardson extrapolation.

Method 2. Diagonalize the matrix A. Then, find an explicit formula for the solution. In C, your calling sequence should be void stiff_solve(double* a, int n, double* y0, double t, int m, double* y) Input arguments:

a - The n x n symmetric positive definite matrix of doubles A

n - The dimension n of the matrix A

y0 - An array of doubles of length n containing the initial value yo

t - The final time t

m - The number of steps used in backward Euler (the step size should be t/m). This argument should be ignored if you are using method 2.

Output arguments:

y - An array of doubles of length n containing the solution y(t) at time t

Attachment:- Assignment.rar

Reference no: EM13908797

Questions Cloud

Bonds would eliminate interest-rate risk of equity holders : As a newly hired CEO of the People Trust Co., the first you do is to study the firm’s balance sheet. You find that your firm has $100 million in three-year loans (total assets), $70 million in one-year deposits (total liabilities) and $30 million in ..
After evaluating null company manufacturing process : After evaluating Null Company's manufacturing process, management decides to establish standards of 3 hours of direct labor per unit of product and $ 15 per hour for the labor rate.
Issuing new common stock to raise investment funds : Issuing new common stock to raise investment funds is more expensive than using retained earnings as the funding source
Dividends are expected to grow at a constant rate : The Jackson–Timberlake Wardrobe Co. just paid a dividend of $1.20 per share on its stock. The dividends are expected to grow at a constant rate of 4 percent per year indefinitely. Investors require a return of 10 percent on the company's stock. What ..
Implement solver for stiff system of differential equations : Implement a solver for the stiff system of differential equations - Array of doubles of length n containing the initial value.
State of nature probability return : State of Nature Probability Return on A Return on B I 0.4 6% 11% II 0.2 9% 6% III 0.4 12% 15% The correlation between A and B is 0.35. The portfolio weight of A is 25%. The portfolio weight of B is 75%. 22.value: The expected return in percent for in..
Draw rate of product formation graph using acid phosphatase : In an acid phosphatase you have determined Ki to be 10.5 mu M for NaF, a non-competitive inhibitor. How much sodium fluoride is required to bring 65% inhibition of the Vmax?
What will be the level of accounts receivable : Harrelson Inc currently has $750,000 in accounts receivable and it's days sales outstanding (DSO) is 55 days. It wants to reduce its DSO to 35 days by pressuring more of its customers to pay their bills on time. If this policy is adopted the company'..
Sedona company set the following standard costs : Sedona Company set the following standard costs for one unit of its product for 2013.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a hexadecimal integer literal

Write a hexadecimal integer literal representing the value fifteen.

  Develop a program that displays random numbers

Using a timer to generate a random number, develop a program that displays random numbers between 1 and 47 for your state's lottery.

  Complete the 8 queens 2 dimensional array

Complete the 8 queens 2 dimensional array program with backtracking. please change the below program using backtracking  and please run before posting it . the program suppose to print 92 solution . amd also comment before each line to better unde..

  Create a function gcd

Create a function gcd(a, b) that receives two integers and returns the greatest common denominator of the two integers.

  Write a program which initialize an integer array

Write a program which performs the tasks - return the control to main( )and print the new array elements in main.

  Create a function in c++ that subtracts two vectors

Create a function in c++ that subtracts two vectors. The function returns a vector than can also be negative.

  Write a program that stimulates a bouncing ball

Write a program that stimulates a bouncing ball by computing its height in feet at each second as time passes on a simulated clock. At time zero, the ball begins at height zero.

  Cpp program display overtime or regular time pay calculation

Display overtime or regular time pay calculations. See the sample output. Implement object calculations by summarizing your employee objects and display the summary information in the example.

  Cost of carrying additional luggage

The application used to calculate the cost of carrying additional luggage results in erroneous amount, if the weight of the luggage is a fractional number. Help the development team modify the code snippet so that the cost of carrying additional l..

  To overload a member function of the base class

To overload a member function of the base class A: the name of the function and the formal parameter list of the corresponding function in the derived class must be the same. B: the name of the function must be different

  Redesign the ip network

Suppose you work for a company that has changed internet service providers and needs to redesign the IP network. From your new ISP, you have leased 200.200.200.0/24.

  Write a program with two functions- main and swap

Write a program with two functions: main and swap. The main function will read two integer numbers.

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