I Have the problem with the maximize of this problem:
ClearAll[expr, max, sol, x, y];
expr = (1 + x + y)/((1 + x + y) + 1)* 10 -
y - (((1 + x)/((1 + x) + 1))*10);
max = Simplify[Maximize[{expr, 0 <= y <= 1.5, 0 <= x <= 0.5}, y]]
What it returned is:
Maximize[{-((y (x^2 + 2 (-3 + y) + x (4 + y)))/((2 + x) (2 + x + y))),
0 <= y <= 1.5, 0 <= x <= 0.5}, y]
So it did not work.
I have another question with regard to extraction of value when use maximize function. After using Maximize, how do I extract the value of y and the value of the maximum function? y/. did not seem to work
My final question is regard to lower bound of a function. For example, my function is this
(1 + x + y)/((1 + x + y) + 1)* 10 - y - (((1 + x)/((1 + x) + 1))*10);
I want to create a code, such that for the above function, when x runs from 0 to 1, we find the maximum of that, expressed in terms of x. However, if the function is lower than 0, I want to return 0 and y is equal 0 in such case.
Thank you all so much!