Forgot password?
 Create new account
View 2077|Reply 6

mathematical中如何输入二元条件最值?

[Copy link]

87

Threads

2383

Posts

110K

Credits

Credits
13325

Show all posts

其妙 Posted at 2014-6-8 14:59:36 |Read mode
例如:$x\geqslant0,y\geqslant0,2x+3y\leqslant5$,求$x-2y$的最小值。
谢谢!
妙不可言,不明其妙,不着一字,各释其妙!

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2014-6-8 15:03:18
输入
??Minimize
回车自己看帮助

87

Threads

2383

Posts

110K

Credits

Credits
13325

Show all posts

 Author| 其妙 Posted at 2014-6-8 15:47:31
Minimize[f,x] 得出以 x 为自变量的 f 的最小值.
Minimize[f,{x,y,...}] 得出以 x,y,...为自变量的函数 f 的最小值.
Minimize[{f,cons},{x,y,...}] 根据约束条件 cons,得出 f 的最小值.
Minimize[{f,cons},{x,y,...},dom] 得出函数的最小值,函数含有域 dom 上的变量,典型的有 Reals 或 Integers. >>
Attributes[Minimize]={Protected}

Options[Minimize]={WorkingPrecision->\[Infinity]}
我学学

87

Threads

2383

Posts

110K

Credits

Credits
13325

Show all posts

 Author| 其妙 Posted at 2014-6-8 15:51:53
回复 3# 其妙
in[1]:=Minimize[{x - 2 y, x >= 0,   y >= 0, 2 x + 3 y <= 5}, {x, y}]
Minimize[{x \[Minus] 2 y, x \[GreaterSlantEqual] 0,   y \[GreaterSlantEqual] 0, 2 x + 3 y \[LessSlantEqual] 5}, {x, y}]
out[1]:={-(10/3), {x -> 0, y -> 5/3}}

801

Threads

4889

Posts

310K

Credits

Credits
36169

Show all posts

isee Posted at 2017-10-12 14:30:30
哟哟,线性规划实例。。。

3146

Threads

8493

Posts

610K

Credits

Credits
66158
QQ

Show all posts

hbghlyj Posted at 2023-4-3 23:04:17
isee 发表于 2017-10-12 07:30
哟哟,线性规划实例。。。
线性规划用LinearOptimization
  1. In[]:= LinearOptimization[x-2y,{2x+3y<=5,x>=0,y>=0},{x,y}]
  2. Out[]= {x->0,y->5/3}
Copy the Code

801

Threads

4889

Posts

310K

Credits

Credits
36169

Show all posts

isee Posted at 2023-4-4 08:02:10
hbghlyj 发表于 2023-4-3 23:04
线性规划用LinearOptimization
MMA 啥都定义了哇~
isee=freeMaths@知乎

手机版Mobile version|Leisure Math Forum

2025-4-20 22:06 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list