harmonic - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Special Functions : harmonic

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ζ0,z,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::&apos;nonnegint&apos;,harmonicn=_k1=1n_k1_k1+n&comma;n::¬&apos;negint&apos;,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::&apos;nonnegint&apos;,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)

&equals;convert&comma;Sumassumingr::nonnegint

harmonicr&comma;s=_k1=1r1_k1s

(7)

&equals;convert&comma;Zeta

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

(8)

&equals;convert&comma;&Psi;assumings::posint

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

(9)

r

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

(10)

evalfeval&comma;r&equals;1043&plus;I2&comma;s&equals;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