Finding maximum of convex function (appliance of derivatives)

1.2k Views Asked by At

The task goes as following:

Divide the length of $14$ into parts $a$ and $b$, in a way that the sum of surfaces of two squares (which sizes are $a$ and $b$), is minimal.

$14=a+b => b=14-a$ $....(1)$
P1 $=a^2$
P2 $=b^2$ $...(2)$


$(1)$ into $(2):$
P2 $=(14-a)^2=a^2-28a+196$
$f(a)=$P1$+$P2
$f(a)=a^2+a^2-28a+196$
$f(a)=2a^2-28a+196$

for $f(a)$ to be minimal, $f'(a)=0$ or $f'(a)=NaN$
$f'(a)=4a-28$
$4(a-7)=0$ for $a=7$ ; can't be NaN

So, I drew a table, provided here: enter image description here

And it turns out that for value $a=7$, function is minimal, so the solution indeed is $a=7$ and $b=7$.

My question is: What if, instead of minimal, sum of surfaces needed to be maximal? Solving the task goes the same, because for both maximal and minimal value of function (solved here) the condition is the same, and the table you get is the same. But this function is convex, it has no maximum, and I would've expected to get $14$ and $0$ as solution. How is this possible?

I hope I'm making myself clear. Thanks in advance!

2

There are 2 best solutions below

0
On BEST ANSWER

My teacher explained it to me today. Maximum value of convex functions tends to infinity, but here I am limited with $a + b = 14$, meaning that 14 is the range of this function. Thus, I cannot reach maximum value of $f(x)$, but I can reach maximum value in a way that I stay in the domain. In that domain, function has maximum value for 0 and 14. Every point on graph higher than $(0, f(0))$ and $(14, f(14))$ is ignored because its outside of the domain.

0
On

The reason you can't find a maximum this way is that there is no maximum (sort of)!

The idea of checking where the derivative is $0$ is that where we might find a local minimum or local maximum. In this example, the function $2a^2-28a+196$ doesn't have a local maximum and it goes off to infinity in either direction (that is as $a$ goes to infinity and negative infinity).

The difference is that in your case you have some extra boundary constraints: you need both $a$ and $14-a$ to be positive because they represent real world lengths. Whenever you have extra boundary constraints, you need to check those explicitly, and in this way you find that your function is maximized when $a=14$ or $a=0$ which was your solution.