\documentclass{article}

% set up telugu
\usepackage{fontspec}
\newfontfamily\telugufont{Potti Sreeramulu}[Script = Telugu]
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{telugu}

%other packages
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{physics}
\usepackage{siunitx}
\usepackage{todonotes}
\usepackage{luacode}
\usepackage{titling}
\usepackage{enumitem}
\usepackage{mathtools}

% custom deepak packages
\usepackage{luatrivially}
\usepackage{subtitling}

\usepackage{cleveref}

\begin{luacode*}
	math.randomseed(31415926)
\end{luacode*}

\newcommand{\kb}{k_{\mathrm{B}}}
\newcommand{\defeq}{\vcentcolon=}
%\newcommand{\defeq}{\equiv}

\title{Problem 3.11}
\subtitle{Maxwell Relations}
\author{\begin{telugu}హృదయ్ దీపక్ మల్లుభొట్ల\end{telugu}}
% want empty date
\predate{}
\date{}
\postdate{}

% !TeX spellcheck = en_GB
\begin{document}
	\maketitle
	
	We want to derive our Maxwell relations based on our thermodynamic potentials.
	For convenience work in units where $\kb = 1$, (if you want to put it back, just put it in front of the temperatures).
	Start these with our \emph{definitions}:
	\begin{align}
		\frac{1}{T} &\defeq \left. \pdv{S}{E} \right|_{V, N} \label{eq:defT} \\
		\frac{P}{T} &\defeq \left. \pdv{S}{V} \right|_{E, N} \label{eq:defP} \\
		\frac{\mu}{T} &\defeq \left. \pdv{S}{N} \right|_{E, V} \label{eq:defMu}
	\end{align}
	
	Show the following:
	\begin{enumerate}[label=(\alph*)]
		\item \begin{equation}
			\left. \pdv{T}{V} \right|_{S, N} = - \left. \pdv{P}{S} \right|_{V, N}
		\end{equation}
		\item \begin{equation}
			\left. \pdv{C_P}{P} \right|_{T} = - T \left. \pdv[2]{V}{T} \right|_{P}
		\end{equation}
		\item \begin{equation}
			\left. \pdv{E}{P} \right|_{T} = - T \left. \pdv{V}{T} \right|_{P} - P \left. \pdv{V}{P} \right|_T
		\end{equation}
		\item \begin{equation}
			\left. \pdv{E}{T} \right|_{P} = C_P - P \left. \pdv{V}{T} \right|_P
		\end{equation}
		\item \begin{equation}
			\left. \pdv{T}{V} \right|_{S} =  - \frac{T}{C_V} \left. \pdv{S}{V} \right|_T
		\end{equation}
		\item \begin{equation}
			\left. \pdv{T}{P} \right|_{S} = - \frac{T}{C_P} \left. \pdv{S}{P} \right|_{T}
		\end{equation}
		\item \begin{equation}
			\left. \pdv{V}{T} \right|_{P} = - \frac{C_P}{T} \left. \pdv{T}{V} \right|_{S} \left. \pdv{V}{P} \right|_S
		\end{equation}
		\item \begin{equation}
			\left. \pdv{P}{V} \right|_{S} = \left. \pdv{P}{V} \right|_{T} - \frac{T}{C_V} \left( \left. \pdv{P}{T} \right|_V \right)^2
		\end{equation}
	\end{enumerate}
	
	\section{Solution} \label{sec:solution}
	
	These can either be manipulated by thinking in terms of manipulating expressions like $\dd{E} = T \dd{S} - P \dd{V} + \mu \dd{N}$ casually, using the `physicist's identities' strategy, or by doing it more formally.
	Being too informal runs the risk of accidentally working off the wrong intuition, like the minus signs if we write a chain rule too casually:
	\begin{equation}
		\pdv{P}{V} \neq \pdv{P}{T} \pdv{T}{V},
	\end{equation}
	but instead 
	\begin{equation}
		\pdv{P}{V} = - \pdv{P}{T} \pdv{T}{V}!
	\end{equation}
	Why?
	Because these aren't actually compatible chain rule derivatives, we're ignoring what we're holding constant.
	Which is why it's useful to write the labels for what's not changing for these guys.
	It's actually
	\begin{equation}
		\left. \pdv{P}{V} \right|_{T} = - \left. \pdv{P}{T} \right|_{V} \left. \pdv{T}{V} \right|_{P}.
	\end{equation}

	
	Our two main operational identities are the cyclic triple product relation:
	\begin{equation}
		\left. \pdv{x}{y} \right|_{z} \left. \pdv{y}{z} \right|_{x} \left. \pdv{z}{x} \right|_{y} = - 1 \label{eq:trip}
	\end{equation}
	and the inverse derivative relation:
	\begin{equation}
		\left. \pdv{x}{y} \right|_{z} = \flatfrac{1}{\left( \left. \pdv{y}{x} \right|_{z} \right)}. \label{eq:inv}
	\end{equation}
	Those basically just let us write things down.

	\subsection{(a)}

	Want to show
	\item \begin{equation}
		\left. \pdv{T}{V} \right|_{S, N} = - \left. \pdv{P}{S} \right|_{V, N}
	\end{equation}
	
	Start with the expression
	\begin{equation}
		\pdv[2]{E}{V_{S, N}}{S_{V, N}},
	\end{equation}
	where the subscript in the denominator tells us what we're keeping constant.
	If $E$ is sufficiently well-behaved (fun question, what're the necessary and sufficient conditions here?), then these derivatives commute:
	\begin{align}
		\pdv[2]{E}{V_{S, N}}{S_{V, N}} &= \pdv[2]{E}{S_{V, N}}{V_{S, N}}
	\end{align}
	The lhs starts with the reciprocal (using \cref{eq:inv}) and our temperature definition \cref{eq:defT}, and the $V$ derivative in the rhs comes out of the triple product rule \cref{eq:trip,eq:defP}.

	\begin{align}
		\pdv{T}{V_{S, N}} &= - \pdv{P}{S_{V, N}}
	\end{align}

	\subection{(b)}
	
	We want:
	\begin{equation}
		\left. \pdv{C_P}{P} \right|_{T} = - T \left. \pdv[2]{V}{T} \right|_{P}
	\end{equation}
	
	By definition:
	\begin{equation}
		C_P = T \left. \pdv{S}{T} \right|_{P}
	\end{equation}
	
	Let's start by looking at the expression and do the commutativity of derivatives thing (again subscripting for what we're holding constant).
	\begin{align}
		T \pdv[2]{S}{P_T}{T_P} &= T \pdv[2]{S}{T_P}{P_T} \\
		\pdv{C_P}{P_T} &= T \pdv[2]{S}{T_P}{P_T} \\
		\pdv{C_P}{P_T} &= - T \pdv[2]{V}{T_P}
	\end{align}
	where on the right hand side we've used our result from part (a).

	\subsection{(c)}
	
	Want
	\begin{equation}
		\left. \pdv{E}{T} \right|_{P} = - \frac{T}{C_P} \left. \pdv{S}{P} \right|_{T}
	\end{equation}
	
	\newpage
	\listoftodos

\end{document}
