Limit notation, tried factorising. I am trying to calculate the following:
$$\lim_{x \rightarrow -1} \frac{(2-5x)(x+3)}{x+2}$$
I tried factorizing to cancel of numerator values with denominator values but it was futile I tried multiplying the expression by 1 and converting that 1 into an expression that was still equal to 1 e.g $$\ \frac{(2-5x)(x+3)}{x+2}$$ multiplied to $$\ \frac{x+2}{x+2}$$
I tried various other combinations but it was also futile. 
Apparently the answer is 24.
I want to know what method I can use to calculate the expression.

Note: If you substitute -1 into x in the first step and simplify you end up with 14 as the answer, I know this is not the correct way to use limit notation but it is what I observed.
 A: If you just can say that you may plug in $-1$ because the function is continuous at $x=-1$, then you are fine. An argument for that is that you are not dividing by zero, so the function is continuous. 

Fact. If you have a rational function $\frac{P(x)}{Q(x)}$ ($P,Q$ are polynomials, but it works for all continuous functions) and $Q(a) \neq 0$, then the function is continuous at $x=a$. 


A function $f$ is continuous at $x=a$ if $$\lim_{x \to a} f(x) = f(a)$$
A function is continuous if it is continuous at all $x$.
Some facts about continuous functions:


*

*All polynomials are continuous at all $x$.

*$\cos(x)$, $\sin(x)$ and $e^x$ are continuous at all $x$.

*If $f$ and $g$ are continuous at $x=a$, then $f(x)+g(x)$ is continuous at $x=a$.

*If $f$ and $g$ are continuous at $x=a$, then $f(x)g(x)$ is continuous at $x=a$.

*If $f$ is continuous at $g(a)$ and $g$ is continuous at $x=a$, then $f(g(x))$ is continuous at $x=a$.

*If $f$ and $g$ are continuous at $x=a$ and $g(a) \neq 0$, then $\frac{f(x)}{g(x)}$ is continuous at $x=a$.

A: I can see in the comments you are making that you feel like you "have to work" and you feel uncomfortable with simply plugging in numbers. Usually cancelling out terms or using tricks is done so you can get to the last step where the indetermination ($0/0, \infty/\infty$, etc.) has been lifted, and THEN you can simply plug in. If there is no indetermination, just plug in!
Hope that helps,
A: If you evaluate the limit you should get 14 unless the problem is written wrong. Also, as long as the function is continuous at the number x is approaching, simply plugging in the limit should be fine.
A: Here are some things that are always true:


*

*If $\lim[f(x)]$ and $\lim[g(x)]$ exist, then $\lim[f(x)g(x)]$ exists and is equal to $\lim[f(x)]\times\lim[g(x)]$

*If $\lim[f(x)]$ and $\lim[g(x)]$ exist, and $g(x)\neq 0$, then $\lim[f(x)/g(x)]$ exists and is equal to $\lim[f(x)]/\lim[g(x)]$.


These are both basic theorems in calculus, you should be able to look them up on Wikipedia.
In your case, each term has a limit that is easy to find, and the limit of the denominator is nonzero. Thus, we can write
$$
\lim \frac{(2-5x)(x+3)}{(x+2)} = \frac{\lim[(2-5x)(x+3)]}{\lim(x+2)}= \frac{\lim(2-5x)\lim(x+3)}{\lim(x+2)}
$$
where in the first equality I used the second theorem, and in the second equality I used the first theorem.
Note that you know, for example, that $\lim(x+2)$ exists just because $(x+2)$ is continuous
A: Expanding on the conversation in the comments of another answer:
$\displaystyle f(x) = \frac{(2-5x)(x+3)}{x+2}$ is continuous at $x = - 1$ and therefore $\lim_{x\to -1} f(x) = f(-1)$.
More formally...


*

*Every (finite) polynomial is continuous everywhere, thus $g(x) = (2 - 5x)(x + 3)$ is everywhere continuous

*The function $\displaystyle h(x) = {1 \over x+2}$ is continuous everywhere except $x = -2$

*Hence $f(x) = g(x)\cdot h(x)$ is continuous everywhere in the intersection of their domains, i.e., $Dom(f) = Dom(g) \cap Dom(h) = Dom(h) = \{ x \in \mathbb R \ : \ x \neq -2 \}$

*Finally, as $-1 \in Dom(f)$ and $f$ is continuous everywhere in its domain, $$\lim_{x\to -1} f(x) = f(-1)$$

A: What you have got is a trick question. Normally most of the questions on limits are designed in a fashion where the variable $x \to a$ and you can't put $x = a$ in the given function (doing so blows up things and most commonly you get a division by $0$).
On the other hand this question is designed so that you can plug $x = a$ and it does not lead to any problems. Note the following thumb rule (which can be taken for granted without proof for a beginner)
To evaluate the limit of an expression (consisting of trigonometric, logarithmic, exponential and algebraical functions and arithmetical operations) when $x \to a$, it is OK to plug $x=a$ provided that it does not lead to an undefined expression (like zero denominator, square root of negative number, log of zero or a negative number, etc). Also in case of exponential expression it is important that either the base or the exponent must be a constant. To handle expressions like $\{f(x)\}^{g(x)}$ it is important to recast them in the form $\exp\{g(x)\log(f(x))\}$ and then plug $x = a$.
So in the current question you got the right answer $14$ via plugging $x = -1$ in the given expression.
Only when plugging $x = a$ in the given expression creates problems we move to next level and do algebraic manipulations to simplify the expression in a form which allows plugging $x = a$ and the use of standard limits.
