Lagrange Multipliers Example 4

Lagrange Multipliers Example 4
Loading the math board and drawing, please wait…
2020-07-15 04:12
This example demonstrates finding extrema of a function subject to a constraint in 2D using the method of Lagrange multipliers. Key math concepts include vectors, derivatives, function optimization, and systems of linear equations. GeoGebra commands/objects used in construction are highlighted, such as Simplify, Point, Vector, Angle, LaTeX, Textfield, CurveCartesian, Segment, Text, RemoveUndefined, Element, Sequence. Suitable for university-level calculus and mathematical analysis courses to visually illustrate abstract optimization problems.

GeoGebra Commands & Parameters

  1. Simplify(Derivative[f, y, 1]) → fy'
  2. Simplify(Derivative[f, x, 1]) → fx'
  3. LeftSide(Cu_g) → g
  4. Simplify(Derivative[g, y, 1]) → gy'
  5. Simplify(Derivative[g, x, 1]) → gx'
  6. Point(Cu_g) → B
  7. Vector(B, B + UnitVector[Vector[B, Dg]] / 3) → u_g
  8. Vector(B, B + UnitVector[Vector[B, Df]] / 3) → u_f
  9. Angle(u_g, u_f) → α
  10. LaTeX(f, true) → text8a
  11. LaTeX(Cu_g, true) → text8b
  12. Textfield(f) → InputBox3
  13. Textfield(Cu_g) → InputBox4
  14. Zip((x(a), y(a), f(a)), a, Sequence[Point[Cu_g, t / n], t, 0, n]) → lg_1
  15. Textfield(n) → InputBox5
  16. CurveCartesian(sqrt(t), sqrt((1 - t^(3)) / 3), f(sqrt(t), sqrt((1 - t^(3)) / 3)), t, 0, 1) → q1
  17. CurveCartesian((-sqrt(t)), sqrt((1 - t^(3)) / 3), f((-sqrt(t)), sqrt((1 - t^(3)) / 3)), t, 0, 1) → q2
  18. Surface((1 - (3 * t^(2)))^(1 / 6), t, u, t, -1 / sqrt(3), 1 / sqrt(3), u, -1.2, 1.2) → g1
  19. Surface((-(1 - (3 * t^(2)))^(1 / 6)), t, u, t, -1 / sqrt(3), 1 / sqrt(3), u, -1.2, 1.2) → g2
  20. CurveCartesian((-sqrt(t)), (-sqrt((1 - t^(3)) / 3)), f((-sqrt(t)), (-sqrt((1 - t^(3)) / 3))), t, 0, 1) → q1a
  21. CurveCartesian(sqrt(t), (-sqrt((1 - t^(3)) / 3)), f(sqrt(t), (-sqrt((1 - t^(3)) / 3))), t, 0, 1) → q2a
  22. RotateText(text3, 90°) → text5
  23. TableText(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|_") → tTab2
  24. Zip(Text["(" + (SurdText[x(a)]) + "," + (SurdText[y(a)]) + ")", (0, 0), true, true], a, l2) → l2surd
  25. Zip(Text["(" + (SurdText[x(a), {sqrt(2), sqrt(3), sqrt(5), sqrt(10), cbrt(2), cbrt(3), cbrt(5)}]) + "," + (SurdText[y(a), {sqrt(2), sqrt(3), sqrt(5), sqrt(10), cbrt(2), cbrt(3), cbrt(5)}]) + ")", (0, 0), true, true], a, l1) → l1surd
  26. TableText(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|_") → tTab1
  27. Segment(B, C) → f_1
  28. Text("∇g", Point[u_g, 1]) → text25g
  29. Text("∇f", Point[u_f, 1]) → text25f
  30. Simplify(fx'(x, y) - (gx'(x, y) * fy'(x, y) / gy'(x, y))) → Cu_xf
  31. Simplify(fy'(x, y) - (gy'(x, y) * fx'(x, y) / gx'(x, y))) → Cu_yf
  32. RemoveUndefined(Zip[Vector[c, c + UnitVector[a] / 3], a, l1xy'_f, c, l1]) → lvec1_f
  33. RemoveUndefined(Zip[Vector[c, c + UnitVector[a] / 3], a, l2xy'_f, c, l2]) → lvec2_f
  34. RemoveUndefined(Zip[Vector[c, c + UnitVector[a] / 3], a, l1xy'_g, c, l1]) → lvec1_g
  35. RemoveUndefined(Zip[Vector[c, c + UnitVector[a] / 3], a, l2xy'_g, c, l2]) → lvec2_g
  36. Textfield(txtCu01_x) → InputBox1
  37. Textfield(txtCu01_x) → InputBox2
  38. Element(l1, Indexmax1) → Amax1_1
  39. Element(l1, Indexmin1) → Amin1_1
  40. Element(l2, Indexmin2) → Amin2_1
  41. Zip(Segment[a, b], a, l1, b, l1f) → l1seg
  42. Sequence(Text[i, l1(i) - (0.2, 0.1)], i, 1, lä1) → l1txt
  43. Sequence(Text[i, l2(i) - (0.2, 0.1)], i, 1, lä2) → l2txt
  44. Zip(Segment[a, b], a, l2, b, l2f) → l2seg
  45. Element(l1f, Indexmax1) → Amax13d_1
  46. Element(l2f, Indexmax2) → Amax23d_1
  47. Element(l1f, Indexmin1) → Amin13d_1
  48. Element(l2f, Indexmin2) → Amin23d_1
  49. Element(l1f, 5) → Amin13d_2
  50. Element(l1, 6) → Amax1_2
  51. Element(l2, 6) → Amax2_2
  52. Element(l2, Indexmax2) → Amax2_1
  53. Element(l1f, 6) → Amax13d_2
  54. Element(l2f, 6) → Amax23d_2
  55. Element(l2f, 5) → Amin23d_2
  56. Element(l1, 5) → Amin1_2
  57. Element(l2, 5) → Amin2_2

AI Drawing Prompt Reference

Visualize a 2D function optimization problem using Lagrange multipliers to find extrema. Include the function and constraint curves with their tangent vectors, gradient vectors, and the angle between them. Differentiate the function and constraint curves with colors, label key points and vectors, and present a table with coordinates, function values, gradient vectors, and Lagrange multipliers.
The prompt above was compiled from the original drawing commands and is for reference only.