Using the \newtheorem
command, I know how to create similar type of environments like 'Examples', 'Remarks', 'Lemma' etc. in class notes. For Theorems, we use \begin{proof} ......... \end{proof}
to write the proof.
My query is how to create a new environment (with amsthm
package) called 'solution' for writing solutions to worked examples and problems. I want this to begin and end with 'solution'. A \qed
to complete the solution will be also a great help. Kindly help on how to do it in LaTeX.
For the enclosed code, how should adjust I the LaTeX preamble after \usepackage{amsthm}
? Thanks a lot!
\begin{example}
Find the Laplace transform of $f(t) = 1$.
\end{example}
\begin{solution}
The Laplace transform of $f(t)$ is obtained as
$$
F(s) = {\cal L}(f) = \int\limits_0^\infty e^{-s t} (1) dt = {1 \over s}
$$
\end{solution}
Best Answer
Just define
solution
in terms ofproof
.Since the particular solution ends with a display, you should use
\qedhere
as shown. Otherwise nothing is necessary to get the tombstone at the end.Please, note the changes:
{\cal L}
has been deprecated for about 30 years and should be\mathcal{L}
$$...$$
has never be advertised in LaTeX and should not be used{1\over s}
is plain TeX syntax that should be avoided in LaTeXThe differential should be preceded by
\,