Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Solving a Linear System with LU Decomposition | Linear Algebra Foundations
Mathematics for Data Science with Python
セクション 4.  10
single

single

bookChallenge: Solving a Linear System with LU Decomposition

メニューを表示するにはスワイプしてください

タスク

スワイプしてコーディングを開始

A student is analyzing a simple network where the flow balance can be represented as a system of linear equations:

Ax=bA \vec{x} = \vec{b}

Where:

  • AA is a 3×33 \times 3 coefficient matrix;
  • b\vec{b} is a vector of known quantities;
  • x\vec{x} is the vector of unknowns to be determined.

Your goal is to solve for x\vec{x} by performing an LU decomposition of matrix AA, followed by forward and backward substitution. Finally, you'll compare your computed result with NumPy’s built-in solver to confirm correctness.

Your task:

  1. Complete the Python code to:
    • Perform LU decomposition by filling in the missing expressions for LL and UU.
    • Implement forward substitution to solve Ly=bL\vec{y} = \vec{b}.
    • Implement backward substitution to solve Ux=yU\vec{x} = \vec{y}.
  2. Compare your result with np.linalg.solve() to verify accuracy.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 4.  10
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt