{"id":4769,"date":"2025-03-31T13:58:05","date_gmt":"2025-03-31T04:58:05","guid":{"rendered":"https:\/\/www.ktech.biz\/jp\/?p=4769"},"modified":"2025-05-26T09:42:05","modified_gmt":"2025-05-26T00:42:05","slug":"8-nleq","status":"publish","type":"post","link":"https:\/\/www.ktech.biz\/jp\/tutorial\/8-nleq\/","title":{"rendered":"8. \u975e\u7dda\u5f62\u9023\u7acb\u65b9\u7a0b\u5f0f"},"content":{"rendered":"\n<h3>8.1 \u6982\u8981<\/h3>\n<p>\u4e00\u822c\u306e \\(n\\) \u5909\u6570\u975e\u7dda\u5f62\u95a2\u6570 \\(f_i()\\) \u306e \\(n\\) \u9023\u7acb\u65b9\u7a0b\u5f0f\u306e\u5b9f\u6570\u306e\u30bc\u30ed\u70b9\u3092\u6c42\u3081\u308b\u554f\u984c\u3092\u8003\u3048\u307e\u3059.<br \/>\n\\[<br \/>\n\\begin{gather}<br \/>\n&#038; f_1(x_1, x_2, \\dots, x_n) = 0 \\\\<br \/>\n&#038; f_2(x_1, x_2, \\dots, x_n) = 0 \\\\<br \/>\n&#038; \\vdots \\\\<br \/>\n&#038; f_n(x_1, x_2, \\dots, x_n) = 0 \\\\<br \/>\n\\end{gather}<br \/>\n\\]\n\\(x_1, x_2, \\dots, x_n\\) \u3092\u8981\u7d20\u3068\u3059\u308b\u5217\u30d9\u30af\u30c8\u30eb\u3092 \\(\\boldsymbol{x}\\) \u3068\u8868\u3059\u3053\u3068\u306b\u3057, \u540c\u69d8\u306b\u95a2\u6570\u306e\u5217\u30d9\u30af\u30c8\u30eb\u3092 \\(\\boldsymbol{f}\\) \u3068\u8868\u3059\u3053\u3068\u306b\u3059\u308c\u3070, \u3053\u308c\u3089\u306f\u307e\u3068\u3081\u3066\u6b21\u306e\u3088\u3046\u306b\u30d9\u30af\u30c8\u30eb\u8868\u73fe\u3067\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059.<br \/>\n\\[<br \/>\n\\boldsymbol{f(x)} = 0<br \/>\n\\]\n<h3>8.2 \u975e\u7dda\u5f62\u9023\u7acb\u65b9\u7a0b\u5f0f\u306e\u89e3\u6cd5<\/h3>\n<h4>8.2.1 \u30cb\u30e5\u30fc\u30c8\u30f3\u6cd5<\/h4>\n<p>1 \u5909\u6570\u95a2\u6570\u306b\u5bfe\u3059\u308b\u30cb\u30e5\u30fc\u30c8\u30f3\u6cd5\u3092 \\(n\\) \u5909\u6570\u95a2\u6570\u306e (\\(n\\) \u5143\u9023\u7acb\u65b9\u7a0b\u5f0f\u306b\u62e1\u5f35\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059.<\/p>\n<p>\\(\\boldsymbol{J(x)}\\) \u306f\u30e4\u30b3\u30d3\u884c\u5217\u3092\u8868\u3059\u3082\u306e\u3068\u3057\u307e\u3059.<br \/>\n\\[<br \/>\n\\boldsymbol{J(x)} =<br \/>\n\\begin{pmatrix}<br \/>\n{\\partial}f_1\/{\\partial}x_1 &#038; {\\partial}f_1\/{\\partial}x_2 &#038; \\cdots &#038; {\\partial}f_1\/{\\partial}x_n \\\\<br \/>\n{\\partial}f_2\/{\\partial}x_1 &#038; {\\partial}f_2\/{\\partial}x_2 &#038; \\cdots &#038; {\\partial}f_2\/{\\partial}x_n \\\\<br \/>\n\\vdots &#038; \\vdots &#038; \\ddots &#038; \\vdots \\\\<br \/>\n{\\partial}f_n\/{\\partial}x_1 &#038; {\\partial}f_n\/{\\partial}x_2 &#038; \\cdots &#038; {\\partial}f_n\/{\\partial}x_n \\\\<br \/>\n\\end{pmatrix}<br \/>\n\\]\n\\(\\boldsymbol{f(x)}\\) \u3092\u30c6\u30a4\u30e9\u30fc\u5c55\u958b\u3059\u308b\u3068\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059.<br \/>\n\\[<br \/>\n\\boldsymbol{f(x_{k+1})} = \\boldsymbol{f(x_k + d_k)} = \\boldsymbol{f(x_k)} + \\boldsymbol{J(x)d_k} + \\dots<br \/>\n\\]\n2 \u6b21\u4ee5\u4e0a\u306e\u9805\u3092\u7121\u8996\u3059\u308b\u3068\u30cb\u30e5\u30fc\u30c8\u30f3\u6cd5\u306e\u53cd\u5fa9\u5f0f\u304c\u5f97\u3089\u308c\u307e\u3059.<br \/>\n\\[<br \/>\n\\begin{align}<br \/>\n&#038; \\boldsymbol{d_k} = -\\boldsymbol{J(x_k)^{-1}}\\boldsymbol{f(x_k)} \\\\<br \/>\n&#038; \\boldsymbol{x_{k+1}} = \\boldsymbol{x_k} + \\boldsymbol{d_k} \\\\<br \/>\n\\end{align}<br \/>\n\\]\n\\(||\\boldsymbol{d_k}||\\) \u304c\u5341\u5206\u306b\u5c0f\u3055\u304f\u306a\u3063\u305f\u3089\u7d42\u4e86\u3057\u307e\u3059.<\/p>\n<p>\u5b9f\u969b\u306b\u8a08\u7b97\u3059\u308b\u3068\u304d\u306b\u306f\u30e4\u30b3\u30d3\u884c\u5217\u306e\u9006\u884c\u5217\u3092\u6c42\u3081\u308b\u3053\u3068\u306f\u305b\u305a\u306b\u6b21\u306e\u9023\u7acb\u4e00\u6b21\u65b9\u7a0b\u5f0f\u3092\u89e3\u304d\u307e\u3059.<br \/>\n\\[<br \/>\n\\boldsymbol{J(x_k)}\\boldsymbol{d_k} = -\\boldsymbol{f(x_k)}<br \/>\n\\]\n1 \u5909\u6570\u306e\u3068\u304d\u3068\u540c\u69d8\u306b, \u6c42\u3081\u308b\u89e3\u306b\u5341\u5206\u306b\u8fd1\u3044\u521d\u671f\u5024\u3092\u4e0e\u3048\u306a\u3044\u3068\u53ce\u675f\u3057\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059.<\/p>\n<h4>8.2.2 \u6e96\u30cb\u30e5\u30fc\u30c8\u30f3\u6cd5<\/h4>\n<p>\u30e4\u30b3\u30d3\u884c\u5217\u306e\u8a08\u7b97\u304c\u96e3\u3057\u304b\u3063\u305f\u308a\u6642\u9593\u304c\u304b\u304b\u3063\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u305f\u3081, \u3053\u308c\u3092\u4ed6\u306e\u3082\u306e\u3067\u8fd1\u4f3c\u3059\u308b\u65b9\u6cd5\u3067\u3059.<\/p>\n<p>\u4ee3\u8868\u7684\u306a\u3082\u306e\u3068\u3057\u3066\u306f\u6b21\u306e\u30d6\u30ed\u30a4\u30c7\u30f3\u6cd5\u304c\u3042\u308a\u307e\u3059.<br \/>\n\\[<br \/>\n\\boldsymbol{B_{k+1}} = \\boldsymbol{B_k} + (\\boldsymbol{y} &#8211; \\boldsymbol{B_ks})\\boldsymbol{s^T}\/(\\boldsymbol{s^Ts})<br \/>\n\\]\n\u3053\u3053\u3067, \\(\\boldsymbol{y} = \\boldsymbol{f(x_{k+1})} &#8211; \\boldsymbol{f(x_k)}, \\boldsymbol{s} = \\boldsymbol{x_{k+1}} &#8211; \\boldsymbol{x_k}\\) \u3067\u3059.<\/p>\n<p>\u6bce\u56de\u30e4\u30b3\u30d3\u884c\u5217\u3092\u518d\u8a08\u7b97\u3059\u308b\u4ee3\u308f\u308a\u306b, \u6f38\u5316\u5f0f\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u3057\u305f \\(\\boldsymbol{B_k}\\) \u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u8a08\u7b97\u52b9\u7387\u306e\u5411\u4e0a\u3092\u56f3\u308b\u3082\u306e\u3067\u3059.<\/p>\n<h4>8.2.2 \u30d1\u30a6\u30a8\u30eb\u306e\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u6cd5<\/h4>\n<p>\u6e96\u30cb\u30e5\u30fc\u30c8\u30f3\u6cd5\u3068\u6700\u6025\u964d\u4e0b\u6cd5\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u65b9\u6cd5\u3067\u3059.<br \/>\n\\[<br \/>\n(\\boldsymbol{J(x_k)^TJ(x_k)} + \\gamma_k\\boldsymbol{I})\\boldsymbol{d_k} = -\\boldsymbol{J(x_k)^Tf(x_k)}<br \/>\n\\]\n\u30d1\u30e9\u30e1\u30fc\u30bf \\(\\gamma_k = 0\\) \u3067\u3042\u308c\u3070\u6e96\u30cb\u30e5\u30fc\u30c8\u30f3\u6cd5\u306b\u306a\u308a\u307e\u3059. \u307e\u305f, \\(\\gamma_k\\) \u306e\u5024\u304c\u5927\u304d\u304f\u306a\u308b\u3068\u6700\u6025\u964d\u4e0b\u6cd5\u306b\u8fd1\u3065\u3044\u3066\u3044\u304d\u307e\u3059.<\/p>\n<h3>8.3 XLPack \u3092\u4f7f\u3063\u305f\u975e\u7dda\u5f62\u9023\u7acb\u65b9\u7a0b\u5f0f\u306e\u89e3\u304d\u65b9<\/h3>\n<p>\u975e\u7dda\u5f62\u9023\u7acb\u65b9\u7a0b\u5f0f\u3092\u89e3\u304f\u305f\u3081\u306b\u306f, \u30d1\u30a6\u30a8\u30eb\u306e\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u6cd5\u306b\u3088\u308b VBA \u30b5\u30d6\u30eb\u30fc\u30c1\u30f3 <strong>Hybrd1<\/strong> \u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059. \u3053\u308c\u306f\u5fae\u5206 (\u30e4\u30b3\u30d3\u884c\u5217) \u3092\u5dee\u5206\u8fd1\u4f3c\u3067\u8a08\u7b97\u3057, \u30e6\u30fc\u30b6\u30fc\u306b\u3088\u308b\u5fae\u5206\u8a08\u7b97\u3092\u4e0d\u8981\u306b\u3057\u305f\u30b5\u30d6\u30eb\u30fc\u30c1\u30f3\u3067\u3059. Hybrd1 \u306f XLPack \u30bd\u30eb\u30d0\u30fc\u304b\u3089\u4f7f\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059.<\/p>\n<p>\u975e\u7dda\u5f62\u9023\u7acb\u65b9\u7a0b\u5f0f\u3067\u306f\u5b9f\u6570\u89e3\u304c\u5b58\u5728\u3057\u306a\u3044\u3053\u3068\u304c\u3042\u308a, \u305d\u306e\u5834\u5408\u5931\u6557\u3057\u307e\u3059. \u307e\u305f, \u8907\u6570\u306e\u5b9f\u6570\u89e3\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u306f, \u3069\u306e\u89e3\u304c\u6c42\u3081\u3089\u308c\u308b\u304b\u306f\u521d\u671f\u5024\u306b\u4f9d\u5b58\u3057\u307e\u3059.<\/p>\n<h5>\u4f8b\u984c<\/h5>\n<p>\u6b21\u306e 2 \u5909\u6570\u975e\u7dda\u5f62\u9023\u7acb\u65b9\u7a0b\u5f0f\u3092\u89e3\u304f.<br \/>\n\\[<br \/>\n\\begin{align}<br \/>\n&#038; f_1(x_1, x_2) = 4x_1^2 + x_2^2 &#8211; 16 = 0 \\\\<br \/>\n&#038; f_2(x_1, x_2) = x_1^2 + x_2^2 &#8211; 9 = 0 \\\\<br \/>\n\\end{align}<br \/>\n\\]\n\u30d7\u30ed\u30c3\u30c8\u3057\u3066\u95a2\u6570\u306e\u5f62\u3092\u898b\u308b\u3068\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2025\/03\/Ex8D_1.png\" alt=\"\" width=\"459\" height=\"450\" class=\"aligncenter size-full wp-image-4888\" srcset=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2025\/03\/Ex8D_1.png 459w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2025\/03\/Ex8D_1-300x294.png 300w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/p>\n<p>\u3053\u308c\u3088\u308a, (0, 0) \u3092\u4e2d\u5fc3\u306b\u5bfe\u79f0\u306b 4 \u3064\u306e\u5b9f\u6570\u89e3\u304c\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059.<\/p>\n<h4>8.3.1 VBA \u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305f\u89e3\u304d\u65b9 (1)<\/h4>\n<p><strong>Hybrd1<\/strong> \u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u4f8b\u3092\u793a\u3057\u307e\u3059.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-vb\" data-lang=\"VBA\"><code>Sub F(N As Long, X() As Double, Fvec() As Double, IFlag As Long)\r\n    Fvec(0) = 4 * X(0) ^ 2 + X(1) ^ 2 - 16\r\n    Fvec(1) = X(0) ^ 2 + X(1) ^ 2 - 9\r\nEnd Sub\r\n\r\nSub Start()\r\n    Const NMax = 10\r\n    Dim N As Long, X(NMax) As Double, Fvec(NMax) As Double, XTol As Double\r\n    Dim Info As Long, I As Long\r\n    '--- Initialization\r\n    N = 2\r\n    XTol = 0.000000000001 '1e-12\r\n    For I = 0 To 4\r\n        '--- Input data\r\n        X(0) = Cells(6 + I, 1): X(1) = Cells(6 + I, 2)\r\n        '--- Compute zeros of system of equations\r\n        Call Hybrd1(AddressOf F, N, X(), Fvec(), XTol, Info)\r\n        '--- Output zeros\r\n        Cells(6 + I, 3) = X(0): Cells(6 + I, 4) = X(1): Cells(6 + I, 5) = Info\r\n    Next\r\nEnd Sub<\/code><\/pre>\n<\/div>\n<p>\u76ee\u7684\u95a2\u6570\u3092\u5916\u90e8\u30b5\u30d6\u30eb\u30fc\u30c1\u30f3\u3068\u3057\u3066\u7528\u610f\u3057, \u521d\u671f\u5024\u3068\u8981\u6c42\u7cbe\u5ea6\u3092\u6307\u5b9a\u3057\u3066 <strong>Hybrd1<\/strong> \u3092\u547c\u3073\u51fa\u3057\u307e\u3059. <strong>Hybrd1<\/strong> \u306f, \u521d\u671f\u5024\u3068\u3057\u3066\u4e0e\u3048\u3089\u308c\u305f\u8fd1\u4f3c\u89e3\u3092\u51fa\u767a\u70b9\u306b\u53cd\u5fa9\u8a08\u7b97\u3092\u884c\u3044, \u305d\u306e\u8fd1\u508d\u306e\u30bc\u30ed\u70b9\u3092\u6c42\u3081\u307e\u3059. \u3053\u3053\u3067\u306f, 5 \u3064\u306e\u7570\u306a\u308b\u521d\u671f\u5024\u3092\u4e0e\u3048\u305f\u3068\u304d\u306b\u3069\u306e\u3088\u3046\u306a\u89e3\u304c\u5f97\u3089\u308c\u308b\u304b\u3092\u898b\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u3057\u3066\u3044\u307e\u3059.<\/p>\n<p>\u307e\u305a, 4 \u3064\u3042\u308b\u30bc\u30ed\u70b9\u305d\u308c\u305e\u308c\u3092\u76ee\u6307\u3057\u3066 4 \u3064\u306e\u521d\u671f\u5024 (1, 1),  (-1, 1), (1, -1), (-1, -1) \u3092\u8a66\u3057\u3066\u307f\u307e\u3059. \u3055\u3089\u306b, \u4e2d\u5fc3\u306b\u3042\u308b (0, 0) \u3092\u521d\u671f\u5024\u306b\u3059\u308b\u3068\u3069\u3046\u306a\u308b\u304b\u898b\u3066\u307f\u307e\u3059.<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068, \u6b21\u306e\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3057\u305f.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8_1.png\" alt=\"\" width=\"979\" height=\"786\" class=\"aligncenter size-full wp-image-4177\" srcset=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8_1.png 979w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8_1-300x241.png 300w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8_1-768x617.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n<p>\u305d\u308c\u305e\u308c, \u8fd1\u304f\u306e\u89e3\u306b\u53ce\u675f\u3057\u3066\u3044\u307e\u3059\u304c, (0, 0) \u3092\u51fa\u767a\u70b9\u3068\u3057\u305f\u3068\u304d\u306b\u306f\u5de6\u4e0a\u306e\u89e3\u306b\u53ce\u675f\u3057\u307e\u3057\u305f.<\/p>\n<h4>8.3.2 VBA \u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305f\u89e3\u304d\u65b9 (2)<\/h4>\n<p>\u30ea\u30d0\u30fc\u30b9\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u7248 (RCI) \u306e <strong>Hybrd1_r<\/strong> \u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u4f8b\u3092\u793a\u3057\u307e\u3059.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-vb\" data-lang=\"VBA\"><code>Sub Start()\r\n    Const NMax = 10\r\n    Dim N As Long, X(NMax) As Double, Fvec(NMax) As Double, XTol As Double\r\n    Dim Info As Long, I As Long\r\n    Dim XX(NMax - 1) As Double, YY(NMax - 1) As Double, IRev As Long\r\n    '--- Initialization\r\n    N = 2\r\n    XTol = 0.000000000001 '1e-12\r\n    For I = 0 To 4\r\n        '--- Input data\r\n        X(0) = Cells(6 + I, 1): X(1) = Cells(6 + I, 2)\r\n        '--- Compute zeros of system of equations\r\n        IRev = 0\r\n        Do\r\n            Call Hybrd1_r(N, X(), Fvec(), XTol, Info, XX(), YY(), IRev)\r\n            If IRev = 1 Or IRev = 2 Then\r\n                YY(0) = 4 * XX(0) ^ 2 + XX(1) ^ 2 - 16\r\n                YY(1) = XX(0) ^ 2 + XX(1) ^ 2 - 9\r\n            End If\r\n        Loop While IRev <> 0\r\n        '--- Output zeros\r\n        Cells(6 + I, 3) = X(0): Cells(6 + I, 4) = X(1): Cells(6 + I, 5) = Info\r\n    Next\r\nEnd Sub<\/code><\/pre>\n<\/div>\n<p>\u76ee\u7684\u95a2\u6570\u3092\u5916\u90e8\u95a2\u6570\u3068\u3057\u3066\u4e0e\u3048\u308b\u306e\u3067\u306f\u306a\u304f, IRev = 1 \u307e\u305f\u306f 2 \u306e\u3068\u304d\u306b XX() \u306e\u5024\u3092\u4f7f\u3063\u3066\u95a2\u6570\u5024\u3092\u8a08\u7b97\u3057 YY() \u306b\u5165\u308c\u3066\u518d\u5ea6 <strong>Hybrd1_r<\/strong> \u3092\u547c\u3073\u51fa\u3057\u307e\u3059. RCI \u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f <a href=\"https:\/\/www.ktech.biz\/jp\/manual\/xlpack-5-revcom\/\">\u3053\u3061\u3089<\/a> \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044.<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u4e0a\u3068\u540c\u3058\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3059.<\/p>\n<h4>8.3.3 \u30bd\u30eb\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u305f\u89e3\u304d\u65b9<\/h4>\n<p>XLPack\u30bd\u30eb\u30d0\u30fc\u30a2\u30c9\u30a4\u30f3\u306e\u300c\u975e\u7dda\u5f62\u9023\u7acb\u65b9\u7a0b\u5f0f\u300d\u3092\u4f7f\u3063\u3066\u89e3\u304f\u3053\u3068\u3082\u3067\u304d\u307e\u3059. B9 \u304a\u3088\u3073 C9\u30bb\u30eb\u306b\u6570\u5f0f (=4*B8^2+C8^2-16 \u304a\u3088\u3073 =B8^2+C8^2-9) \u304c\u5165\u529b\u3055\u308c\u3066\u3044\u307e\u3059.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8S_6.png\" alt=\"\" width=\"979\" height=\"786\" class=\"aligncenter size-full wp-image-4171\" srcset=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8S_6.png 979w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8S_6-300x241.png 300w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8S_6-768x617.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n<p>\u30bd\u30eb\u30d0\u30fc\u306b\u3064\u3044\u3066\u306f <a href=\"https:\/\/www.ktech.biz\/jp\/document\/xlpack-solver-nleq\">\u3053\u3061\u3089<\/a> \u3082\u53c2\u7167\u304f\u3060\u3055\u3044.<\/p>\n<h4>8.3.4 VBA \u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305f\u89e3\u304d\u65b9 (3)<\/h4>\n<h5>\u4f8b\u984c 2<\/h5>\n<p>\u4f8b\u984c 1 \u306e\u65b9\u7a0b\u5f0f\u3092\u6b21\u306e\u3088\u3046\u306b\u5c11\u3057\u5909\u5f62\u3057\u3066\u307f\u307e\u3059.<br \/>\n\\[<br \/>\n\\begin{align}<br \/>\n&#038; f_1(x_1, x_2) = 4x_1^2 + (x_2 &#8211; 2)^2 &#8211; 16 = 0 \\\\<br \/>\n&#038; f_2(x_1, x_2) = x_1^2 + x_2^2 &#8211; 9 = 0 \\\\<br \/>\n\\end{align}<br \/>\n\\]\n\u95a2\u6570\u306e\u5f62\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2025\/03\/Ex8D_2.png\" alt=\"\" width=\"459\" height=\"505\" class=\"aligncenter size-full wp-image-4889\" srcset=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2025\/03\/Ex8D_2.png 459w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2025\/03\/Ex8D_2-273x300.png 273w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/p>\n<p>\u56f3\u306e\u3088\u3046\u306b\u89e3\u304c 2 \u3064\u3057\u304b\u306a\u304f\u306a\u308a\u307e\u3057\u305f.<\/p>\n<p>\u4e0a\u306e\u4f8b\u984c\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u304a\u3044\u3066\u76ee\u7684\u95a2\u6570 Sub F() \u3092\u5c11\u3057\u5909\u66f4\u3057\u307e\u3059.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-vb\" data-lang=\"VBA\"><code>Sub F(N As Long, X() As Double, Fvec() As Double, IFlag As Long)\r\n    Fvec(0) = 4 * X(0) ^ 2 + (X(1) - 2) ^ 2 - 16\r\n    Fvec(1) = X(0) ^ 2 + X(1) ^ 2 - 9\r\nEnd Sub<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u3068\u540c\u3058\u521d\u671f\u5024\u3092\u4f7f\u3063\u3066\u8a08\u7b97\u3057\u3066\u307f\u308b\u3068, \u6b21\u306e\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3057\u305f.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8_2.png\" alt=\"\" width=\"979\" height=\"786\" class=\"aligncenter size-full wp-image-4176\" srcset=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8_2.png 979w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8_2-300x241.png 300w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex8_2-768x617.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n<p>(1, 1) \u3068 (-1, 1) \u304b\u3089\u51fa\u767a\u3057\u305f\u5834\u5408\u306b\u306f\u8fd1\u304f\u306e\u89e3\u306b\u53ce\u675f\u3057\u3066\u3044\u307e\u3059. \u3068\u3053\u308d\u304c, (1, -1) \u3068 (-1, -1) \u306e\u5834\u5408\u306b\u306f\u3080\u3057\u308d\u9060\u304f\u306e\u89e3\u306b\u53ce\u675f\u3057\u307e\u3057\u305f. \u307e\u305f, (0, 0) \u306e\u5834\u5408\u306b\u306f\u53ce\u675f\u305b\u305a\u89e3\u3092\u6c42\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f. \u521d\u671f\u5024\u304c\u89e3\u304b\u3089\u9060\u3059\u304e\u308b\u5834\u5408\u306b\u306f\u3046\u307e\u304f\u76ee\u7684\u306e\u89e3\u3092\u6c42\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059.<\/p>\n<p>\u8a08\u7b97\u304c\u5931\u6557\u3059\u308b\u5834\u5408\u306b\u306f, \u521d\u671f\u5024\u304c\u89e3\u304b\u3089\u9060\u3059\u304e\u306a\u3044\u304b, \u307e\u305f, \u65b9\u7a0b\u5f0f\u304c\u5b9f\u6570\u89e3\u3092\u6301\u3063\u3066\u3044\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u975e\u7dda\u5f62\u9023\u7acb\u65b9\u7a0b\u5f0f\u306e\u89e3\u6cd5\u3068XLPack\u3092\u4f7f\u3063\u305f\u89e3\u304d\u65b9<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-4769","post","type-post","status-publish","format-standard","hentry","category-tutorial"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts\/4769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/comments?post=4769"}],"version-history":[{"count":5,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts\/4769\/revisions"}],"predecessor-version":[{"id":5071,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts\/4769\/revisions\/5071"}],"wp:attachment":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/media?parent=4769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/categories?post=4769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/tags?post=4769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}