Langrage Multipliers, Ending up with huge values

2 ビュー (過去 30 日間)
Ragini Ravichandren
Ragini Ravichandren 2019 年 11 月 14 日
編集済み: Ragini Ravichandren 2019 年 11 月 14 日
I was trying to use langrage multipliers to solve for the minimum and maximum of the following functions; however, upon using the following commands, I end up with enormous values for the critical points, which I don't think are correct. Please help!:
syms x;
syms y;
syms w;
syms z;
f=5.0*y - 1.0*w*x - 9.0*w*y + 5.0*w*z + 10.0*x*y + x^2
g=0.06964*w*x + 0.1368*w*z + 0.1525*x*y + 0.114*x*z + 0.247*y*z + 0.3672*w^2 + 0.3393*x^2 + 0.4146*y^2 + 0.1505*z^2
Dfw=diff(f,w)
Dfx=diff(f,x)
Dfy=diff(f,y)
Dfz=diff(f,z)
Dgw=diff(g,w)
Dgx=diff(g,x)
Dgy=diff(g,y)
Dgz=diff(g,z)
syms L
assume(L, 'real')
[LSols2, wSols2, xSols2, ySols2, zSols2]=solve([Dfw==L*Dgw, Dfx==L*Dgx, Dfy==L*Dgy, Dfz==L*Dgz, g==1], [L,w,x,y,z])
-And then the values for LSols2, wSols2, xSols2, ySols2, zSols2 are all, gigantic.
  1 件のコメント
the cyclist
the cyclist 2019 年 11 月 14 日
It's vastly better to post code, rather than images of code. That way people can copy & paste your code for testing.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by