# Method of Solving $5^x=326$ (Logs not allowed)

$5^x=326$

A book titled "algebra and trigonometry" by Paul Foerster, offers this problem. It came before the logarithm chapter and specifically said not to solve with any log manipulation. It ended with the requirement that the result be expressed to 3 digits.

I am posting here and not the Math.SE site as I'm less interested in the solution, per se, than the method used to encourage the students to look at this in a way that makes sense for them to solve.

The time was limited, and with so many questions, I skipped this one, offering the hint that $5^3=125$ and $5^4=625$ but at the time couldn't offer much more.

After sleeping on it, I have a method that uses the square key, and nothing else beyond 4 basic functions.

To be clear - the question - "how to encourage students to solve a problem of this type, given the constraints?"

• Just an observation: $x \approx 3.5956$. – Joseph O'Rourke Oct 31 '14 at 22:17
• And you solved this how? :) Keep in mind, no logs. And 5^3.5=279.5, 5^3.6=328.3 seemed a bit uninspiring. – JTP - Apologise to Monica Oct 31 '14 at 22:31
• No logs, sir. We are back to the 4 function calculator with sqr key and ability to square, but no more. – JTP - Apologise to Monica Oct 31 '14 at 22:40
• How did the book and/or teacher do the problem? A lot of these answers go well beyond the scope of a usual Algebra and Trig. course, so I believe is unreasonable to ask of students without some assistance. – Chris C Nov 1 '14 at 13:18
• The most elementary solution I can think of would be to raise both sides to the 1000th power, giving $5^{1000x}=326^{1000}$ - then you can find $x$ to 3 digits by determining which two (integer) powers of $5$ the value $326^{1000}$ lies between. That, at least, includes (indirectly) the insight that $\log(x^a)=a\log(x)$, and doesn't go so far beyond what the students might already know. – Milo Brandt Nov 2 '14 at 4:17

From the perspective of mathematics education, I must ask:

Why do you want to encourage students to solve such a problem without logarithms?

There is a connection between square roots and logarithms (e.g., here) but I consider the mathematics that underlies it quite opaque without understanding $x\mapsto \log(x)$ beforehand. Personally, my inclination is not to encourage students to solve a problem like this under the given constraints; the best approach I can think of is the already mentioned one using a combination of guess-and-check and assuming continuity plus knowledge of the intermediate value theorem.

For the sake of completeness, the mathematics described in the aforelinked suggests computing:

$$\lim_{n \rightarrow \infty}\frac{326^{(1/2^n)}-1}{5^{1/2^n} - 1} = 3.5956\ldots$$

which can be carried out to reasonable precision by clicking the square root key many, many times.

Perhaps this is the method that you already had in mind; I include it here for the mathematically curious reader, though I do not see how to satisfy the ensuing curiosity as to why that works without bringing logarithms (and limits) into the discussion.

• +1 for a beautiful answer. As for why, (a) I believe it has value, a better understanding of exponents, which will lead to an embracing of logs and not just a 'get through it' phase, (b) because as with many problems here, the constraint is given by the book or teacher, and my job is to help the student get through the problem. – JTP - Apologise to Monica Nov 1 '14 at 11:25
• @JoeTaxpayer I would argue that presenting any method like this would definitely lead directly to a "get through it" phase. How does this arcane fraction lead to anyone embracing or understanding anything? – Chris Cunningham Nov 1 '14 at 12:42
• @Chris - I answered Ben's 'why' (that he highlighted in yellow). I believe the original exercise lends itself to the understanding. – JTP - Apologise to Monica Nov 1 '14 at 18:20
• @ChrisCunningham I agree (as I hope was clear from my post). I think maybe the most one could do is to show it as a mystery, and then say the why is forthcoming. (Also, one may point out the laborious nature of clicking the square key so many times!) After the unit, return to the problem; hopefully it is now tractable. Depending on the level of students, you may be able to go through why it worked in the first place. Still: I believe logs and limits are not to be indefinitely eschewed if the method above is to be presented meaningfully. (I feel iffy giving an "MSE answer" on MESE...) – Benjamin Dickman Nov 1 '14 at 20:45

First, I'll answer the question posed by Benjamin Dickman: Solving problems with limitations is good practice for working with algebraic structures that do not have analogous functions. For example, solving $5^x \equiv 326 \mod 331$ is a situation where the log button on your calculator isn't going to help at all. (Neither is the bisection method.) So you have to be able to solve it using techniques that can translate to the system you're working in. It's good to force students to practice with these constraints so that (1) they appreciate the readily available techniques of $\mathbb{R}$ and (2) prepare for future topics where many algebraic systems are limited to $+$, $-$, $\times$, $\div$, and integer exponentiation.

Second, I'll answer the original question: You motivate them by showing them examples of what I just mentioned above. For example, a significant portion of cryptography depends on the fact that logs are hard/impossible in discrete systems. If you can introduce modular arithmetic, that would certainly help motivate the problem. But if you've done any matrix algebra you can see that (without diagonalization and power series), problems there need to be solved with $+$, $-$, $\times$, matrix inversion, and integer exponentiation.

Last, I'll solve the problem: (This is a method known as Shank's Algorithm. It uses the fact that continued fractions provide the quickest and best approximations to irrational values.)

We know that $5^3 < 326 < 5^4$. So let $x=3+x_1$ for some $0<x_1<1$. Now divide by $5^3$ to get $5^{x_1} = 2.608$.

Since $2.608^1 < 5 < 2.608^2$, then $x_1 = \frac{1}{1+x_2}$ for some $0<x_2<1$. Divide again $5/2.608^1 = 1.91717791...$.

Since $1.91717791 < 2.608 < 1.91717791^2$, then $x_2 = \frac{1}{1+x_3}$ for some $0<x_3<1$. Divide: $2.608/1.91717791=1.36033280...$.

Since $1.36033280^2 < 1.91717791 < 1.36033280^3$, then $x_3 = \frac{1}{2+x_4}$ for some $0<x_4<1$. Divide: $1.91717791/1.36033280^2 = 1.03602939...$.

Since $1.03602939^8 < 1.36033280 < 1.03602939^9$, then $x_4 = \frac{1}{8+x_5}$ for some $0 < x_5<1$. Divide: $1.36033280/1.03602939^8 =1.02486949...$.

And so on. At any point you can just set $x_i = 0$ and stop the process. Doing so gives the following sequence of rational numbers: $3,4,\frac{7}{2},\frac{18}{5},\frac{151}{42},\frac{169}{47},\frac{489}{136},...$. The theory of continued fractions says that the error in these approximating fractions is bounded by 1 over the square of the next denominator. Since $\frac{1}{47^2} < .0005$, then $3+\dfrac{1}{1+\dfrac{1}{1+\dfrac{1}{2+\dfrac{1}{8}}}} =\frac{151}{42} = 3.595...$ solves the problem.

One could solve this by "guess and check", together with the knowledge that $5^x$ is increasing.

So start with your observation that $3 < x < 4$. Test $3.1, 3.2, 3.3, ...$ and observe that $3.5<x<3.6$. Repeat the process for the next two decimal places. I am not sure if this is what they intended.

Another method which could be used if they had access to a spreadsheet is to make a table of values for $(1.001)^n$. Then do a reverse lookup for $5$ and $326$. You will find that $(1.001)^{1610} \approx 5$ and $(1.001)^{5790} \approx 326$. So we are trying to solve $[(1.001)^{1610}]^x = 1.001^{5790}$, which amounts to solving the linear equation $1610x=5790$, so $x \approx \frac{5790}{1610} \approx 3.596$ which is pretty good.

This last method is motivated by "finding a common base". If you cannot find a common base, you can always approximately find a common base by using a number slightly bigger than, but very close to, $1$. This in turn motivates the natural logarithm, and can be used to see the connection between the natural logarithm and the function $y=\frac{1}{x}$, as in this post

• First two sentences, no. As I commented, "uninspiring." But the rest is +1 material. (Even though it's not really an option.) "4 function calculator with sqr key and ability to square, but no more." – JTP - Apologise to Monica Oct 31 '14 at 23:03
• @JoeTaxpayer Ah, I did not read your comment. I do not think it is so uninspiring though. At this level, students probably do not even have a definition of real exponentiation, and this at least gets them to think in terms of limits of sequences of rational approximations. – Steven Gubkin Oct 31 '14 at 23:34
• Guess&check is based upon the intermediate value theorem. – Joseph O'Rourke Nov 1 '14 at 1:35
• @JosephO'Rourke Indeed. – Steven Gubkin Nov 1 '14 at 1:45
• @JoeTaxpayer I note that my second solution, in principle, can be carried out with just pencil, paper, and knowledge of addition and multiplication. – Steven Gubkin Nov 1 '14 at 20:42

This method does not give 3 digits precision, so is not really an answer to the original question -- but if all one is looking for is a quick-and-dirty approximation, here is a strategy that is very elementary.

First of all, let's change the problem to one that will be easier to solve: $5^x=325$. Since we are only looking for a reasonable approximation to the original problem, this problem is just as good as the original one (in the sense that an approximate solution to the new problem will also be approximately good for the original problem) (and yes, I am being very vague about what "approximately good" means).

Now why is this easier to solve? To start, notice that $325 = 25 \cdot 13 = 5^2 13$. So the problem of solving $5^x=325$ reduces to solving $5^t=13$; if we can solve that, then $x=2+t$ is the value we need.

Okay, we now have reduced the problem to finding a decent approximate solution to $5^x=13$. By "decent approximate solution" I mean that I would like to find a rational number whose numerator and denominator are not too large. One easy way to do this without using logarithms or any functions beyond a basic 4-function calculator is to write the (integer) powers of 5 and 13 in parallel lists and look for numbers in the two lists that are sort-of close to each other:

Powers of 5: $5, 25, 125, 625, 3125, 15625, 78125, \textbf{390625}, 1953125 \dots$

Powers of 13: $13, 169, 2197, 28561, \textbf{371293}, 4826809, 62748517, \dots$

Now inspecting this list we find that $5^8 \approx 13^5$ (boldfaced in the lists above). That is to say, they differ from each other by about 5%. So we have $5^{8/5} \approx 13$. Thus to a reasonable approximation the solution to $5^t=13$ is about $1.6$, and therefore the solution to $5^x=325$ is about $3.6$.

How good is this solution? Well, $5^{3.6} \approx 328.3$ (notice that this can't be done on a basic 4-function calculator), which is less than 1% larger than the target value of $326$.

• 3+t, right? (not 2+t) – JTP - Apologise to Monica Nov 2 '14 at 22:44
• No, $2+t$. The $2$ comes from the $5^2$ factor that lurks inside $325$ (which I am taking as my approximate target instead of $326$). – mweiss Nov 2 '14 at 22:46
• Ah, got it, you're taking out 13, not the full 125. I see. – JTP - Apologise to Monica Nov 3 '14 at 1:38
• Yes. The advantage of this approach is that it does not require decimals at all (except at the end); all operations involve whole numbers only. – mweiss Nov 3 '14 at 2:40

This is my method of solving. It uses the square function, and division. One then must accumulate the powers of 1/2, i.e 1/2,1/4,1/8, etc that are noted. Method -

A) Divide by the base, in this case 5, and determine the exponent has a 3 prior to the decimal.

B) Take the result and square it.

C) If you can divide the result by 5, a binary 1 is noted.

D) If you can't divide by 5 (i.e. the number is less than 5) square it, and note a binary 0.

Repeat.

Since $2^{10} \approx 1000$ 10 bits will offer 3 significant decimal digits. 10 square functions are needed, but, on average, only 5 divides, so 15 operations.

The chart above shows a binary .100110000111, which is easily converted to decimal using reciprocal of 2,4,8, etc.

No calculus, no logs, and since the original 4 function calculator allowed X= ('times equal') to square the number shown, this can be calculated using nothing but a 4 function calculator.

I purposely didn't post on MSE, because I was more interested in the pedagogical aspect of such an approach. In my opinion, this method lends itself to a segue to logarithms.

There's no guessing, and the calculation to achieve N digits of accuracy is both known and in my opinion, reasonable.

If the calculations aren't clear, please comment.

This problem is not hard with Briggs method. It is similar to the method described by Benjamin Dickman but converges with slightly less square roots. Take repeated square roots until the number is close enough to 1 to enable linear interpolation of the exponential. Do not take the same number of square roots for the other number. Instead take as many square roots as is required to get close to the first number so as to allow for more accurate interpolation. Then multiply the resulting ratio by power of 2 required to equalise the number of square roots taken.

You know how precise your calculation will be by the behaviour of each subsequent square root. If n decimal digits exactly half during the square root, then you know that it is linear over that number of digits. For instance 11 square-roots of 5 are 1.000786, while 12 square-roots is 1.000393. 393 is exactly half of 786, so I know that it is accurate for 3 sig.fig. after the 1, and 3 sig fig. should get me close enough to 326.

Get your base numbers: $$5^{1/2^{12}} = 1.000393$$ $$326^{1/2^{14}} = 1.000353$$ Do the interpolation: $$1.000353 = 5^{1/2^{12} * \frac{0.000353}{0.000393}}$$ Exponent to get the original number:

$$326 = 5^{(1/2)^{12} * \frac{0.000353}{0.000393} * 2^{14}}$$ Cancel out the powers of 2: $$326 = 5^{2^{2} * \frac{0.000353}{0.000393}}$$ $$326 = 5^{4 * {353} / {393}}$$ Calculate: $$326 = 5^{3.596}$$

There is only one way (that I know of) to solve this without knowledge of Calculus (and a calculator--that is without tables--although my solution will rely on the computational power of a calculator).

First, I do not see the question as appropriate for the level of algebra or trigonometry (I certainly don't see the link to trigonometry). Frankly, I don't see this problem appropriate for any class other than a scientific computations class (where you attempt to approximate solutions). As has been expressed, the "guess and test" method is not something I recommend at all! Guess and test literally means, guess anything and see if it works--there is little rhyme or reason to the guesses. A computer science class (or calculus class) on approximating solutions can shed some light on approximation methods, but this is far beyond the scope of an algebra or trigonometry class. As is, "guess and test" at the level of algebra or geometry is basically guess an integer, if it's not right, guess another integer. That is sort of what I will employ.

Bisection Method

You must first bound the solution. Just start guessing integers: $5^2 = 25$, $5^3 = 125$. $5^4 = 625$, there we have bounded the solution, it's between $3$ and $4$. Assuming $5^x$ is monotonic (which it is) then the solution must be between $3$ and $4$. So choose something exactly in between: $3.5$ (which actually does require a calculator):

$$5^{3.5} \approx 279.5085 < 326$$

This is less than the target solution of $326$, so the actual solution must be between $3.5$ and $4$. Keep going:

$$5^{3.75} \approx 417.96269061 > 326 \\ 5^{3.625} \approx 341.795441065 > 326 \\ 5^{3.5625} \approx 309.086929645 < 326 \\ 5^{3.59375} \approx 325.030003916 < 326 \\ 5^{3.609375} \approx 333.307325974 > 326 \\ 5^{3.6015625} \approx 329.142646077 > 326 \\ 5^{3.59765625} \approx 327.079861109 > 326 \\ 5^{3.595703125} \approx 326.053321617 > 326 \\ 5^{3.5947265625} \approx 325.541260675 < 326 \\ 5^{3.59521484375} \approx 325.797190544 < 326 \\ 5^{3.59545898438} \approx 325.925230923 < 326$$

Since we finally got to values that have the same three last digits, we arrive at $5^x = 326 \rightarrow x \approx 3.595$.

• Yes. I indicated in my question, this can be solved with 4 function calculator, and the square key, which in my day was just hitting "X=" and what showed on the display got squared. – JTP - Apologise to Monica Nov 1 '14 at 11:29