Forgot password
 Register account
View 2211|Reply 6

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

[Copy link]

84

Threads

2340

Posts

4

Reputation

Show all posts

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

673

Threads

110K

Posts

218

Reputation

Show all posts

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

84

Threads

2340

Posts

4

Reputation

Show all posts

original poster 其妙 posted 2014-6-8 15:47
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]}
我学学

84

Threads

2340

Posts

4

Reputation

Show all posts

original poster 其妙 posted 2014-6-8 15:51
回复 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}}

764

Threads

4672

Posts

27

Reputation

Show all posts

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

3211

Threads

7832

Posts

52

Reputation

Show all posts

hbghlyj posted 2023-4-3 23:04
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

764

Threads

4672

Posts

27

Reputation

Show all posts

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

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-20 05:46 GMT+8

Powered by Discuz!

Processed in 0.011257 seconds, 22 queries