<p>Your maximization problem is
<span class="math-container">$$
\max_{x_1,x_2} x_1 \cdot (300 - 2x_1) + x_2 \cdot (200-1.25x_2) - x_1 - x_2 
$$</span>
subject to <span class="math-container">$x_1 + x_2 \leq \overline{x}$</span> where <span class="math-container">$\overline{x}$</span> denotes the budget. The first part is called the <em>goal function</em>, the inequality is a <em>constraint</em>.</p>
<p>Assume the constraint is not met (not all of the budget will be used) and calculate optimal values for <span class="math-container">$x_1,x_2$</span>. Check if their sum is higher than the budget. If not, congrats you are done!
<br> If the sum is larger than the budget, you will have to do constrained optimization or use some trick.</p>
<p>Approach 1. (You can simply use derivatives.) <br>
Here you can just write that <span class="math-container">$x_2 = \overline{x} - x_1$</span>, i.e. we always use the exact amount given by the budget, thus the constraint is met. Substitute this equation for <span class="math-container">$x_2$</span> into the goal function. Calculate maximum according to <span class="math-container">$x_1$</span>.</p>
<p>Approach 2. (The geometric approach.) <br>
The constraint <span class="math-container">$x_1 + x_2 = \overline{x}$</span> defines the budget line; in optimum this should be tangential to a level curve of the goal function.
If you take the partial derivatives of the goal function, and set their ratio equal to the slope of the budget line, you get one optimality condition. The other equation is that of the budget line itself. Two equations, two unknowns.
(A remark: the budget line does define the relative prices, to be exact the rate at which <span class="math-container">$x_1$</span> can be &quot;transformed&quot; into <span class="math-container">$x_2$</span>. This rate is 1.)</p>
<p>Approach 3. (The Lagrange-method.) <br>
This is more general and involved than the above, which is why they teach the geometric method instead. For a general treatment see the <a href="https://en.wikipedia.org/wiki/Lagrange_multiplier" rel="nofollow noreferrer">Wikipedia article</a>.</p>

CC BY-SA 4.0
2022-09-29T19:45:07.770Z
Appreciate it! I was hung up on using profit vs. ROI in the maximization equation. This makes sense, thanks for the assistance.
EBS
CC BY-SA 4.0
2022-09-29T19:22:34.780Z
2022-09-29T19:30:16.047Z
2022-09-29T19:30:16.047Z
Giskard
<p>I'm attempting to solve a utility maximization problem for return-on-investment (ROI) across two different products, where each product experiences a different linear ROI curve.</p>
<ul>
<li><p>For product one, the ROI curve is <code>y=-2x+300</code> where <code>x</code> is the amount invested, and <code>y</code> is the ROI, with <code>x</code> &gt; $0</p>
</li>
<li><p>For product two, the ROI curve is <code>y=-1.25x+200</code> where <code>x</code> &gt; $0.</p>
</li>
</ul>
<p>I want to find the optimal allocation of budget across these two products such that <em>total profit</em> is maximized, where <code>profit=(amount invested * ROI)-amount invested</code>. I'm having a hard time finding the right approach to this problem: the standard geometric utility maximization approach doesn't work because there are no &quot;prices&quot; to use, and because the utility function isn't really known <em>a priori</em>.</p>

CC BY-SA 4.0
2022-09-29T18:57:02.360Z
Hi Lando! Not sure where utility comes in here; aren't you trying to maximize *profit* or *returns*?
Giskard
CC BY-SA 4.0
2022-09-29T18:57:39.770Z
Also, do you know calculus? Specifically first order derivatives?
Giskard
CC BY-SA 4.0
2022-09-29T19:05:23.973Z
Yes, I know calculus. Yes, I'm trying to maximize profit but I thought utility might be the right framing.
EBS
<utility><optimization><dynamic-optimization>
Utility maximization across yield curves?
EBS
# Utility maximization across yield curves?

(Asked by: username_0 on 2022-09-29)

I'm attempting to solve a utility maximization problem for return-on-investment (ROI) across two different products, where each product experiences a different linear ROI curve.

* For product one, the ROI curve is `y=-2x+300` where `x` is the amount invested, and `y` is the ROI, with `x` > $0
* For product two, the ROI curve is `y=-1.25x+200` where `x` > $0.

I want to find the optimal allocation of budget across these two products such that *total profit* is maximized, where `profit=(amount invested * ROI)-amount invested`. I'm having a hard time finding the right approach to this problem: the standard geometric utility maximization approach doesn't work because there are no "prices" to use, and because the utility function isn't really known *a priori*.

**Tags:** utility, optimization, dynamic-optimization

> **Comments:**
> **username_1**: Hi Lando! Not sure where utility comes in here; aren't you trying to maximize *profit* or *returns*?  
> **username_1**: Also, do you know calculus? Specifically first order derivatives?  
> **username_0**: Yes, I know calculus. Yes, I'm trying to maximize profit but I thought utility might be the right framing.  

---

## 1 answers

### Answer by username_1 on 2022-09-29. Score: 2

Your maximization problem is
$$
\max\_{x\_1,x\_2} x\_1 \cdot (300 - 2x\_1) + x\_2 \cdot (200-1.25x\_2) - x\_1 - x\_2
$$
subject to $x\_1 + x\_2 \leq \overline{x}$ where $\overline{x}$ denotes the budget. The first part is called the *goal function*, the inequality is a *constraint*.

Assume the constraint is not met (not all of the budget will be used) and calculate optimal values for $x\_1,x\_2$. Check if their sum is higher than the budget. If not, congrats you are done!
  
 If the sum is larger than the budget, you will have to do constrained optimization or use some trick.

Approach 1. (You can simply use derivatives.)   
Here you can just write that $x\_2 = \overline{x} - x\_1$, i.e. we always use the exact amount given by the budget, thus the constraint is met. Substitute this equation for $x\_2$ into the goal function. Calculate maximum according to $x\_1$.

Approach 2. (The geometric approach.)   
The constraint $x\_1 + x\_2 = \overline{x}$ defines the budget line; in optimum this should be tangential to a level curve of the goal function.
If you take the partial derivatives of the goal function, and set their ratio equal to the slope of the budget line, you get one optimality condition. The other equation is that of the budget line itself. Two equations, two unknowns.
(A remark: the budget line does define the relative prices, to be exact the rate at which $x\_1$ can be "transformed" into $x\_2$. This rate is 1.)

Approach 3. (The Lagrange-method.)   
This is more general and involved than the above, which is why they teach the geometric method instead. For a general treatment see the [Wikipedia article](https://en.wikipedia.org/wiki/Lagrange_multiplier).

> **Comments:**
> **username_0**: Appreciate it! I was hung up on using profit vs. ROI in the maximization equation. This makes sense, thanks for the assistance.  

---

