## 8 Reputation

16 years, 174 days

## Thank you for your help! a)...

a) you're right i want x to be a non negative integer

b) you're right again. I couldn't copy my writings directly from maple so i rewrote it by hand using capital letters. Don't ask me why.... I've written the same model using piecewise instead:

>a := 16362-(30+x)*504;
>b := piecewise(a < 0, 16362-(30+x)*420, a > 0, (30+x)*84);
>c := piecewise(b > 0, (30+x)*420, b < 0, 16362);
>wagecost:= piecewise(`and`(a > 0, b > 0), 12.65*c+(12.65*1.5)*b+(12.65*2)*a, `and`(a < 0, b > 0), 12.65*c+(1.5*12.65)*b, `and`(a < 0, b < 0), 12.65*c);

c) and right again... i wrote the model when looking at the wrong maple-document... I should have written 30 instead of 40. Now my former statement about x being =<9 should be correct.

d) the object function is now named 'wagecost' (at least this i what i think is the object function. This far i've only had courses i linear algebra, DE and infinite series. This problem in just some spare time fun). I've only written the functions a, b and c to be able to overlook the problem easily.

I am now able to use the Minimize commando. The only problem that persists is that maple keeps on calculating x=25. as the optimum value and i want it to stop at x=9 (which fits with what i plot and calculations done by hand). I've tried with diffrent 'optimalitytolerance's and 'initialpoint's but with no luck.

 Page 1 of 1
﻿