# Is $f+g$ and $fg$ maximum where $f$ and $g$ are maximum?

If $g$ and $f$ are two real functions and I know that both $f$ and $g$ have a maximum in $x_0 \in \mathbb{R}$ can I say that $f+g$ has a maximum in $x_0$?

If this is true, can the same be said if I have $fg$? That is, if both $f$ and $g$ have a maximum in $x_0 \in \mathbb{R}$ can I say that $fg$ has a maximum in $x_0$?

• Yes for $f+g$. No for $fg$. For example if $f(x):=g(x):=-|x|-1$ then $x_0=0$ but $(fg)(0)=1<4=(fg)(1)$, say. – Guest Nov 22 '16 at 23:05
• What do you mean by a maximum of a function $f$? If you mean a point where $f$ attains it supremum, i.e. a point $x$ such that $f(x) \ge f(y)$ for all $y \in \Bbb{R}$, then the answer is no both for the sum and the product (without some additional assumptions). Or do you mean that $f$ and $g$ attain their maximum at the same point? – Rob Arthan Nov 23 '16 at 0:58

For the first question, yes: because $\forall x, f(x) \leq f(x_0)$ and $g(x) \leq g(x_0)$. So $(f+g)(x) \leq (f+g)(x_0)$.

For the second question: no. Let $f(x)=g(x)=1-x^2$. $f$ and $g$ have maximum in $0$. But $(fg)(2)=3 \times 3=9 > (fg)(0)=1$

This is true for $f+g$. Because for every $x$ in the neighborhood of $x_0$ you have \begin{aligned} f(x)&\leq f(x_0)\\g(x)&\leq g(x_0) \end{aligned} So, by adding the above inequalities you'll get $$f(x)+g(x)\leq f(x_0)+g(x_0)$$ or $$(f+g)(x)\leq (f+g)(x_0)$$ which means the maximum of $f+g$ occurs at $x_0$, too.

But the proposition is not true for $f\cdot g$. For example you can consider both of $f$ and $g$ to be negative functions, like $$f(x)=g(x)=-(1+x^2)$$ for which the maximum occurs at $x_0=0$ . You can see $$(f\cdot g)(x)=\left(1+x^2\right)^2$$ which its minimum occurs at $x_0=0$ and also has no maximum.

Not necesserly, if $f(x_0)<0$ and $g(x_0)<0$ then it is a minimum of $fg$

Assuming that $f$ and $g$ are twice differentiable, we can classify critical points by the second derivative test. For the first part, we have $(f + g)' = f' + g'$ and so $x_{0}$ is a critical point of $f + g$. Moreover, if $x_{0}$ if a maximum of $f$ and $g$, what can you say about the sign of $f''$ and $g''$ and how could this help determine the sign of $(f + g)''$?

Now $(fg)' = fg' + f'g$, so again $x_{0}$ is a critical point of $fg$. But $(fg)'' = (fg' + f'g)' = fg'' + 2f'g' + f''g$, and it becomes hard to say whether or not $x_{0}$ is a maximum. As marco has pointed out in another answer, there are counter examples.

• $f$ and $g$ don't even have to be continuous for the question to make sense, let alone twice differentiable. – TonyK Nov 22 '16 at 23:42
• I suppose that is true. I assumed that was the case because of the derivative tag. Ill add that bit in. – Oiler Nov 22 '16 at 23:50