*
Cococubed.com

Abundance variable
second derivatives

Astronomy Research
   2024 Radiative Opacity
   2024 Neutrino Emission from Stars
   2023 White Dwarfs & 12C(α,γ)16O
   2023 MESA VI
   2022 Earendel, A Highly Magnified Star
   2022 Black Hole Mass Spectrum
   2021 Skye Equation of State
   2021 White Dwarf Pulsations & 22Ne
   Software Instruments

AAS Journals
   2024 AAS YouTube
   2024 AAS Peer Review Workshops

2024 ASU Energy in Everyday Life
2024 MESA Classroom
Outreach and Education Materials
    Solar Systems Astronomy
    Energy in Everyday Life
    Geometry of Art and Nature
    Calculus

Other Stuff:
   Bicycle Adventures
   Illustrations
   Presentations



Contact: F.X.Timmes
my one page vitae,
full vitae,
research statement, and
teaching statement.

$ \def\drvop#1{{\frac{d}{d{#1}}}} \def\drvf#1#2{{\frac{d{#1}}{d{#2}}}} \def\ddrvf#1#2{{\frac{d^2{#1}}{d{#2}^2}}} \def\partop#1{{\frac{\partial}{\partial {#1}}}} \def\ppartop#1{{\frac{\partial^2}{\partial {#1}^2}}} \def\partf#1#2{{\frac{\partial{#1}}{\partial{#2}}}} \def\ppartf#1#2{{\frac{\partial^2{#1}}{\partial{#2}^2}}} \def\mpartf#1#2#3{{\frac{\partial^2{#1}}{\partial{#2} \ {\partial{#3}}}}} $ A pdf of this note is avaliable.

One may ask why second derivatives are needed. If the equations being evolved contains derivative quantities, for example the $\partial e / \partial Y_i$ ``chemical potential'' term from the first law of thermodynamics, and if an implicit time integration is desirable, for example the system is stiff, then the Jacobian matrix will contain terms such as $\partial^2 e / \partial Y_i^2$.



Its been previously shown that the average of any quantity $\overline{\beta}$ by the number density $n_i$ weighted average \begin{equation} \overline{\beta} = \frac{\sum \beta_i Y_i}{\sum Y_i} \ , \label{eq:betabar} \end{equation} whose first partial derivative with respect to abundance $Y_i$ is \begin{equation} \frac{ \partial \overline{\beta}}{\partial Y_i} = \frac{\beta_i}{\sum Y_i} - \frac{\sum \beta_i Y_i}{\left ( \sum Y_i \right )^2} = \frac{\beta_i}{\sum Y_i} - \frac{\overline{\beta}}{\sum Y_i} = \frac{\beta_i - \overline{\beta}}{\sum Y_i} = \overline{\rm{A}} \ ( \beta_i - \overline{\beta} ) \ . \end{equation} The second partial derivative with respect to abundance $Y_i$ is then \begin{align} \ppartf{\overline{\beta}}{Y_i} & = \partop{Y_i} \left [ \frac{\beta_i}{\sum Y_i} - \frac{\sum \beta_i Y_i}{\left ( \sum Y_i \right )^2} \right ] \notag \\[8pt] & = -\frac{\beta_i}{(\sum Y_i)^2} - \frac{\beta_i}{(\sum Y_i)^2} + 2 \frac{\sum \beta_i Y_i}{\left ( \sum Y_i \right )^3} \notag \\[8pt] & = 2 \left ( \frac{\overline{\beta}}{(\sum Y_i)^2} - \frac{\beta_i}{(\sum Y_i)^2} \right ) \notag \\[8pt] & = 2 \overline{\rm{A}}^2 \ ( \overline{\beta} - \beta_i ) \notag \\[8pt] & = 2 \overline{\rm{A}} \ \frac{ \partial \overline{\beta}}{\partial Y_i} \ , \label{eq:azbar2nd} \end{align} which is a handy expression. Explicitly, \begin{align} \ppartf{\overline{{\rm A}}}{Y_i} & = 2 \overline{\rm{A}} \ \frac{ \partial \overline{{\rm A}}}{\partial Y_i} = - 2 \overline{\rm{A}}^3 \notag \\[8pt] \ppartf{\overline{{\rm Z}}}{Y_i} & = 2 \overline{\rm{A}} \ \frac{ \partial \overline{{\rm Z}}}{\partial Y_i} \end{align}


It's worth considering the general case for second full derivative as its not common. The differential operator \begin{equation} d = dx \partop{x} + dy \partop{y} \end{equation} applied to $f$ gives \begin{equation} df = dx \partf{f}{x} + dy \partf{f}{y} \end{equation} The second differential operator \begin{equation} d^2 = \left ( dx \partop{x} + dy \partop{y}\right ) \left ( dx \partop{x} + dy \partop{y}\right ) \end{equation} applied to $f$ gives \begin{align} d^2f & = \left ( dx \partop{x} + dy \partop{y}\right ) \left ( dx \partop{x} + dy \partop{y}\right ) f \notag \\[8pt] & = \left ( d^2x \ppartop{x} + d^2y \ppartop{y} + dx \ dy \partop{x} \ \partop{y} + dy \ dx \partop{y} \ \partop{x} \right ) f \end{align} If the partial derivatives commute such that \begin{equation} \mpartf{f}{x}{y} = \mpartf{f}{y}{x} \ , \end{equation} then \begin{equation} d^2f = d^2x \ \ppartf{f}{x} + d^2y \ \ppartf{f}{y} + 2 \ dx \ dy \mpartf{f}{x}{y} \ , \end{equation} and for an arbitrary quantity $z$ \begin{equation} \ddrvf{f}{z} = \ddrvf{x}{z} \ \ppartf{f}{x} + \ddrvf{y}{z} \ \ppartf{f}{y} + 2 \ \drvf{x}{z} \ \drvf{y}{z} \mpartf{f}{x}{y} \ . \label{eq:2ndfull} \end{equation}


For the case of composition variables, for an arbitray quantity $\alpha$, applying equation ($\ref{eq:2ndfull}$) yields \begin{equation} \ddrvf{\alpha}{Y_i} = \ddrvf{\overline{\rm{Z}}}{Y_i} \ \ppartf{\alpha}{\overline{\rm{Z}}} + \ddrvf{\overline{\rm{A}}}{Y_i} \ \ppartf{\alpha}{\overline{\rm{A}}} + 2 \ \drvf{\overline{\rm{Z}}}{Y_i} \ \drvf{\overline{\rm{A}}}{Y_i} \ \mpartf{\alpha}{\overline{\rm{Z}}}{\overline{\rm{A}}} \ . \end{equation} One assumes all partials of $\alpha$ with respect to $\overline{\rm{A}}$ and $\overline{\rm{Z}}$ are available from the physics is at hand (e.g., from an eos). The second partials of $\overline{\rm{A}}$ and $\overline{\rm{Z}}$ are given by equation ($\ref{eq:azbar2nd}$), and the first partials have been given previously.