拉格朗日乘数法示例3
几何画板及绘图内容加载中,请稍等……
该示例演示了拉格朗日乘数法在优化问题中的应用。核心数学概念包括:拉格朗日乘数法、函数极值、约束条件。使用了Point、LeftSide、Simplify、UnitVector等GeoGebra命令进行构造。适合大学数学课程中的优化问题教学。
GeoGebra 命令及参数
Point(Cu_g) → BLeftSide(Cu_g) → gSimplify(Derivative[g, x, 1]) → gx'Simplify(Derivative[g, y, 1]) → gy'UnitVector(Vector[B, Dg]) → u_gSimplify(Derivative[f, x, 1]) → fx'Simplify(Derivative[f, y, 1]) → fy'UnitVector(Vector[B, Df]) → u_fAngle(u_f, u_g) → αLaTeX(f, true) → text8aLaTeX(Cu_g, true) → text8bTextfield(f) → InputBox3Textfield(Cu_g) → InputBox4Zip((x(a), y(a), f(a)), a, Sequence[Point[Cu_g, t / n], t, 0, n]) → lg_1Textfield(n) → InputBox5Surface(cos(t) / sqrt(0.1), sin(t), u, t, (-π), π, u, -5, 60) → g1CurveCartesian(cos(t) / sqrt(0.1), sin(t), f(cos(t) / sqrt(0.1), sin(t)), t, (-π), π) → q1RotateText(text5, 90°) → text14Zip(Vector[c, c + UnitVector[a]], a, l1xy'_f, c, l1) → lvec1_fZip(Vector[c, c + UnitVector[a]], a, l1xy'_g, c, l1) → lvec1_gZip(Vector[c, c + UnitVector[a]], a, l2xy'_f, c, l2) → lvec2_fZip(Vector[c, c + UnitVector[a]], a, l2xy'_g, c, l2) → lvec2_gText("∇g", Point[u_g, 1]) → text25gText("∇f", Point[u_f, 1]) → text25fZip(Text["(" + (SurdText[x(a)]) + "," + (SurdText[y(a)]) + ")", (0, 0), true, true], a, l1) → l1surdZip(Text["(" + (SurdText[x(a)]) + "," + (SurdText[y(a)]) + ")", (0, 0), true, true], a, l2) → l2surdSegment(B, C) → f_1TableText(Append["N", 1…Length[l1]], Append["\fgcolor{red}{Cp}", l1], Append["\fgcolor{blue}{f}(\fgcolor{red}{C_p })", l1fa], Append["(\dot{f_x},\dot{f_y})", l1xy'_fa], Append["(\dot{g_x},\dot{g_y})", l1xy'_ga], Append["λ_x", lλ1ax], Append["λ_y", lλ1ay], Append["\widehat{\dot{g}\dot{f}} ", lα1], "c|_") → tTab1TableText(Append["N", 1…Length[l2]], Append["\fgcolor{red}{Cp}", l2], Append["\fgcolor{blue}{f}(\fgcolor{red}{C_p })", l2fa], Append["(\dot{f_x},\dot{f_y})", l2xy'_fa], Append["(\dot{g_x},\dot{g_y})", l2xy'_ga], Append["λ_x", lλ2ax], Append["λ_y", lλ2ay], Append["\widehat{\dot{g}\dot{f}} ", lα2], "c|_") → tTab2Textfield(txtCu01_y) → InputBox2Textfield(txtCu01_x) → InputBox1Element(l1, Indexmax1) → Amax1Element(l1, Indexmax2) → Amax2Element(l1, Indexmin1) → Amin1_1Element(l1, Indexmin2) → Amin2_1Element(l1, 5) → Amin1_2Element(l2, 5) → Amin2_2Element(l1f, Indexmin1) → Amin13d_1Element(l1f, 5) → Amin13d_2Element(l1f, Indexmax1) → Amax13dElement(l2f, Indexmax1) → Amax23dSimplify(fx'(x, y) - (gx'(x, y) * fy'(x, y) / gy'(x, y))) → Cu_xfSimplify(fy'(x, y) - (gy'(x, y) * fx'(x, y) / gx'(x, y))) → Cu_yfZip(Segment[a, b], a, l1, b, l1f) → l1segSequence(Text[i, l1(i) - (0.45, 0.1)], i, 1, lä1) → l1txtSequence(Text[i, l2(i) - (0.45, 0.1)], i, 1, lä2) → l2txtZip(Segment[a, b], a, l2, b, l2f) → l2seg