login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

We would like to find extrama of x^2 + y^2 − 2x + 4y + 5 on the curve with equation 2x^4 + 3y^7 = 4. We set up and solve system of equations for Lagrange's multipliers:

fricas
(1) -> f := x^2 + y^2 - 2*x + 4*y + 5

\label{eq1}{{y}^{2}}+{4 \  y}+{{x}^{2}}-{2 \  x}+ 5(1)
Type: Polynomial(Integer)
fricas
g := 2*x^4 + 3*y^7 - 4

\label{eq2}{3 \ {{y}^{7}}}+{2 \ {{x}^{4}}}- 4(2)
Type: Polynomial(Integer)
fricas
dfx := D(f, x) - l*D(g,x)

\label{eq3}-{8 \  l \ {{x}^{3}}}+{2 \  x}- 2(3)
Type: Polynomial(Integer)
fricas
dfy := D(f, y) - l*D(g, y)

\label{eq4}-{{21}\  l \ {{y}^{6}}}+{2 \  y}+ 4(4)
Type: Polynomial(Integer)
fricas
)set output tex off
 
fricas
)set output algebra on
r1 := solve([g, dfx, dfy], 1.0e-15)
(5) [ [ y = 0.9208297689_3710153170_2034169691_3819039444_1382982572_8057479579_008 7622506_6610299122_7720402279_4236135414_3512919130_1925525120_59548528 21_0249360484 , x = - 1.0373393332_54388858,
l = 0.4562898854_2744960049_4865614063_3636455024_1672207281_8815376923_522 6096440_0032082177_9819858606_1445957048_6060348282_1979071104_57890667 02_127456665 ] ,
[y = - 0.8526080934_9016125576, x = - 1.2563366987_746125493,
l = 0.2844629945_1171337269_5579861614_8489100133_6205527230_4243593768_166 3989631_1268805817_6205268127_7290243939_8182115881_6636341271_07798121 86_9564056396 ] ,
[y = - 1.1416637803_267151789,
x = 1.5513349690_2801873789_3770322428_2563302905_0169770846_7275566242_580 5498910_8857124756_6803091958_3494850823_0917955654_4637921892_90514021 58_240811401 ,
l = 0.0369180540_4167569804_0713896075_2132995192_5078820127_9289458299_138 6283076_5542713778_8059588147_7007596438_6175822184_9989070051_37880332 76_7963409423_8 ] ]
Type: List(List(Equation(Polynomial(Float))))

Now we substitute values info f:

fricas
eval(f, r1(1))
(6) 12.6819980979_34599666
Type: Polynomial(Float)
fricas
eval(f, r1(2))
(7) 6.4075634853_613991814
Type: Polynomial(Float)
fricas
eval(f, r1(3))
(8) 1.0407113140_76151838
Type: Polynomial(Float)

One can see that f goes to infinity when x and y go to infinity, so the third point gives minimal value, that is f attains minimal value 1.0407113140\dots at x = 1.5513349690\dots, y=- 1.1416637803\dots. Consequently the second point gives local minimum and first gives local maximum.




  Subject:   Be Bold !!
  ( 15 subscribers )  
Please rate this page: