harmonic - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


harmonic

calculate the harmonic function

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

harmonic(x)

harmonic(x, y)

Parameters

x

-

expression

y

-

expression

Description

• 

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

(1)
• 

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&comma;n::0&comma;+,harmonicn=_k1=1n_k1_k1+n&comma;n::¬,harmonicn=_k2=0_k1=0−1_k1n_k1+1_k2+1_k1+2&comma;n<1

(2)

FunctionAdvisor(sum_form, harmonic(n,z));

harmonicn&comma;z=_k1=1n1_k1z&comma;n::0&comma;+,harmonicn&comma;z=_k1=11_k1z_k1=01n+1+_k1z&comma;1<z,harmonicn&comma;z=_k1=1pochhammerz&comma;_k1ζz+_k1n_k1−1_k1_k1!&comma;n<11<z

(3)
• 

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.

Examples

harmonic3

116

(4)

harmonic3&comma;2

4936

(5)

harmonicr&comma;s

harmonicr&comma;s

(6)

=convert&comma;Sumassumingr::nonnegint

harmonicr&comma;s=_k1=1r1_k1s

(7)

=convert&comma;Ζ

harmonicr&comma;s=ζsζ0s&comma;r+1

(8)

=convert&comma;Ψassumings::posint

harmonicr&comma;s=−1sΨs1&comma;1Ψs1&comma;r+1s1!

(9)

diff&comma;r

sζ0s+1&comma;r+1=−1sΨs&comma;r+1s1!

(10)

evalfeval&comma;r=1043+I2&comma;s=4

−0.29429812670.9671639794I=−0.29429812670.9671639794I

(11)

Special values for the harmonic function

FunctionAdvisorspecial_values&comma;harmonic

harmonic0=0&comma;harmonic1=1&comma;harmonic−1=+I&comma;harmonic=&comma;harmonic=&comma;harmonic0&comma;z=0&comma;harmonic1&comma;z=1&comma;harmonica&comma;0=a&comma;harmonica&comma;1=harmonica&comma;harmonic−1&comma;z=+I

(12)

See Also

complex infinity

error

FunctionAdvisor

inifcns

NumericEvent

NumericEventHandler

Psi

Zeta