# Big theta of function with multiple types of n [duplicate]

I have the following function:

$$\displaystyle\frac{n \cdot 7^n+\frac{8}{n!}}{(n+7) \cdot 7^n}=\Theta(1)$$

I don't how they come to this. What is the proper way to analyse a function to theta notation?

You can calculate the limit of the function for $$n\to\infty$$: \begin{align} \lim_{n\to\infty}\frac{n\cdot7^n+\frac{8}{n!}}{(n+7)\cdot7^n}&=\lim_{n\to\infty}\frac{n\cdot7^n}{(n+7)\cdot7^n}+\lim_{n\to\infty}\frac{\frac{8}{n!}}{(n+7)\cdot7^n}\\ &=\lim_{n\to\infty}\frac{n}{n+7}+\lim_{n\to\infty}\frac{8}{(n+7)\cdot7^n\cdot n!}\\ &=1 + 0\\ &=\Theta(1) \end{align}

• Note that this was the extra lucky case that there was a limit. Big-theta doesn’t require a limit, but it makes things easier. To OP: What happens if we multiply the whole lot by (2 + cos n)? – gnasher729 Nov 5 '19 at 15:41
• i guess it is not possible in big theta notation? Could you tell me what the general way is of analyzing a function to big theta notation? – soepblik Nov 5 '19 at 18:11
• The general way consists of reading the definition of big-theta and thinking hard about the problem at hand. Read the definition of big-theta and my example problem becomes very easy. – gnasher729 Nov 6 '19 at 9:29