1
$\begingroup$

I gave the following code as input:

RSolve[x[n + 1] == 1/2 x[n] + 2 Log[x[n]], x[n], n]

Mathematica gave the same output:

RSolve[x[n + 1] == 1/2 x[n] + 2 Log[x[n]], x[n], n]

I cannot find anything in the documentation. Can someone guide me ?

$\endgroup$
2
  • 5
    $\begingroup$ Returning the input means: Mathematica isn't able to solve this recursive system $\endgroup$ Feb 4, 2022 at 9:52
  • 4
    $\begingroup$ I doubt that a closed form solution exists. Try to get a couple of values for some initial value using RecurrenceTable. $\endgroup$ Feb 4, 2022 at 10:06

1 Answer 1

1
$\begingroup$

An extended comment rather than a full answer.

We start by inspecting the n=0 term

x[n + 1] == 1/2 x[n] + 2 Log[x[n]] /. n -> 0

which yields

x[1] == 2 Log[x[0]] + x[0]/2

Ok, so clearly x[0] cannot be zero, but we can set it to some values that are fun and interesting.

Case 1: x[0]=e.

We have

list1 = RecurrenceTable[{x[n + 1] == 1/2 x[n] + 2 Log[x[n]], 
    x[0] == E}, x, {n, 0, 16}] // N

The above gives data that are real numbers. We can fit the data to a formula like so:

sltnre = FindFit[list1, a Log[b + x] + c, {a, b, c}, x]

Now, it is time to check our findings. Note that we are plotting to higher values of n compared to the ones used to obtain the fit. We do so in the following manner

plot1 = DiscretePlot[(a Log[b + x] + c /. sltnre), {x, 0, 21}, 
   PlotStyle -> Red];
plot2 = ListPlot[
   RecurrenceTable[{x[n + 1] == 1/2 x[n] + 2 Log[x[n]], x[0] == E}, 
     x, {n, 0, 21}] // N, PlotStyle -> Black];
Show[plot1, plot2]

plot mma1

We observe that while the fit is not the best possible, it is not all bad. At least not for a first effort. Perhaps you can build up from this point onwards.

Case 2: x[0]=1.

In this case, the data generated by

list1 = RecurrenceTable[{x[n + 1] == 1/2 x[n] + 2 Log[x[n]], 
     x[0] == 1}, x, {n, 0, 16}] // N;

are complex numbers. No worries, we just perform two fits for the Re and Im parts. We proceed as follows:

sltnre = FindFit[Re[list1], a Log[x] + b, {a, b}, x]
sltnim = FindFit[Im[list1], a Log[x] + b, {a, b}, x]

And the we can check our findings:

plot1 = DiscretePlot[(a Log[x] + b /. sltnre), {x, 0, 16}, 
   PlotStyle -> Red];
plot2 = ListPlot[Re[list1], PlotStyle -> Black];
plot3 = DiscretePlot[(a Log[x] + b /. sltnim), {x, 0, 16}, 
   PlotStyle -> Green];
plot4 = ListPlot[Im[list1], PlotStyle -> Black];
Show[plot1, plot2]
Show[plot3, plot4]

I am not providing any plots, as in this case the fits are really bad, and serious more effort is needed, but again may be a helpful starting point for you.

Case 3: x[0]=1. Proceeding analytically.

We can try to be brave and attempt to achieve analytic progress rather than fitting to numerical data. This requires some time that I do not have, so I am demonstrating the general line of work.

We generate data this time as follows:

RecurrenceTable[{x[n + 1] == 1/2 x[n] + 2 Log[x[n]], x[0] == 1}, 
   x, {n, 0, 6}] // Expand // TableForm

And we focus on the different -structurally- terms that appear in the above data. The task at hand is to try and obtain them analytically. FindSequenceFunction is our friend.

We have for the constant term, the one proportional to I Pi and the one that goes with Log[2] the following:

FindSequenceFunction[{1, 1/2, 1/4, 1/8, 1/16}, n] /. n -> n + 1
FindSequenceFunction[{2 , 1, 1/2, 1/4} I Pi, n] /. n -> n - 1
FindSequenceFunction[-{2, 1, 1/2, 1/4, 1/8} Log[2], n] /. n -> n - 1

and the above give us back

2^-n

I 2^(3 - n) π

-2^(3 - n) Log[2]

In this approach, the general idea is to use some relatively low-lying values of n and the FindSequenceFunction to try and guess a general pattern and verify it for higher values of n. The actual pain -I guess- is the obtain a way to express the terms that start appearing in the n=6 and higher order that contain increasing number of individual summed pieces. It's not impossible, but it's not the most obvious thing to do.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.