add and fix some

This commit is contained in:
2025-11-10 17:24:53 +09:00
parent 49355f8f54
commit 12e68927ad
12 changed files with 595 additions and 10 deletions

View File

@@ -29,18 +29,75 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3bed3d44",
"id": "e7357276",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"id": "1113de3c",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"id": "3bed3d44",
"metadata": {},
"source": [
"## Gauss Elimination\n",
"\n",
"## Gauss-Jordan Elimination"
]
},
{
"cell_type": "markdown",
"id": "a5239ed9",
"metadata": {},
"outputs": [],
"source": []
"source": [
"## LU decomposition\n",
"\n",
"$$A = LU$$\n",
"\n",
"$$Ax = b \\Rightarrow LUx = b \\Rightarrow \\\\\n",
"L^{-1}LUx = L^{-1}b \n",
"$$\n",
"\n",
"At that time, $Ux = c$ is easy to compute.\n",
"and compute $Lc = b$ to easily get $x$.\n",
"\n",
"\n",
"Various LUdcmps\n",
"* Doolittle $L_{ii} = 1$\n",
"* Crout $U_{ii} = 1$\n",
"* Cholesky $L_{ii} = U_{ii}$, which is appropriate for symmetric, positive-definite matrix\n",
"\n",
"### Crout Implementation\n",
"\n",
"$$\\begin{bmatrix}\n",
"a_{11} & a_{12} & \\cdots a_{1n} \\\\\n",
"a_{21} & a_{22} & \\cdots a_{2n} \\\\\n",
"\\vdots & \\vdots & \\ddots \\vdots \\\\\n",
"a_{n1} & a_{n2} & \\cdots a_{nn}\n",
"\\end{bmatrix} = \\begin{bmatrix}\n",
"l_{11} & 0 & \\cdots 0 \\\\\n",
"l_{21} & l_{22} & \\cdots 0 \\\\\n",
"\\vdots & \\vdots & \\ddots \\vdots \\\\\n",
"l_{n1} & l_{n2} & \\cdots l_{nn}\n",
"\\end{bmatrix}\\begin{bmatrix}\n",
"1 & u_{12} & \\cdots u_{1n} \\\\\n",
"0 & 1 & \\cdots u_{2n} \\\\\n",
"\\vdots & \\vdots & \\ddots \\vdots \\\\\n",
"0 & 0 & \\cdots 1\n",
"\\end{bmatrix}$$\n",
"\n",
"$$\\begin{align*}\n",
"l_{i1} &= a_{i1} & (i = 1, 2, \\cdots, n) \\\\\n",
"u_{1j} &= a_{1j} / l_{11} & (j = 2, 3, \\cdots, n) \\\\\n",
"l_{ij} &= a_{ij} - \\sum_{k=1}^{j-1} {l_{ik} u_{kj}} & (j \\leq i, i = 2,3,\\cdots, n) \\\\\n",
"u_{ij} &= (a_{ij} - \\sum_{k=1}^{i-1} {l_{ik} u_{kj}}) / l_{ii} & (j > i, j = 3,4,\\cdots, n)\n",
"\\end{align*}$$"
]
},
{
"cell_type": "markdown",
@@ -111,6 +168,14 @@
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "733012d2",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {