4
$\begingroup$

Consider equation $(a+\sqrt{b})^n - (a-\sqrt{b})^n = x$

How do I properly solve for $n$ given $x$?

  • 1
    What are your thoughts? Have you written out the brackets using the binomial theorem?2012-12-12
  • 0
    I don't even know where to begin with solving it because I don't know how to expand it with binomial theorem, although there is http://en.wikipedia.org/wiki/Binomial_theorem#Statement_of_the_theorem is this what you mean?2012-12-12
  • 0
    So does this mean (a+sqrt(b))^n is the sum from k=0 to n of (n choose k) a^k*sqrt(b)^(n-k)?2012-12-12
  • 0
    Correct. If you multiply this out, you will notice substantial cancellation.2012-12-12
  • 0
    @AlexB. I am not sure how to apply that here. I don't know the value of n as that's what I am solving for. I only know x. Therefore I am not sure how many terms I need to expand this by2012-12-12
  • 0
    $a,b, n, x$ integers? $b$ square free? real?2012-12-12
  • 0
    @WimC a,b,x integers, n can be decimal2012-12-12

2 Answers 2

3

There are many approaches. If you think $n$ is a small whole number, you can just try a range. A spreadsheet would make this easy. If one of $a+\sqrt b$ or $a-\sqrt b$ is smaller than $1$ it will to to zero as $n$ increases. To be definite, assume $a-\sqrt b$ is smaller than $1$. Let's ignore it for a moment. Then $n \approx \frac {\log x}{\log (a+\sqrt b)}$ where you can use your favorite base for the logs. You can use numerical methods. The left side will be monotonic with $n$, so any reasonable root-finder will work. Just graphing will get you very close.

As an example, suppose you want to find the index of a Fibonacci number. We are given that $\sqrt 5 F_n=(\frac {1+\sqrt 5}2)^n-(\frac {1-\sqrt 5}2)^n$. As $|\frac {1-\sqrt 5}2|\lt 1$, powers of it go to zero quickly. If somebody gives us $14930352$ and asks which number it is, we can just do $\frac {\log (14930352\sqrt 5)}{\log (\frac {1+\sqrt 5}2)}$ and get a number that is within $10^{-14}$ of $36$, so $n=36$

  • 0
    In my case, neither side has an absolute value less than 12012-12-12
  • 0
    @KaliMa: In that case I would graph it or use a spreadsheet2012-12-12
  • 0
    This was helpful, thank you2012-12-12
2

Consider equation $(a+\sqrt{b})^n - (a-\sqrt{b})^n = x$

Consult this link: The Binomial Theorem.

Since you are given $x$ (taken to be a constant), you can also try take logarithms of each side of the equation.

  • 0
    They are not squared, they are raised to power $n$2012-12-12
  • 0
    Fixed: see the link. It will help you understand how to approach the problem.2012-12-12
  • 0
    @amWhy Using your link, I took the original equation to: $\sum_{k=0}^n {n\choose k}a^k\sqrt b^{n-k} - \sum_{k=0}^n {n\choose k}a^k(-\sqrt b)^{n-k} = x$ Not sure where to go from there? I get it down to: $\sum_{k=0}^n {n\choose k}a^k({\sqrt b}^{n-k}-{(-\sqrt b)}^{n-k})= x$2012-12-12