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&equals;_k1&equals;1n1_k1&comma;Andn::nonnegint&comma;harmonicn&equals;_k1&equals;1&infin;n_k1_k1&plus;n&comma;Andn::Notnegint&comma;harmonicn&equals;_k2&equals;0&infin;_k1&equals;0&infin;1_k1n_k1&plus;1_k2&plus;1_k1&plus;2&comma;Andn<1

(2)

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

harmonicn&comma;z&equals;_k1&equals;1n1_k1z&comma;Andn::nonnegint&comma;harmonicn&comma;z&equals;_k1&equals;1&infin;1_k1z_k1&equals;0&infin;1n&plus;1&plus;_k1z&comma;And1<z&comma;harmonicn&comma;z&equals;_k1&equals;1&infin;pochhammerz&comma;_k1&zeta;z&plus;_k1n_k11_k1_k1&excl;&comma;n<1<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&equals;_k1&equals;1r1_k1s

(7)

&equals;convert&comma;&zeta;

harmonicr&comma;s&equals;&zeta;s&zeta;0&comma;s&comma;r&plus;1

(8)

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

harmonicr&comma;s&equals;1s&Psi;1&plus;s&comma;1&Psi;1&plus;s&comma;r&plus;11&plus;s&excl;

(9)

r

s&zeta;0&comma;s&plus;1&comma;r&plus;1&equals;1s&Psi;s&comma;r&plus;11&plus;s&excl;

(10)

evalfeval&comma;r&equals;1043&plus;I2&comma;s&equals;4

0.29429812670.9671639794I&equals;0.29429812670.9671639794I

(11)

Special values for the harmonic function

FunctionAdvisorspecial_values&comma;harmonic

harmonic0&equals;0&comma;harmonic1&equals;1&comma;harmonic1&equals;&infin;&plus;&infin;I&comma;harmonic&infin;&equals;&infin;&comma;harmonic&infin;&equals;&infin;&comma;harmonic0&comma;z&equals;0&comma;harmonic1&comma;z&equals;1&comma;harmonica&comma;0&equals;a&comma;harmonica&comma;1&equals;harmonica&comma;harmonic1&comma;z&equals;&infin;&plus;&infin;I

(12)

See Also

complex infinity

error

FunctionAdvisor

inifcns

NumericEvent

NumericEventHandler

Psi

Zeta