[LaTeX] Write partial differential equation (Ex. dQ/dt=ds/dt) with partial derivative signs

\documentclass{article}
\begin{document}

\begin{equation}
\frac{\partial Q}{\partial t} = \frac{\partial s}{\partial t}
\end{equation}

\end{document}

\begin{equation}
\frac{\partial h}{\partial t} + \frac{\partial uh}{\partial x} + \frac{\partial vh}{\partial y} = 0
\end{equation}

  • equation with numbering
\begin{equation}
 \frac{\partial h}{\partial t} + \frac{\partial uh}{\partial x} + \frac{\partial vh}{\partial y} = 0 
\end{equation}

  • equation with name no numbering
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\newcommand{\eqname}[1]{\tag*{#1}}% Tag equation with name

\begin{document}

\begin{equation}
 \frac{\partial h}{\partial t} + \frac{\partial uh}{\partial x} + \frac{\partial vh}{\partial y} = 0 \eqname{Continuity Equation} \ 
\end{equation}

\end{document}

  • equation with both name and numbering
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\newcommand{\eqname}[1]{\tag*{#1}}% Tag equation with name

\begin{document}

\begin{align}
 \frac{\partial h}{\partial t} + \frac{\partial uh}{\partial x} + \frac{\partial vh}{\partial y} = 0 \\ \eqname{Continuity Equation} \ 
\end{align}

\end{document}

 

  • equation with both name and numbering and ref equation in text body
\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\newcommand{\eqname}[1]{\tag*{#1}}% Tag equation with name
\begin{document}

\begin{align}
 f(x) &= a \\ \eqname{Constant} \ g(x) &= ax \\ \eqname{Linear} \ h(x) &= ax^2+bx+c \label{abc} \\ \eqname{Quadratic}
\end{align}


See~\eqref{abc}.
\end{document}

Leave a Reply

Your email address will not be published. Required fields are marked *