# 3.5.1.3.46 Jn

## Description

This function returns the Bessel function of order n (where n is an integer):

Jn(x, n)

The formula for the equation is: $J_n(x,n)=(x/2)^{n}\sum_{k=0}^{\infty} \frac{(-1)^{k}(x/2)^{2k}}{k!\Gamma(k+n+1)}$

See the gammaln(x) function for the definition of $\Gamma$.

## Syntax

double Jn(double x, int n)

## Parameters

x

the input double at which you want to calculate the Bessel function.

n

the order of the Bessel function.

## Return

Returns the value of n order Bessel function at x.

## Example

b0 = j0(5);
b0 = ; //b0=-0.17759677131434
bn0 = jn(5,0);
bn0 = ; //bn0=-0.17759677131434
b5 = jn(5,5);
b5 = ; //b5=0.26114054612017
{"ft_lang_label":"__label__en","ft_lang_prob":0.51904553,"math_prob":0.9980454,"size":412,"snap":"2022-27-2022-33","text_gpt3_token_len":163,"char_repetition_ratio":0.13480392,"word_repetition_ratio":0.0,"special_character_ratio":0.46359223,"punctuation_ratio":0.20792079,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999906,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,4,null,4,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-26T05:24:45Z\",\"WARC-Record-ID\":\"<urn:uuid:174b1b34-459d-4bf6-95da-3af8473f25a0>\",\"Content-Length\":\"162102\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a2cdbed3-c8c4-42ea-91e1-3415eb1d214d>\",\"WARC-Concurrent-To\":\"<urn:uuid:61dfd651-6122-4a44-8d25-3383338165c7>\",\"WARC-IP-Address\":\"54.239.153.50\",\"WARC-Target-URI\":\"http://cloud.originlab.com/doc/de/LabTalk/ref/Jn-func\",\"WARC-Payload-Digest\":\"sha1:6RGAKZDOPVL4LCS2CLAGRLHMQYMQL5AH\",\"WARC-Block-Digest\":\"sha1:RROVYBB4EZBMKR6YP4IB6BJWVL5PGSW5\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103037089.4_warc_CC-MAIN-20220626040948-20220626070948-00003.warc.gz\"}"}