Welcome to Estimating and Comparing Real Numbers, the fourth and final course in our learning path on the real number system! In earlier courses, we built a strong foundation: defining rational and irrational numbers, converting between forms, and placing irrationals between consecutive integers. Now we are going to put all of that knowledge to practical use.
In this first lesson, we will learn a hands-on method called trial squaring. It allows us to approximate irrational square roots to any level of precision we need, whether that is the nearest tenth, hundredth, or beyond. By the end, we will be able to pin down a value like 5 not just "somewhere between 2 and 3," but to a specific decimal like 2.24.
Why Approximations Matter
Irrational square roots show up more often than we might expect. Cutting a diagonal brace for a bookshelf, figuring out a television's screen size from its width and height, or checking a distance on a map can all involve a square root that does not come out to a neat whole number. Since irrational decimals never terminate or repeat, we cannot write them out exactly. What we can do is find a rational decimal that is close enough for the job at hand.
The key question is always: how close is close enough? Sometimes rounding to the nearest whole number is fine. Other times we need accuracy to a tenth or a hundredth. Trial squaring gives us a systematic way to reach whatever precision we choose.
Recalling Integer Bounds
As you may recall from the previous course, the first step with any irrational square root is to find the two consecutive perfect squares it sits between. For example, to begin approximating 5:
We know 22 and .
Narrowing to the Nearest Tenth
To get a tenth-precision estimate of 5, we test values between 2 and 3 in steps of , squaring each candidate and checking where falls. Rather than testing all ten possibilities, we can be strategic. Since is much closer to than to , let's start near the low end of the interval:
The Midpoint Test
The number 2.25 is exactly halfway between 2.2 and 2.3. If 5 is less than , it is in the lower half of the interval and therefore closer to . If is greater than , it is in the upper half and closer to .
Pushing to Hundredths Precision
The beautiful thing about trial squaring is that the same process repeats at every decimal place. We now know 5 lies between 2.2 and 2.3. To reach hundredths precision, we test values in steps of within that range. Since the midpoint test told us is below , we can focus on the lower portion. A bit of testing reveals:
Complete Walkthrough
Let's apply the full method from scratch on a new number: approximate 30 to the nearest hundredth.
Step 1 — Integer bounds. We note that 5 and , so .
Common Pitfalls
Before we move on to practice, here are a few things to watch for as you use this technique:
Squaring errors. When computing something like 5.472, take your time. A small arithmetic slip can send the entire process in the wrong direction. One reliable approach is the identity (a+b)2, which breaks the multiplication into simpler pieces.
Conclusion and Next Steps
In this lesson, we learned how to take an irrational square root and systematically zero in on its value using trial squaring. The method follows a simple, repeatable cycle: identify the interval, test candidates by squaring, find the two consecutive values that trap the target, then apply the midpoint test to determine which endpoint is closer. We can repeat this cycle to reach tenths, hundredths, or any finer precision the situation calls for.
Now it is time to put this technique to work! In the upcoming practice exercises, you will complete a guided trial-squaring sequence, produce your own tenth- and hundredth-precision approximations from scratch, and apply the method to a real-world scenario involving a room diagonal. Let's get squaring!
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
=
4
32=9
Since 4<5<9, we conclude 2<5<3.
This tells us 5 is somewhere between 2 and 3. That is our starting interval. Trial squaring is simply the process of zooming in on this interval, one decimal place at a time.
0.1
5
5
4
9
Value
Square
Compared to 5
2.1
4.41
Too low
2.2
4.84
Too low
2.3
5.29
Too high
As soon as we find one value whose square is below 5 and the next whose square is above 5, we can stop. Since 2.22=4.84<5 and 2.32=5.29>5, we know:
2.2<5<2.3
Now, to round to the nearest tenth, we need to determine whether 5 is closer to 2.2 or to 2.3. We settle this with a reliable technique called the midpoint test.
2.25
2.2
5
2.25
2.3
How do we check without knowing 5 exactly? We use the fact that squaring preserves order for positive numbers: a smaller positive number always has a smaller square. So 5<2.25 if and only if 5<2.252. We simply compute:
2.252=5.0625
Since 5<5.0625, we conclude 5<2.25. That places 5 in the lower half of the interval, closer to 2.2. So to the nearest tenth:
5≈2.2
We will use this midpoint test every time we need to round, at any precision level. The process is always the same: find the midpoint of the bounding interval, square it, and compare.
0.01
5
2.25
Value
Square
Compared to 5
2.23
4.9729
Too low
2.24
5.0176
Too high
We have our new bounds: 2.232=4.9729<5 and 2.242=5.0176>5, so:
2.23<5<2.24
Now we apply the midpoint test again. The midpoint of 2.23 and 2.24 is 2.235:
2.2352=4.995225
Since 5>4.995225, we know 5>2.235. That places 5 in the upper half of the interval, closer to 2.24. Rounded to the nearest hundredth:
5≈2.24
2
=
25
62=36
5<30<6
Step 2 — Narrow to tenths. Because 30 is roughly in the middle of the interval from 25 to 36, we start testing around 5.4:
Value
Square
Compared to 30
5.4
29.16
Too low
5.5
30.25
Too high
So 5.4<30<5.5. Now we apply the midpoint test. The midpoint is 5.45:
5.452=29.7025
Since 30>29.7025, we know 30>5.45, so 30 is closer to 5.5. To the nearest tenth, 30≈5.5.
Step 3 — Narrow to hundredths. Since 30 is closer to 5.5, we test the upper portion of the interval:
Value
Square
Compared to 30
5.47
29.9209
Too low
5.48
30.0304
Too high
So 5.47<30<5.48. The midpoint is 5.475:
5.4752=29.975625
Since 30>29.975625, we know 30>5.475, so 30 is closer to 5.48. To the nearest hundredth, 30≈5.48.
Each round of trial squaring cuts our uncertainty by a factor of ten. We can keep going to thousandths and beyond using the very same cycle.
=
a2+
2ab+
b2
Skipping the midpoint test. It might be tempting to eyeball which endpoint is closer, but the midpoint test is quick and reliable. Always square the midpoint and compare before rounding.
Skipping integer bounds. It can be tempting to jump straight to decimals, but identifying the integer interval first keeps you oriented and avoids wasted trials.