We have seen how OMD works when only one function, *f*(*r*), is
inverted. In this section,
we extent the method to the case where two functions *f*_{1}(*r*) and *f*_{2}(*r*)
are to be determined. An important example of this kind of problem is
represented by the inversion for solar structure, in our case sound speed
*c* and density . These are commonly based on the linearization of
the equations of stellar oscillations around a reference model
(e.g. Gough & Kosovichev 1988; Dziembowski et
al. 1990; Gough & Kosovichev 1990). Here, structural
differences between the actual Sun and the model are linearly related to
differences between the observed frequencies and those calculated using the
model. This relation is obtained by using a variational formulation for the
frequencies of adiabatic oscillations. A general relation for frequency
differences is given by

where (with relative error ) is the difference
in frequency of the mode between the actual Sun and the model.
The functions and
are the parameters to be inverted. and
are known functions, called kernels, that relate the changes in frequency
to the changes in the model. The term in
(24 (click here)) takes into account the uncertainties at the solar surface,
mainly due to the incorrect modelling of the outer part of the convection
zone, non-adiabatic effects and the omission of some surface terms.
Following standard procedures (Dziembowski et al. 1990), we
represent as a Legendre polynomial function. is
the inertia of the mode, normalized by the photospheric amplitude of the
displacement and divided by the inertia that a radial mode of the same
frequency would have (see Gough & Thompson 1991 for further
details).

With small changes in the formulation developed in Sect. 2, we can solve Eq. (24 (click here)) by using OMD. The main problem in this kind of inversion is that one of the functions could be more sensitive to the data set than the other one. That is our case: p-mode data (the ones we have at present) are very sensitive to sound speed variations, so the contribution of this function (and its kernels) to the inversion will be higher than the one for density. It means that the weight given to the penalty function and the distribution of points in the inversion mesh will be different for the two functions.

To test the inversion method, instead of the difference between the actual
Sun and a model, we have considered two models. In particular, *test 2*
uses two models from Christensen-Dalsgaard & Berthomieu (1991)
that differ in the opacities.
One of these, the reference model, uses the tables of Cox & Tabor
(1976), while the other one uses the opacities from Lebbreton
& Maeder (1986). Both models have the equation of state of
Eggleton et al. (1973) and the parameters of nuclear energy
generation from Parker (1986). The abundance of heavy elements
is, in both cases, *Z* = 0.02. From these models, we obtain the oscillation
frequencies for degrees in the range
(Christensen-Dalsgaard & Berthomieu 1991). The mode set and
errors are taken from actual observations.

The only significant difference in the inversion procedure
is in the spatial resolution analysis.
Because there are two different kernels sets, Eq. (14 (click here)) is
replaced by

such that when the linear combination of one kernel set, with covariance
matrix *C*, fits a target sine of a given spatial frequency, the
combination of the kernels associated with the other parameter, with
covariance matrix *C*', are zero, that is .

Then the spatial resolution is obtained in the same way as explained for
one function. In Fig. 7 (click here), the spatial resolution for density and
sound speed, using the *test 2* data set, are presented. In this case,
where only p-modes are used,
there are no significant differences between the two distributions.

**Figure 7:** Spatial resolution in sound speed (solid line) and density
(dashed lines) for *test 2*

However, since p-mode data are more sensitive to sound speed variations than to density variations, the point contributions to the solution and hence the weighting parameters are different. This can be seen in Fig. 8 (click here). For sound speed the contribution of the external points is larger but is not so pronounced for the density.

**Figure 8:** Point contributions in the case of *test 2* for sound
speed (dashed lines) and density (solid line)

Figure 9 (click here) shows the solution obtained for *test 2*. The
result is quite good, although the discrepancy between the actual solution
and the inverted one, as well as the error level, is higher in density
because *p* modes are more sensitive to sound speed variations.

**Figure 9:** Density and sound speed results for *test 2*. The solid line
represent the actual solution and filled circles with their error bars, the
inverted one

The precision of the result can also be tested in a different way, by means of
evaluating the averaging kernels obtained in the inversion. We know that
the solution vector is given by Eq. (17 (click here)).
Data vector *D* is defined by *D* = *Af*, where *f* is the actual solution,
so that

Averaging kernels for each point corresponds to the rows of matrix
,
and give an idea of how the inversion method
filters the actual solution *f*. Our solution would be exact
if the average kernels were Dirac delta functions of unit area for the
parameter we are inverting (i.e. sound speed) and zero for the other
parameter (i.e. density). Figures 10 (click here)a and 10 (click here)b show
averaging kernels when sound speed and density are inverted. It can be
seen that the averaging kernels obtained by our method are good, especially
for sound speed. Results for density are fairly good, and hence it can be
expected that the solutions for this parameter will be reasonably accurate.

**Figure 10:** **a)** Averaging kernel at *r*/*R*=0.5
when density is inverted. In dashed and solid lines the components
associated to sound speed and density, respectively, are presented.
**b)** The same as **a)** but when sound speed is inverted

**Figure 11:** Behaviour of the solution for three different values of the
proportionality factor, *c*. The actual solution is presented in
dotted lines. The result with OMD is shown in dashed lines and the one
with the regularization technique in solid line

A comparison between OMD and a regularization technique with only one
smoothing parameter and a mesh with equally-spaced points has been
done. Results are presented in Fig. 11 (click here). Each panel is
associated with a different value of *c* (for OMD) and (for RLS)
in the inversion. Figure
11 (click here)a shows that with OMD (dotted line), the response of
density and sound speed results to the smoothness is equivalent, but
with the other technique (solid line), density is smoothed before
sound speed. In Fig. 11 (click here)b, the solution for density is very
good using the two methods, but the one for sound speed is still undersmooth
with the standard technique. To obtain a non-oscillatory result in sound
speed with the standard method, it is necessary to increase the weight of
the smoothness, but this means that the density solution will be oversmooth
(see Fig. 11 (click here)c). It can be seen that these problems are solved
with OMD. The possibility of applying different weights to the
penalty function, not only in radius but also in each function to be
inverted, is a great advantage of OMD.

It is important to note that when sound speed and density are inverted,
it is unnecessary to assume that the equation of state is known. This
is not the general case, for instance, if the density is estimated by
inverting and the helium abundance *Y*. In this case,
an equation of state must
be assumed in order to obtain the kernels (e.g. Basu et al.
1996) and hence the result can be affected by this.

web@ed-phys.fr