Question:

Engineering Computation

by  |  earlier

0 LIKES UnLike

How to write a C program to read a linear system of equations, then how to evaluate it by using LU-Decomposition method and show the result. By using this program, how to solve the system of equation

4x1 2x2-x3=12

x1 x2 x3=6

2x1-x2-x3=3

 Tags:

   Report

1 ANSWERS


  1. Let's see. You want the readers to teach you C programming, write a program and help you understand LU? Why not do it yourself? Here are some hints to help you understand the math:

    Put your equations above in the form A x = b, where

    x-transpose = [ x1 x2 x3] and

    b-transpose = [12 6 3]

    The LU method decomposes A into LU where L is a lower triangular

    matrix and U is an upper triangular matrix.

    Let y = U x.

    Then A x = b can be written as L U x = b, or L y = b.

    Solve L y = b by forward substitution. Then using Ux = y, solve for x by a backward substitution.

    Lookup a book called Numerical Recipes in C.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.