Solving n3n =324


By Shri Bhosale on Monday, July 22, 2002 - 06:59 am:

How can we solve n(3n )= 324


By Andre Rzym on Monday, July 22, 2002 - 10:26 am:

First of all I would justify to myself that
y=n.3n is a monotonically increasing function of n. In other words, as n increases, so does y.

That should allow you to convince yourself that there is exactly one solution to the equation [because if we try n=0, y is too small, and if n=10, y is too big].

How do we find n? Well you can just guess, but alternatively, you can rearrange your equation to:

n=[ln(324)-ln(n)]/ln(3)

We can regard this as an algorithm - the n in the right hand side is our current estimate, giving the n on the left hand side as our next estimate.

Starting with n=1 gives our next estimate as 5.26. Repeating with 5.26 gives 3.75 as the third estimate. Repeating a few more times gives 4.0.

Substituting 4 into the original equation justifies that it is indeed the solution.

Andre


By Yatir Halevi on Tuesday, July 23, 2002 - 07:36 am:

Andre, why does it work, why would 'n' on the LHS and RHS would finally be the same?

Can you be sure they finally will?

Yatir


By Julian Pulman on Tuesday, July 23, 2002 - 01:54 pm:

Yatir, the reason it works is because you're clearly just finding the coordinates of intersection of the line y1 =x and the curve y2 =[ln(324)-ln(x)]/ln(3), we know that they intersect when their x and y values are equal, here x=n, so:

n=[ln(324)-ln(n)]/ln(3)

Using the "intersecting graph" analogy, if you set n=1 on the left hand side, then sub n=1 into the RHS you are finding the y value (on the curve y2 ) at the point x=1. Crucial Step: If we now sub this value back into y1 we are finding the x coordinate in y1 for which y1 = y2 , repeating these two steps of finding corresponding y and x values are you see that the space bounded by each iteration pair decreases to zero, and at that point you have their intersection, because at that point the corresponding x value is itself, and the corresponding y value is itself, so no change ensues.

I know the above was a bit muddled, but it'll all become clear looking at this diagram, the black line shows how the formula converges on the value.

Spider Diagram

Note: Not all iterations of this sort converge, we know that this must, because ln(n) is only real for n> 1, so starting at n=1 ensures we must find the converging value.


Julian


By Yatir Halevi on Thursday, July 25, 2002 - 02:36 pm:

Thanks Julian!

Yatir


By Andre Rzym on Saturday, July 27, 2002 - 08:13 pm:

Yatir, I take it you are asking about why this iteration schema converges.

We started with

n.(3n )=324

and rearranged to give:

[a] n=[ln(324)-ln(n)]/ln(3)

but we could equally have rearranged it to:

[b] n=eln(324)-n.ln(3)

As iteration strategies, [a] converges, but [b] does not. Try starting with an initial guess of 4.1 and you will see what I mean. Indeed, the second iteration gives n as 4.005 and 6.318 respectively.

What did I actually do? I guessed that [a] was the way to go, plugged numbers in a spreadsheet, saw convergence to 4, verified that it was indeed the solution.

But the real question is, "what distinguishes [a] from [b] such that one converges and the other does not?"


Suppose n= n0 solves

n=f(n)

for some function, f. Now suppose that our guess is n0 +δ. Then after 2 iterations we get (ignoring higher powers of δ):

f(f( n0 +δ))=f( n0 +f'.δ)= n0 +(f' )2 .δ
where the derivative is evaluated at n0 .

The conclusion is that provided |f'| < 1, the iteration scheme will converge 'geometrically'.

In the example above, for [a] f'=-0.227 and for [b] f'=-4.3. Hence convergence for the first and divergence for the second (for 'sufficiently good initial guesses')

Sorry for the late reply,

Andre


By Yatir Halevi on Tuesday, July 30, 2002 - 04:07 pm:

Thanks Andre, I'm starting to get it, but not yet...
I guess you used taylor's expansion, why did you disregard the rest of the series?

Yatir


By Andre Rzym on Wednesday, July 31, 2002 - 08:57 am:

Yatir,

I did indeed use the Taylor expansion. I ignored the rest of the series because I was only looking at 'sufficiently good initial guesses' (see last but one para above), i.e. where the distance from n0 is small.

Indeed, if you put formulae [a] and [b] on a spreadsheet, even with a starting guess of exactly 4 you find that n diverges for [b], as machine rounding errors start to build up.

This does nothing to help us prove convergence for [a] when the initial guesses are a finite distance from n0 . There may be a more general approach, but the way I would go about it is to consider

n0 +y=f(f(n0 +x))

for x> 0 and try to show that 0 < y < x (and that y is diminishing at a sufficiently fast rate that it must converge to 0).

For example, approximate f(n) by g(n)=2 straight lines, intersecting at (4,4). For n> n0 we require g(n) < f(n) so a gradient of -0.227 is fine. For n < n0 we require g(n)> f(n) so a gradient of something less than 1/-0.227 is fine.

Let me know if you want me to go through the formulae.

Andre