Tool to determine the maximum value of a function: the maximal value that can take a function. It is a global maximum and not a local maximum.
Maximum of a Function - dCode
Tag(s) : Functions
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
A function maximum is the point where the function reaches its greatest value. Formally, for any function $ f(x) $ defined on an interval $ I $, taking $ m $ a real of this interval, if $ f(x) <= f(m) $ over the whole interval $ I $ then $ f $ reaches its maximum in $ x = m $ over $ I $. The value of the maximum is $ f(m) $.
Example: Maximize $ f(x) = -x^2 $, defined over $ \mathbb{R} $, the function reaches its maximum in $ x = 0 $, $ f(x=0) = 0 $ and $ f(x) <= 0 $ over $ \mathbb{R} $
The maximum of a function is always defined with an interval, it can be local (between 2 values), or global: over the domain of definition of the function.
The maximums of a function are detected when the derivative becomes null and changes its sign (passing through 0 from the positive side to the negative side).
Example: Calculate the maximum of the function $ f(x) = -x^2 + 1 $. This function has for derivative $ f'(x) = -2x $ which is nullable in $ x = 0 $ as $ f'(x) = 0 \iff -2x = 0 \iff x = 0 $. An extremum is found in 0, its value is $ f(0) = 1 $. Calculations of limits $$ \lim_{x\to0^-}{f'(x) = 0^+} \\ \lim_{x\to0^+}{f'(x) = 0^-} $$ show that the derivative change of sign from positive $ 0^+ $ to negative $ 0^- $. Global extremum of the function is then $ 1 $ for $ x = 0 $.
dCode has also a minimum of a function calculator tool.
Add one or more constraints indicating the conditions for each variable.
Example: Find the maximum of $ \cos{x} $ for $ -\pi < x < \pi $
Indicate to dCode several equations with the operator && (logical AND) to separate the equations
A local maximum is the highest point in a neighborhood/interval, while a global maximum is the highest point over the entire domain of the function.
An extremum is the name given to an extreme value of a function, a value that can be maximum (maximum of a function) or minimal (minimum of a function).
The majorant is any value greater than or equal to the maximum value reached by the function.
A constant function $ f (x) = c $ is a line, and always equals $ c $, so its maximum is $ c $, reached for any value of $ x $
An affine function $ f (x) = ax + b $ is a line that always has for maximum $ +\infty $
— If $ a < 0 $, the maximum of $ f $ is $ +\infty $ when $ x $ tends to $ -\infty $
— If $ a > 0 $, the maximum of $ f $ is $ +\infty $ when $ x $ tends to $ +\infty $
For a quadratic polynomial function $ f(x) = ax^2 + bx + c $ then
— If $ a < 0 $, the maximum of $ f $ is $ (-b^2 + 4 a c)/(4 a) $ reached when $ x = -\frac{b}{2a} $
— If $ a > 0 $, the maximum of $ f $ is $ +\infty $ when $ x $ tends to $ +\infty $
dCode retains ownership of the "Maximum of a Function" source code. Any algorithm for the "Maximum of a Function" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Maximum of a Function" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Maximum of a Function" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Maximum of a Function" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Maximum of a Function on dCode.fr [online website], retrieved on 2025-04-16,