# Compute the maximum value of a multivariable function?

**URL:** <https://community.wolfram.com/t/compute-the-maximum-value-of-a-multivariable-function/17900>\
**Category:** Questions\
**Tags:** optimization\
**Created:** [March 30, 2021, 9:09pm UTC](https://community.wolfram.com/t/compute-the-maximum-value-of-a-multivariable-function/17900 "2021-03-30T21:09:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![azlibe1995](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@azlibe1995](https://community.wolfram.com/u/azlibe1995)\
**Post date:** [March 30, 2021, 9:09pm UTC](https://community.wolfram.com/t/compute-the-maximum-value-of-a-multivariable-function/17900/1 "2021-03-30T21:09:17Z")

</div>

Hi, I’m new to Mathematica. I have the function:

```
f[x_,y_] = a1 (1 - (b1/(b1 + c f1 x))^(r1/r2)) + 
 a3 (1 - (b3/(b3 + c f3 (1 - x - y)))^(r5/r6)) + 
 a2 (1 - (b2/(b2 + c f2 y))^(r3/r4))

```

![ScreenShot2021-03-31at00.06.43.png](https://global.discourse-cdn.com/wolfram/optimized/3X/9/d/9d5a8bfbf9bd783ef1966de10108212746a39f11_2_931x71.png)

The unknowns are x and y, where the rest (a1, a2, …, b1, … ) are known variables, greater than 0, in the domain of Real numbers. I need a way to find x and y, for which (given we know the other variables) `f(x,y)` will have the maximum value. When I use the function `maximize` it takes forever to compute or sometimes it won’t even execute. Finding derivatives works but then I need to express x and y in terms of the known variables, however using `solve` for solving the system of `dfdx` and `dfdy` yet again takes forever or doesn’t execute at all. Am I approaching this in the wrong way?

---

<div class="post-metadata">

**Author:** ![dontdont9](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@dontdont9](https://community.wolfram.com/u/dontdont9)\
**Post date:** [March 31, 2021, 1:49am UTC](https://community.wolfram.com/t/compute-the-maximum-value-of-a-multivariable-function/17900/2 "2021-03-31T01:49:49Z")

</div>

I see I made a mistake. Sorry. If I can see a way to fix that I’ll edit this again.
