LaTex how to edit this equation?

186 Views Asked by At

I'm having issues turning this word equation into a LaTex equation. It's coming out looking dodgy, please help!

I added a screen shot of the equation I want, and what I end up getting when I copy and paste into LaTex:

WORD:

enter image description here

LATEX CODE:

\mathrm{=\ }\mathrm{C}_\mathrm{0}\mathrm{[1-}6(Dt)1/2aπ2-3Dta2] + 12(Dt)1/2an = 1∞exp(na(Dt)1/2)

and therefore nothing comes out and LaTex doesn't let me run it.

2

There are 2 best solutions below

4
On

This is absolutely not a proper LaTeX equation code. I don't know what you know about LaTeX, but you cannot just copy and paste from Word or any software to you LaTex editor. Plus, you need to provide your full code for anyone being able to help you.

Anyway, running this MWE should work :

\documentclass[11pt, a4paper, twoside]{report}
% ===== PACKAGES DECLARATION =====
\usepackage{mathtools}              % Replaces amsmaths + more features
\usepackage{amsfonts}               % Maths fonts package
% ===== DOCUMENT BODY =====
\begin{document}
    \begin{equation} % optional : use the "equation*" environment to remove equation number
        % optional : use traditional math font by removing the \mathrm{} command
        \mathrm{X = C_0 \left[ 1 - \frac{6(Dt)^{1/2}}{a \pi^2} - \frac{3Dt}{a^2}\right] + \frac{12(Dt)^{1/2}}{a} \sum_{n=1}^\infty \exp\left(\frac{na}{(Dt)^{1/2}} \right)}
        % optional : remove auto-sized brackets by removing the \left and \right commands
   \end{equation}
\end{document}

As written in the code, you may want to remove the equation number and the big auto-sized brackets (that are more readable in my opinion). Just remove the corresponding commands. Also, you should consider using the "normal" math font and not the roman one that is clearly different from the text and helps the reader to separate equations from inline small expressions you could insert in your document.

0
On

One first sketch:

\documentclass{article}

\begin{document}
\[
C_0\left[1-\frac{6(Dt)^{\frac{1}{2}}}{a\pi^2}-\frac{3Dt}{a^2}\right]+%
\frac{12(Dt)^{\frac{1}{2}}}{a}\sum^{\infty}_{n=1}%
\exp\left(\frac{na}{(Dt)^{\frac{1}{2}}}\right)
\]
\end{document}

No packages required. The output:

screenshot of output

Than you can tune the math fonts and anything else.