Implement a solver for the stiff system of differential


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

y' = -Ay,

y(0) = yo,

where A is a symmetric positive definite n x n matrix, y is a function from [0, ∞) to Rn, and yo 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* yO, 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

Request for Solution File

Ask an Expert for Answer!!
Engineering Mathematics: Implement a solver for the stiff system of differential
Reference No:- TGS02359814

Expected delivery within 24 Hours