Consider Taylor series , where
Define foo31 and foo32 below, which will satisfy as shown later.
Define a rule to make , thus ih2 is the inverse matrix of h2.
Apply this rule to foo31+foo32 to get foo33.
Confirming foo33=
Since is the multivariate normal density function with mean specified above and covariance, =. Then, ψ(θ)=log
Considering , we find that and from the above expression of . Let us write with
Rewrite the Taylor series of h(y) by noting the first derivative h1 is in fact .
In the following, , where .
Noting , where the expectation is taken for the multivariate normal with mean and covariance identity. We apply "logeexppoly" to foo37. First, we get foo38={a0,a1,a2,a3,a4} for the coefficients of , and below.
Now substitute for in foo39 to get ψ(θ)=foo40 in terms of η below. The coefficients for the polynomial of η is stored in foo41.
Since foo40=ψ(θ)=psieta, foo41 must be equal to foo42 below.
At first, we compare the coefficient for .
Thus, ah2 is in fact instead of .
We rewrite foo43=foo42-foo41.
We solve these five equations ⩵ 0. At first, foo43[[4]]==0 gives