Stan Math Library
4.9.0
Automatic Differentiation
|
Return the principal value of the arc tangent, in radians, of the specified variable (cmath).
The derivative is defined by
\(\frac{d}{dx} \arctan x = \frac{1}{1 + x^2}\).
\[ \mbox{atan}(x) = \begin{cases} \arctan(x) & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]
\[ \frac{\partial\, \mbox{atan}(x)}{\partial x} = \begin{cases} \frac{\partial\, \arctan(x)}{\partial x} & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]
\[ \frac{\partial \, \arctan(x)}{\partial x} = \frac{1}{x^2+1} \]
x | Variable in range [-1, 1]. |