0

I'm Having a problem maximizing this function in mathematica:

Maximize[a + 0.3 * b, 0 < b < 10, a]

I just get the above back again as output when I run the code, Not helpfull

However when I maximize the equivalent function:

Maximize[a + (3/10) * b, 0 < b < 10, a]

I get a solution?!?

What is going on here? why does mathematica do this?

4

1 回答 1

2

如果您比较这些结果,您会看到第一个切换到 use NMaximizedue to 0.3being Real,而第二个尝试象征性地解决 using Maximisedue to 3/10being Rational。这说明了不同的行为。

在此处输入图像描述

Map[Head, {0.3, 3/10}]

{真实,理性}

于 2016-03-11T09:27:11.733 回答