# how can be prove that $\max(f(n),g(n)) = \Theta(f(n)+g(n))$

how can be prove that $\max(f(n),g(n)) = \Theta(f(n)+g(n))$

though the big O case is simple since $\max(f(n),g(n)) \leq f(n)+g(n)$

edit : where $f(n)$ and $g(n)$ are asymptotically nonnegative functions.

-
It is false by the common mathematical definition: $f(n) = n, g(n) = -n$. What definition of BigOh are you using? (I know you have tagged it algorithms, so I believe I can guess, but just making sure...) – Aryabhata Dec 22 '10 at 1:49
@Jonas Yes.they are non negative. – Bunny Rabbit Dec 22 '10 at 1:53

Hint...: $2 + 100 \le 100 + 100$
Use the fact that: $\max(f,g) \le f + g \le 2\max(f,g)$ when $f,g$ are non-negative
i don't know whatever the constant n0 we choose , the $f(n0)+g(n0) < = max(f(n0),g(n0))$ is not going to hold, since they are non negative. – Bunny Rabbit Dec 22 '10 at 2:13
only if the above condition holds for some constant n0 then we can prove the $\omega$ case i.e the lower bound. – Bunny Rabbit Dec 22 '10 at 2:19
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9611777663230896, "perplexity": 564.9888409273406}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-30/segments/1469257825124.22/warc/CC-MAIN-20160723071025-00030-ip-10-185-27-174.ec2.internal.warc.gz"}