Inverse Cosine and Hyperbolic Cosine Reverse Mode Theory
Keywords: inverse cosine hyperbolic reverse mode theory acos acosh

| Prev | Next |  |  |  |  |  | acos_reverse | Headings

Inverse Cosine and Hyperbolic Cosine Reverse Mode Theory
We use the reverse theory standard math function definition for the functions H and G . In addition, we use the forward mode notation in acos_forward for Q ( t ) = ∓ ( X ( t ) * X ( t ) - 1 ) B ( t ) = Q ( t ) We use q and b for the `p`-th order Taylor coefficient row vectors corresponding to these functions and replace z ( j ) by ( z ( j ) , b ( j ) ) in the definition for G and H . The zero order forward mode formulas for the acos function are q ( 0 ) = ∓ ( x ( 0 ) x ( 0 ) - 1 ) b ( 0 ) = q ( 0 ) z ( 0 ) = F ( x ( 0 ) ) where F ( x ) = acos ( x ) for - and F ( x ) = acosh ( x ) for + . For orders j greater than zero we have q ( j ) = ∓ ∑ k = 0 j x ( k ) x ( j - k ) b ( j ) = 1 j 1 b ( 0 ) (j 2 q ( j ) - ∑ k = 1 j -1 k b ( k ) b ( j - k ) ) z ( j ) = 1 j 1 b ( 0 ) (∓ j x ( j ) - ∑ k = 1 j -1 k z ( k ) b ( j - k ) ) If j = 0 , we note that F ( 1 ) ( x ( 0 ) ) = ∓ 1 / b ( 0 ) and hence ∂ H ∂ x ( j ) = ∂ G ∂ x ( j ) + ∂ G ∂ z ( j ) ∂ z ( j ) ∂ x ( 0 ) + ∂ G ∂ b ( j ) ∂ b ( j ) ∂ q ( 0 ) ∂ q ( 0 ) ∂ x ( 0 ) = ∂ G ∂ x ( j ) ∓ ∂ G ∂ z ( j ) 1 b ( 0 ) ∓ ∂ G ∂ b ( j ) x ( 0 ) b ( 0 ) If j > 0 , then for k = 1 , … , j -1 ∂ H ∂ b ( 0 ) = ∂ G ∂ b ( 0 ) + ∂ G ∂ z ( j ) ∂ z ( j ) ∂ b ( 0 ) + ∂ G ∂ b ( j ) ∂ b ( j ) ∂ b ( 0 ) = ∂ G ∂ b ( 0 ) - ∂ G ∂ z ( j ) z ( j ) b ( 0 ) - ∂ G ∂ b ( j ) b ( j ) b ( 0 ) ∂ H ∂ x ( 0 ) = ∂ G ∂ x ( 0 ) + ∂ G ∂ b ( j ) ∂ b ( j ) ∂ q ( j ) ∂ q ( j ) ∂ x ( 0 ) = ∂ G ∂ x ( 0 ) ∓ ∂ G ∂ b ( j ) x ( j ) b ( 0 ) ∂ H ∂ x ( j ) = ∂ G ∂ x ( j ) + ∂ G ∂ z ( j ) ∂ z ( j ) ∂ x ( j ) + ∂ G ∂ b ( j ) ∂ b ( j ) ∂ q ( j ) ∂ q ( j ) ∂ x ( j ) = ∂ G ∂ x ( j ) ∓ ∂ G ∂ z ( j ) 1 b ( 0 ) ∓ ∂ G ∂ b ( j ) x ( 0 ) b ( 0 ) ∂ H ∂ b ( j - k ) = ∂ G ∂ b ( j - k ) + ∂ G ∂ z ( j ) ∂ z ( j ) ∂ b ( j - k ) + ∂ G ∂ b ( j ) ∂ b ( j ) ∂ b ( j - k ) = ∂ G ∂ b ( j - k ) - ∂ G ∂ z ( j ) k z ( k ) j b ( 0 ) - ∂ G ∂ b ( j ) b ( k ) b ( 0 ) ∂ H ∂ x ( k ) = ∂ G ∂ x ( k ) + ∂ G ∂ z ( j ) ∂ z ( j ) ∂ x ( k ) + ∂ G ∂ b ( j ) ∂ b ( j ) ∂ q ( j ) ∂ q ( j ) ∂ x ( k ) = ∂ G ∂ x ( k ) ∓ ∂ G ∂ b ( j ) x ( j - k ) b ( 0 ) ∂ H ∂ z ( k ) = ∂ G ∂ z ( k ) + ∂ G ∂ z ( j ) ∂ z ( j ) ∂ z ( k ) + ∂ G ∂ b ( j ) ∂ b ( j ) ∂ z ( k ) = ∂ G ∂ z ( k ) - ∂ G ∂ z ( j ) k b ( j - k ) j b ( 0 )

Input File: omh/theory/acos_reverse.omh