Mathematica Maximization, Won't maximize a * 0.3

215 Views Asked by At

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?

1

There are 1 best solutions below

1
Chris Degnen On BEST ANSWER

If you compare these results you see that the first one switches to use NMaximize due to 0.3 being Real, whereas the second attempts to solve symbolically using Maximise due to 3/10 being Rational. This accounts for the different behaviour.

enter image description here

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

{Real, Rational}