\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{algorithm}
\usepackage{algpseudocode}

\title{Numerical Methods: Bayesian Analysis and Cosmological Simulations}
\author{Fdo Andres Lopez}
\date{}

\begin{document}

\maketitle

\section{Markov Chain Monte Carlo Implementation}

We use the affine-invariant ensemble sampler implemented in \texttt{emcee}:

\begin{algorithm}
\caption{Bayesian Parameter Estimation}
\begin{algorithmic}[1]
\State Initialize ensemble $\{\theta_i\}_{i=1}^{N}$ in parameter space
\For{$t = 1$ to $N_{\text{steps}}$}
    \For{$i = 1$ to $N$}
        \State Randomly select $\theta_j \neq \theta_i$
        \State Propose: $\theta_p = \theta_j + Z(\theta_i - \theta_j)$
        \State $Z \sim \mathcal{N}(0, \sigma^2)$
        \State Compute acceptance probability $\alpha$
        \If{$\alpha > \text{Uniform}(0,1)$}
            \State $\theta_i \leftarrow \theta_p$
        \EndIf
    \EndFor
\EndFor
\end{algorithmic}
\end{algorithm}

\section{Cosmological Equations Integration}

The Friedmann equation with dissipative terms:
\begin{equation}
H^2(z) = H_0^2 \left[ \Omega_m(1+z)^3 + \Omega_k(1+z)^2 + \Omega_\Lambda + \Omega_{\text{diss}}(z) \right]
\end{equation}

where the dissipative component evolves as:
\begin{equation}
\Omega_{\text{diss}}(z) = \Omega_{\Psi,0} \exp\left(3 \int_0^z \frac{1+w_{\Psi}(z')}{1+z'} dz'\right)
\end{equation}

We solve this using 4th-order Runge-Kutta integration.

\section{Growth Function Calculation}

The linear growth factor $D_+(z)$ satisfies:
\begin{equation}
D_+'' + \left(2 - \frac{3}{2}\Omega_m(z)\right) \frac{D_+'}{a} - \frac{3}{2}\Omega_m(z) \frac{D_+}{a^2} = 0
\end{equation}

with modified $\Omega_m(z)$ due to dissipative effects.

\section{LHC Cross Section Calculations}

Higgs production cross sections computed using modified couplings:
\begin{equation}
\sigma(pp \rightarrow H) = \sigma_{\text{SM}} \times (1 + \delta\kappa)^2
\end{equation}
where $\delta\kappa \approx 2-5\%$ from dissipative corrections.

\end{document}