# A nonlinear difference equation

1. Jun 2, 2012

### asmani

Consider the equation
$$\frac{a_n-a_{n-1}}{1+a_na_{n-1}}=\frac{1}{2n^2}$$
I know one special solution is
$$a_n=\frac{n}{n+1}$$
But how to solve and find the general solution?

2. Jun 3, 2012

### tiny-tim

hi asmani!

hint: trig substitution

3. Jun 3, 2012

### asmani

Thank you tiny-tim. I don't think that works, since the the equation is actually coming from trigonometry!

Mathematica gives the following solution:

$$a_n=\frac{a_0+\left (1+a_0 \right )n}{1+\left ( 1-a_0 \right )n}$$

But I don't know how to derive this solution analytically.

P.S. The original problem was to show that:

$$\sum_{n=1}^{\infty}\tan^{-1}\left (\frac{1}{2n^2} \right )=\frac{\pi}{4}$$

4. Jun 3, 2012

### tiny-tim

yes it does!!

try it!

5. Jun 3, 2012

### asmani

$a_n=\tan\theta_n$? Another hint please!

6. Jun 3, 2012

### tiny-tim

yes!!

so the LHS of the original equation is … ?

7. Jun 3, 2012

### asmani

I think I get it, Thanks a lot.

$$\tan \left (\theta_n-\theta_{n-1} \right )=\frac{1}{2n^2}$$
and then
$$\theta_n =\tan^{-1}\left (\frac{1}{2n^2} \right )+\theta_{n-1}$$
and then
$$\theta_n =\theta_{0}+\sum_{k=1}^{n}\tan^{-1}\left (\frac{1}{2k^2} \right )$$
By knowing that special solution mentioned in post #1, I can derive the formula in post #3. What If I didn't know that special solution?

Last edited: Jun 3, 2012
8. Jun 3, 2012

### tiny-tim

hmm

putting ao = 0 or 1 gives an = 1 + 2n or -1/(1 + 2n)

and putting ao = ±i looks interesting (i haven't followed it through ) …

do either of those help?

9. Jun 3, 2012

### asmani

Putting a0=0 in which equation?

10. Jun 3, 2012

### tiny-tim

Mathematica's …
$$a_n=\frac{a_0+\left (1+a_0 \right )n}{1+\left ( 1-a_0 \right )n}$$

11. Jun 3, 2012

### asmani

OK. So far, first I 'guessed' a special solution, then I derived the general solution by using that special solution. Is there any analytic way to find (not guess) a special solution?