1

I have just started writing in Latex and I am getting the same errors constantly. No matter how hard I try to fix these errors, I am breaking some other part. Therefore, I wanted to ask you about my code.

   \documentclass[a4paper, 12pt]{article}
% preamble
\usepackage{a4wide}
\usepackage{amsmath}
\usepackage{enumerate}
\usepackage{nccmath}

\begin{document}

A body of mass \(m\) projected 
straight upward with initial velocity \(v_{0}\) satisfies

the differential equation
\begin{equation}
m \frac { d v } { d t } = - k v - m g, \hspace{0.5cm} v(0) = \(v_{0}\)
\end{equation}

where  $g$ = 9.8 $m/sec^{2}$ is the acceleration due to gravity, 
$k > 0$ is a constant  due to the air resistance, 
and \(v\) = $v(t\T)$ is the velocity. The solution is

\begin{equation}
$$
\begin{center}
$v(t\T)$ = $-\frac{ m g }{ k } + 
\left( \(v_{0}\) + $ \frac{ m g }{ k } $  \right)$)  
$e^{- k t / m }.$
\end{center}
$$\end{equation}

\end{document}

My first question is about sizes of fonts. Even though I choose 12 pt, the second equation is being smaller than the first one. Also, I couldn't make the second equation centered as in the first one, therefore, I added \begin{center}...\end{center} to second one. Why it is not being centered as in the first equation? Please help me.

Display math should end $$. Missing $ inserted. Bad math environment delimiter.

How can I eliminate these problems?

I would be more than appreciated if you could help me.

  • In addition to the answer, you should never insert a blank line before a math display, and if the text following the display is part of the same paragraph, don't put a blank line there either. – barbara beeton Oct 12 at 21:59
3

\begin{equation}...\end{equation} already specifies that you're setting math content, so don't use $..$, $$..$$ or \(..\) inside.

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

A body of mass $m$ projected straight upward with initial velocity $v_0$ satisfies the differential equation
\begin{equation}
  m \frac { \mathrm{d} v } { \mathrm{d} t } = - k v - m g, \quad v(0) = v_0
\end{equation}
where  $g = 9.8 m/s^2$ is the acceleration due to gravity, $k > 0$ is a constant due to the air resistance, 
and $v = v(t)$ is the velocity. The solution is
\begin{equation}
  v(t) = -\frac{ m g }{ k } + \left( v_0 + \frac{ m g }{ k } \right) e^{- k t / m }.
\end{equation}

\end{document}
  • Thank you so much! I am appreciated to you for your help :) – serife gizem baci Oct 12 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.