harmonic
calculate the harmonic function
Calling Sequence
Parameters
Description
Examples
harmonic(x)
harmonic(x, y)
x
-
expression
y
The harmonic function is defined in terms of the Psi and Zeta functions as follows.
FunctionAdvisor(definition, harmonic);
harmonicz=Ψz+1+γ,with no restrictions on z,harmonica,z=ζz−ζ0z,a+1,with no restrictions on a,z
When the first parameter is a non-negative integer n, the harmonic function admits a Sum representation
FunctionAdvisor(sum_form, harmonic(n));
harmonicn=∑_k1=1n1_k1,n::ℤ0,+,harmonicn=∑_k1=1∞n_k1_k1+n,n::¬ℤ−,harmonicn=∑_k2=0∞∑_k1=0∞−1_k1n_k1+1_k2+1_k1+2,n<1
FunctionAdvisor(sum_form, harmonic(n,z));
harmonicn,z=∑_k1=1n1_k1z,n::ℤ0,+,harmonicn,z=∑_k1=1∞1_k1z−∑_k1=0∞1n+1+_k1z,1<ℜz,harmonicn,z=∑_k1=1∞−pochhammerz,_k1ζz+_k1n_k1−1_k1_k1!,n<1∧1<ℜz
When the first parameter is a negative integer an exception (error) is raised, signaling the event 'division_by_zero'. This behavior can be controlled using a NumericEventHandler, which will be passed complex infinity as the default value.
When the first parameter is a small non-negative integer and the second parameter, if present, is a non-negative integer, harmonic returns a rational number.
harmonic3
116
harmonic3,2
4936
harmonicr,s
=convert,Sumassumingr::nonnegint
harmonicr,s=∑_k1=1r1_k1s
=convert,Ζ
harmonicr,s=ζs−ζ0s,r+1
=convert,Ψassumings::posint
harmonicr,s=−1sΨs−1,1−Ψs−1,r+1s−1!
diff,r
sζ0s+1,r+1=−−1sΨs,r+1s−1!
evalfeval,r=1043+I2,s=4
−0.2942981267−0.9671639794I=−0.2942981267−0.9671639794I
Special values for the harmonic function
FunctionAdvisorspecial_values,harmonic
harmonic0=0,harmonic1=1,harmonic−1=∞+∞I,harmonic∞=∞,harmonic−∞=∞,harmonic0,z=0,harmonic1,z=1,harmonica,0=a,harmonica,1=harmonica,harmonic−1,z=∞+∞I
See Also
complex infinity
error
FunctionAdvisor
inifcns
NumericEvent
NumericEventHandler
Psi
Zeta
Download Help Document