1
$\begingroup$

I want to find a function that satisfies the following functional equation: $F(z+1)=1/z+F(z)$

This is a generalization of harmonic series 1 + 1/2 + 1/3 + 1/4 + ..., and is similar to the gamma function which satisfies the relation $F(z+1)=zF(z)$.

I searched the internet. However, I didn't find such a function. Could anyone tell me something about this function?

$\endgroup$
3
  • $\begingroup$ Welcome to Mathematica.SE. Are you sure you are posting on the right site? There is nothing in your question making it clear that it is concerned with Mathematica software. $\endgroup$
    – m_goldberg
    Mar 6 '16 at 14:32
  • $\begingroup$ You'll want to look up the digamma function. $\endgroup$ Mar 6 '16 at 18:00
  • $\begingroup$ Yes, thank you. $\endgroup$
    – XIN
    Mar 7 '16 at 10:20
5
$\begingroup$

In Mathematica, such a recursion may be solved with

RSolve[{f[z + 1] == f[z] + 1/z, f[1] == 1}, f[z], z]

where I assumed an initial condition of $f[1]=1$. The solution returned is

f[z] -> 1 + EulerGamma + PolyGamma[0, z]
$\endgroup$
4
$\begingroup$
Clear[f, f1, f2]

f1[z_] = Sum[1/k, {k, z - 1}]

(*  HarmonicNumber[-1 + z]  *)

Although this definition is for positive integers, the result is valid for all z except non-positive integers.

Plot[f1[z], {z, -5.9, 10}, Exclusions -> Range[-5, 0], 
 PlotRange -> {-5, 5}]

enter image description here

HarmonicNumber[-1 + z] // FunctionExpand

(*  EulerGamma + PolyGamma[0, z]  *)

Alternatively,

f2[z_] = f[z] /. 
  RSolve[{f[z + 1] == 1/z + f[z], f[1] == 0}, f[z], z][[1]]

(*  EulerGamma + PolyGamma[0, z]  *)

Plot[f2[z], {z, -5.9, 10}, Exclusions -> Range[-5, 0], 
 PlotRange -> {-5, 5}]

enter image description here

FullSimplify[f1[z] == f2[z], z > 0]

(*  True  *)

FullSimplify[f1[z] == f2[z], z < 0 && Not[Element[z, Integers]]]

(*  True  *)

Even for complex numbers

f1[1. + I]

(*  0.671866 + 1.07667 I  *)

f1[1. + I] == f2[1. + I]

(*  True  *)
$\endgroup$
1
  • 1
    $\begingroup$ An interesting series representation of HarmonicNumber is FullSimplify[ Sum[z/(n (n + z)), {n, 1, [Infinity]}] == HarmonicNumber[z]] Out[1289]= True $\endgroup$ Mar 6 '16 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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