0

I have been stuck for hours trying to write this equation in Latex but I just couldn't, can anyone please help me out here. Thanks in advance.

enter image description here

6
  • 2
    For one thing, I'd use \exp\Bigl( ... \Bigr) instead of the e^{...} notation for such a big expression. But, is there something in particular you have problem with?
    – mickep
    Aug 23, 2022 at 13:53
  • Please show the tex code you used ...
    – Mensch
    Aug 23, 2022 at 13:57
  • @mickep yes, when I try to write second part of the equation using e$^\frac{(...)$^2$}{...$^2$} it gives me a none sense when I compile.
    – H00MZ4
    Aug 23, 2022 at 13:58
  • As @Mensch writes, show us the code. I mean, I could probably type that equation, but I think it is more instructive if you show what you do.
    – mickep
    Aug 23, 2022 at 14:00
  • I suggest you read an introduction to LaTeX's math mode. See e.g. here: learnlatex.org/en/lesson-10
    – Skillmon
    Aug 23, 2022 at 14:01

4 Answers 4

2

This?

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}
\begin{equation}
    I_{SERS}(\Delta x) = ue^{\left(\dfrac{(\Delta x - \mu_g)^2}{2\sigma^{2}_{g}} + \dfrac{2L\sigma_{l}}{4\pi(\Delta x - \mu_{l})^2 + \sigma^{2}_{l}} + I_0 \right)}
\end{equation}

\end{document}

enter image description here

1
  • Yes man, you are a life saver. Thanks a lot!
    – H00MZ4
    Aug 23, 2022 at 14:07
5

Version A

\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{amsmath}
\usepackage{fouriernc}
\begin{document}
\[
I_{\text{SERS}}\big(\Delta x\big) = u \exp\left[\frac{\big(\Delta x-\mu_g\big)^2}{2\sigma_g^2}+\frac{2L\sigma_l}{4\pi\big(\Delta x-\mu_l\big)^2+\sigma_l^2}+I_0\right]
\]
\end{document}

enter image description here

Version B

\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{amsmath}
\usepackage{mathpazo}
\begin{document}
\[
\ln\left(\frac{I_{\text{SERS}}\big(\Delta x\big)}{u}\right) = \frac{\big(\Delta x-\mu_g\big)^2}{2\sigma_g^2}+\frac{2L\sigma_l}{4\pi\big(\Delta x-\mu_l\big)^2+\sigma_l^2}+I_0
\]
\end{document}

enter image description here

2

I add only one improvement in this solution mainly a custom plus operator whose size is adapted to the size of the whole expression, if you decide on display mode and the superscript format (as shown below).

enter image description here

\documentclass{article}
\usepackage{mathtools}

\DeclareMathOperator{\e}{\mathit{e}}
\newcommand{\dplus}{\displaystyle+}

\begin{document}
\begin{equation*}
  I_{\mathit{SERS}}(\Delta x) =
    u\e^{
      \dfrac{(\Delta x - \mu_{g})^2}{2\sigma_{g}^{2}}
      \dplus \dfrac{2L\sigma_{l}}{4\pi(\Delta x - \mu_{l})^2 + \sigma_{l}^{2}}
      \dplus I_{0}
    }
\end{equation*}
\end{document}

Unrelated.
It's probably me but multiple-letter subscript may look slightly better when typeset as roman font via \textup{SERS}, rather then as italics

enter image description here

2

You need first to be consistent, which the image isn't:

  1. In the left hand side we see \Delta x, whereas in the right hand side there's \triangle x.

  2. The exponent to \sigma_{g} in the first fraction is staggered, which isn't in the exponent to \sigma_{l} in the second fraction.

Using so long an exponent to “e” makes the formula very difficult to read, it's much better to use “exp”, which means the same thing.

The “SERS” part should be either \mathit or \mathrm, because it's not the product of four quantities. Be consistent.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
I_{\mathit{SERS}}(\Delta x)=
u\exp\biggl(
  \frac{(\Delta x-\mu_{g})^{2}}{2\sigma_{g}^{2}}+
  \frac{2L\sigma_{l}}{4\pi(\Delta x-\mu_{l})^{2}+\sigma_{l}^{2}}+
  I_{0}
\biggr)
\end{equation*}

\end{document}

enter image description here

Just for a comparison, the same with the exponent in different sizes:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{gather}
I_{\mathit{SERS}}(\Delta x)=
u\exp\biggl(
  \frac{(\Delta x-\mu_{g})^{2}}{2\sigma_{g}^{2}}+
  \frac{2L\sigma_{l}}{4\pi(\Delta x-\mu_{l})^{2}+\sigma_{l}^{2}}+
  I_{0}
\biggr)
\\
I_{\mathit{SERS}}(\Delta x)=
ue^{
  \frac{(\Delta x-\mu_{g})^{2}}{2\sigma_{g}^{2}}+
  \frac{2L\sigma_{l}}{4\pi(\Delta x-\mu_{l})^{2}+\sigma_{l}^{2}}+
  I_{0}
}
\\
I_{\mathit{SERS}}(\Delta x)=
ue^{\textstyle
  \frac{(\Delta x-\mu_{g})^{2}}{2\sigma_{g}^{2}}+
  \frac{2L\sigma_{l}}{4\pi(\Delta x-\mu_{l})^{2}+\sigma_{l}^{2}}+
  I_{0}
}
\\
I_{\mathit{SERS}}(\Delta x)=
ue^{\displaystyle
  \frac{(\Delta x-\mu_{g})^{2}}{2\sigma_{g}^{2}}+
  \frac{2L\sigma_{l}}{4\pi(\Delta x-\mu_{l})^{2}+\sigma_{l}^{2}}+
  I_{0}
}
\end{gather}

\end{document}

enter image description here

Comments to the four realizations

  1. This is what I suggest.
  2. The exponent is too small and difficult to read.
  3. The exponent is bigger, but still hard to read.
  4. The exponent is too big and doesn't help the reader to correctly parse the equation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .