[Math] Finding “Average” Function from two given functions

algebra-precalculusfunctions

So I had an weird thought today in math class. Let's say we have two functions and we want to find a function that will always give the average value of those two functions?
More Formally,

Let $f$ and $g$ be two functions that are continuous on $\mathbb R$. Find a function, $h$, such that $h$ is equal to the arithmetic mean of $f$ and $g$ for all $x \in \mathbb R$

My attempts: I couldn't really think of this abstractly for all functions, so I generated two random ones to try with, $f(x)=x$ and $g(x)=x^2$ The first thing I realized was that when the functions produce the same result such as $f(2)=g(2)$, their mean would also have to be equal to that, meaning that $h(2)=g(2)=f(2)$, for my example. Another thing was that $h(x)$ would probably be quadratic because $x^2$ grows faster than $2x$, meaning that the mean would grow closer to $x^2$, meaning that their mean would have to grow with it as well.

Here I hit a block, can anyone provide me with some sort of insight so this problem stops bugging me?

Best Answer

As suggested by @Will M., the "mean function" is $$h(x) = \frac{f(x)+g(x)}{2}$$ With minimal effort, you can "visualise" it by drawing for each value of $x$ the point $h(x)$ as the midpoint between $f(x)$ and $g(x)$.