Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ modified_bessel_second_kind() [2/4]

template<typename T2 , require_arithmetic_t< T2 > * = nullptr>
T2 stan::math::modified_bessel_second_kind ( int  v,
const T2  z 
)
inline

\[ \mbox{modified\_bessel\_second\_kind}(v, z) = \begin{cases} \textrm{error} & \mbox{if } z \leq 0 \\ K_v(z) & \mbox{if } z > 0 \\[6pt] \textrm{NaN} & \mbox{if } z = \textrm{NaN} \end{cases} \]

\[ \frac{\partial\, \mbox{modified\_bessel\_second\_kind}(v, z)}{\partial z} = \begin{cases} \textrm{error} & \mbox{if } z \leq 0 \\ \frac{\partial\, K_v(z)}{\partial z} & \mbox{if } z > 0 \\[6pt] \textrm{NaN} & \mbox{if } z = \textrm{NaN} \end{cases} \]

\[ {K_v}(z) = \frac{\pi}{2}\cdot\frac{I_{-v}(z) - I_{v}(z)}{\sin(v\pi)} \]

\[ \frac{\partial \, K_v(z)}{\partial z} = -\frac{v}{z}K_v(z)-K_{v-1}(z) \]

Definition at line 43 of file modified_bessel_second_kind.hpp.