# Determing when f(x) and g(x) are in theta of h(x)

#### Lepros

##### New member
If f(x) is in theta of h(x) and g(x) is in theta of h(x), then is f(x)+g(x) in theta of h(x)?

My initial thoughts on this are yes since the addition of the two functions shouldn't impact the value of the largest degree in both functions, as they would if they were multiplied, but I'm wondering what sort of proof technique I could use to prove this in a more mathematically sound way.

#### Evgeny.Makarov

##### Well-known member
MHB Math Scholar
You are right about the answer. However, you can't talk about the largest degree because f(x) and g(x) are not necessarily polynomials. To prove the statement formally, start by writing what $f(x)\in\Theta(h(x))$ and $g(x)\in\Theta(h(x))$ means by definition.

I believe this answer is suitable for the Discrete Mathematics section of this forum because $\Theta$ is often used in measuring discrete resources consumed by algorithms.