Answer
A constant value by which a function is shifted vertically upwards, is to be added to the function value; that is, $f'\left( x \right)=f\left( x \right)+c$.
Work Step by Step
The values of the function obtained corresponding to the values of x are the values of y. Now, when we add a constant to each value of y, the graph will move upwards by that value.
Let the function be $f\left( x \right)=2x$. When the graph shifts vertically in the upward direction on the $y$ axis then all the points on the y axis must be increased with the same factor, say $c$.
Thus, we can write the equation as:
$f\left( x \right)=2x+c$
Hence, a constant value should be added to shift the graph vertically upwards.