On 04/06/2011 11:19, olfa wrote:
> Hello Mathematica community,
>
> why FullSimplify[Fibonacci[cn] + Fibonacci[cn + 1]] is not simplified
> into Fibonacci[cn+2]?
> what mathematica function should I use to get this output?
>
> thank you very much for your help.
>
You cannot expect FullSimplify to use every mathematical fact in every
possible way.
If are working with Fibonacci, and need this simplification, one way is
to use a transformation rule:
Fibonacci[cn] + Fibonacci[cn +
1]/.Fibonacci[x_]+Fibonacci[y_]:>Fibonacci[y+1]/;y==x+1
Note that this is a bit more general, in that it will also spot
expressions like Fibonacci[cn-1] + Fibonacci[cn].
It doesn't depend on the order in which things are summed, and the sum
can contain other terms as well:
In[635]:= Fibonacci[cn-1] +
cn-1+Fibonacci[cn-2]/.Fibonacci[x_]+Fibonacci[y_]:>Fibonacci[y+1]/;y==x+1
Out[635]= -1 + cn + Fibonacci[cn]
David Bailey
http://www.dbaileyconsultancy.co.uk