Hard Made Easy
[This post is targeted at a Level 1 student.]
In Lagrange Interpolation, we saw how we transformed a hard problem (question 1) into a simple case (question 2), and then used the simple case to build up our understanding of the hard problem. Some students asked if there are any other similar scenarios. Yes, there are several such instances, which we will cover over time. The intention of this (series of) post, is to illustrate how we can use simple cases to build up our understanding of math.
The following is a well-known example, which is extremely basic. As such, there are no Worked Examples to go through, and students are encouraged to do all the Test Yourself problems. To give everyone a chance to work on them, I will edit out any solutions that are posted in the comments.
Consider the question: How many integers are there between 1234 and 9876?
This seems hard to approach, since we do not have any concrete values to work with. The possible integers are . But how many are there? Don’t we end up having to work out the answer to this question in order to proceed?
Well, this is easy. The integers are , so there are
of them. We’re done.
Now, how do we go from Question 1 to Question 2? We use a change of variables, by setting . Then, we have that
, or equivalently that
. By question 2, we know that there are
possible values to
, hence there must be
possible values to
.
Test Yourself
1. Back to the original question: How many integers are there between 1234 and 9876?
2. Does it matter in the proof if are negative numbers?
3. If are integers such that
, how many integers are there which satisfy
? What happens to the formula if
? Why?
4. Consider the Arithmetic Progression given by , where each term is 7 more than the previous term. How many terms are there in this sequence?

Can’t it be directly deduced using the idea of an Arithmetic Progression i.e.
any general term (nth term) of an A.P can be given as,
a(n) = a + (n-1) d
where a is the first term of the A.P. , n is the number of terms, and in case of consecutive integers, common difference d would be 1.
So in the above case, first term would be A , nth term is B, and common difference d is 1 .
Substituting the values in above, we will get,
B = A + (n-1)1
that is , n= B – A + 1
which is the result you derived.
[Solutions to Test Yourself questions edited out.]
Please comment if i’m mistaken in something…
No, you’re not mistaken in anything. The intention is to demonstrate how simplifying a problem can actually help us solve it. As I said, this is a very simple example, (as compared to the Lagrange Interpolation formula), which is why there are no worked examples in this post. Over time, there will be similar posts with such a concept.
When learning about an Arithmetic Progression, you actually went through this process of counting the number of integers from A to B (like in Test Yourself 3). So, it’s not exactly a deduction from AP, as this is used to build up our theory of AP.
There are students of various ability levels on Brilliant, which is why these blog posts will vary in its target audience.
[Solution edited out]
[Solution edited out]
[Solution edited out]
[Solution edited out]
if both the numbers are included
Why did you set x – A + 1 = y? How do you know to set x – A + 1 = y?
“Each problem that I solved became a rule, which served afterwards to solve other problems.” – Descartes
The idea behind this post, is that we want to reduce a problem to something already solved. This post highlights how a ‘hard’ problem (question 1) can be simplified to an easy one (question 2), which we then use to solve the hard problem.
So, how do we get
to look like
? Well, the
must become a 1. Since these are linear inequalities involving integers, we want our corresponding solutions to remain as integer. Thus, we have to subtract
and add 1 throughout the equation. This gives the change of variables:
.
very helpful.. thanks
please check if the answers are correct.if they are not ,tell me where i might have gone wrong or if there is any better way to work them
[Solutions edited out - Calvin]
[correct solutions edited out]
3) in this case there are B-A-1 intengers. ther are B-A-1 intengers =-1 intengers, but because the numbers of integers between 2 numbers is kina a distance, and a distance is never negativ, ther are 0 integers (we can notice it with logic only)
@Calvin, what do you think?
For 3, the intention was for you to adapt what was already done above. It can be properly approached without handwaving.
One way that we can proceed, is to easily answer the question: If
is a positive integers, how many integers x are there that satisfy
.