Langrage Multipliers, Ending up with huge values
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ragini Ravichandren
el 14 de Nov. de 2019
Editada: Ragini Ravichandren
el 14 de Nov. de 2019
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 comentario
the cyclist
el 14 de Nov. de 2019
It's vastly better to post code, rather than images of code. That way people can copy & paste your code for testing.
Respuestas (0)
Ver también
Categorías
Más información sobre Calculus en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!